46508 Commits

Author SHA1 Message Date
Ingo Weinhold
dcb2158862 storage/mime: Some host platform build fixes 2013-05-08 04:26:00 +02:00
Ingo Weinhold
b6a89f410e Pull class AppMetaMimeCreator out of CreateAppMetaMimeThread
Instead of using a BMimeType to set the MIME type properties, it
operates directly on the Database object, though.
2013-05-08 01:08:16 +02:00
Ingo Weinhold
b94857b322 Refactor MIME DB access
* Add class DatabaseLocation. It contains a list of the MIME DB
  directory paths plus methods to access type files.
* Move all low-level MIME DB access functions from
  database_{support,access} to DatabaseLocation. All code that formerly
  used those now requires a DatabaseLocation object. In BMimeType and in
  the registrar the default object is used, but the low-level classes
  can now be reused with different locations.
* Move get_icon_data() from database_access to database_support and
  delete the former, which is now empty.
2013-05-07 23:15:36 +02:00
Ingo Weinhold
9cda9c9905 Move MIME DB code back from registrar to src/kits/storage/mime
* Together with database_{access,support}.cpp it is built into a static
  library.
* Add new interfaces MimeSniffer and Database::NotificationListener for
  plugging in registrar specific functionality (the sniffer add-on
  support and the notification mechanism).
2013-05-07 17:54:29 +02:00
Ingo Weinhold
a625f557c5 mimeset: Change options style
* Use "--" prefix for long options and switch to getopt parsing. There's
  still compatibility support for "-apps" and "-all", but they are
  considered obsolete, now.
* Add short options "-a" for "--apps", "-A" for "--all", and "-h" for
  "--help".
2013-05-07 16:27:06 +02:00
Ingo Weinhold
937b6e0f7f pkgman resolve-dependencies: Remove bogus option 2013-05-07 16:18:29 +02:00
Ingo Weinhold
f8d6e1f938 mimeset: Style update 2013-05-07 15:32:15 +02:00
Ingo Weinhold
59a653b51c Support multiple MIME DB directories
Each installation location (system, common, common/non-packaged,
~/config, ~/config/non-package) can now have a read-only data/mime_db
directory. ~/config/settings/beos_mime is now named mime_db as well. The
contents of all directories makes up the MIME DB. Entries in more
specific locations shadow entries in more general locations. Only the
directory in ~/config/settings is where the registrar writes changes to.

The new layout allows packages to contribute entries to the MIME DB by
simply providing the respective files in data/mime_db. Consequently the
user settings directory is supposed to contain only the things the user
has actually changed.

Seems to work fine as far as tested. A few issues, though:
* The registrar doesn't monitor the directories yet, so it doesn't
  notice entry changes due to package de-/activation.
* ATM it is not possible to remove a MIME type that is not in the user
  settings directory, although the FileTypes GUI suggests that it is.
  We'd have to work with white-outs, since we cannot remove the files in
  the data/mime_db directories. Or, alternatively, the API has to be
  extended and the FileTypes GUI adjusted to disable the "Remove" button
  in such a case.
2013-05-07 04:43:51 +02:00
Ingo Weinhold
38e3973ecf Add private class BMergedDirectory to storage kit
An arbitrary number of directories can be added, which the implemented
BEntryList interface presents as a single merged entry list. Three
different merge policies are supported which define how entries that
appear in more than one directory are treated.
2013-05-07 04:43:50 +02:00
Ingo Weinhold
e387e24faa Move MIME DB creation from build_haiku_image to jam build system
* build_haiku_image: Remove MIME DB creation code.
* Rename beos_mime source directory to mime_db.
* Add rules to build the MIME DB in the source directory's jamfile.
* Add MIME DB directory to haiku.hpkg in data/mime_db.
2013-05-07 04:43:50 +02:00
Ingo Weinhold
d6a6e2c811 rule CopyDirectoryToContainer: Add flags isTarget
The flags indicates that the passed sourceDirectory is a target, not a
path.
2013-05-07 04:43:50 +02:00
Ingo Weinhold
fa5dff5529 Replace various boolean rule parameters by flags
Instead of the boolean alwaysUpdate, isCDPackage, and stripDebugSymbols
parameters use a uniform flags parameter which can contain any of the
respectively supported flags (alwaysUpdate, cdPackage,
stripDebugSymbols, !stripDebugSymbols).
2013-05-07 04:43:50 +02:00
Ingo Weinhold
eef74ff298 Remove packages Zlib[-devel] from ReleaseBuildProfiles
Instead add Zlib as a mandatory package and Zlib-devel as a Development
dependency.
2013-05-07 04:43:49 +02:00
Ingo Weinhold
853b8a4de5 CreateAppMetaMimeThread: Use open_type()
... instead of constructing the MIME type file path manually.
2013-05-07 04:43:49 +02:00
John Scipione
6ba46ced85 Reinit offscreen bitmap when set keyboard layout
Fixes #9345
hrev45641
2013-05-06 21:16:24 -04:00
Rene Gollent
4efba5fd99 Use default spacing for inspector's groups too. hrev45640 2013-05-06 18:47:17 -04:00
John Scipione
e28ba280de BMCPrivate: Cleanup
Remove no longer needed header includes, most that I recently added
a few that were already there but just aren't needed anymore. Don't
use BPrivate::MenuPrivate namespace.
hrev45639
2013-05-06 18:29:34 -04:00
John Scipione
c1a7e89fc2 Put the label truncation code back in BMenuItem.
Just a few commits ago I moved the label truncation code out of
BMenuItem and into BMCMenuBar because the truncation had to happen
outside of BMenuItem. Turns out, that wasn't true so I'm moving the
label truncation back into BMenuItem and removing the _DrawItems()
method from BMCMenuBar.

Note that the code is not a copy of what was there before, but, the
updated version I created for BMCMenuBar. The main difference is that
I use menuPrivate.Padding() instead of GetItemMargins() and I always
use the width of the parent menu frame instead of using fBounds even
if the state is not MENU_STATE_CLOSED. These are changes needed for
BMCMenuBar but should work just as well for a regular BMenu.
hrev45638
2013-05-06 17:55:33 -04:00
John Scipione
13cec30211 Find: set a max width on each of the menu fields
... instead of the just on the mime type menu now that
menu field truncation is working. This will prevent the
volume menu growing too wide as well.
hrev45637
2013-05-06 17:23:59 -04:00
John Scipione
c333966291 Draw truncated menu label in BMCPrivate, fixes #9735
...instead of in BMenuItem and remove the truncation code from BMenuItem.

The label truncation code cannot work in BMenuItem because the super
menu helpfully resizes itself to fit the menu item. So, instead we do the label
truncation in BMCPrivate making sure that BMenuItem there can't expand the
BMCMenuBar because we set the width to fMenuField->_MenuBarWidth()
explicity.

Note that this only truncates the label in BMCMenuField, i.e. the label inside
the menufield, it does nothing to the labels of the menu items in the attached
BMenu or BPopUpMenu which is exactly what we want.
hrev45636
2013-05-06 17:15:20 -04:00
John Scipione
1afff67178 Set some static variables for magic number constants 2013-05-06 17:15:20 -04:00
John Scipione
4e1b19207a Refactor BMenuField::DrawLabel()
also use std::max() instead of max_c()
2013-05-06 17:15:19 -04:00
John Scipione
2bf1592a70 Rework layout-enabled contructor for BMCMenuBar
Was passing !fixedSize into the view flags of BMenuBar, which made no sense.
Stop doing that, set fixedSize to true instead.

Remove the fixedSize parameter from this contructor, it's too late for that.
2013-05-06 17:15:19 -04:00
John Scipione
6c1452071c Remove pre-ControlLook drawing code in menu classes 2013-05-06 17:15:19 -04:00
John Scipione
d218f0f822 Put the BMenuBar initilization on it's own line 2013-05-06 17:15:18 -04:00
John Scipione
d5c51ba676 Update header comments 2013-05-06 17:15:18 -04:00
John Scipione
d97b434060 Style fixes to BMenu and related classes. 2013-05-06 17:15:17 -04:00
Jérôme Duval
3f5d1e7825 exfat: fixes 64 bit warnings hrev45635 2013-05-06 22:41:07 +02:00
Jérôme Duval
575eeda9a5 cdda: fixes 64 bit warnings 2013-05-06 22:41:06 +02:00
Jérôme Duval
267a780ab5 btrfs: fixes 64 bit warnings 2013-05-06 22:41:05 +02:00
Axel Dörfler
a1566b06b7 bfs: removed kernel_cpp.h's new operator.
* This fixes bug #9715 from the POV of BFS, ie. the new operator seems
  to call the constructor on a NULL object on failure.
hrev45634
2013-05-06 21:45:50 +02:00
Oliver Tappe
9abd3e6f53 Fix race condition during build of some file systems.
* make sure the zlib package is available before trying to use zlib.h
2013-05-06 20:01:40 +02:00
Ingo Weinhold
7c6bff1734 Complete outsourcing of zlib
* Add optional packages Zlib and Zlib-devel.
* Simplify the build feature section for zlib and also extract the
  source package.
* Replace all remaining references to the zlib instance in the tree and
  remove it.
2013-05-06 04:37:18 +02:00
Ingo Weinhold
4bee3d6fb9 Add more rules to simplify dealing with build features
* Introduce the notion of build feature attributes and add rules
  SetBuildFeatureAttribute and BuildFeatureAttribute to set respectively
  get a build feature attribute.
* Add rule ExtractBuildFeatureArchives to download and extract archives
  and set build feature attributes to extracted entries.
* Add rule UseBuildFeatureHeaders as a shorthand for getting a build
  feature attribute and adding it as a system header search directory.
2013-05-06 04:31:27 +02:00
Matt Madia
c0f529c38b VL-Gothic fonts is updated to version 20130422. Fixes #9706. hrev45633 2013-05-05 17:16:46 -04:00
Rene Gollent
1b17f7ab00 Fix x86-64 build. hrev45632 2013-05-05 16:57:51 -04:00
Ingo Weinhold
b923a5072e Fix merge defect in ICU optional package declaration 2013-05-05 22:11:55 +02:00
Rene Gollent
1b10489347 Add listener interface to MemoryView.
- When the target address of the memory view changes, an attached
  listener is now notified. This lets the inspector window's text input
  keep in sync with the current address when keyboard navigating the
  memory view.
hrev45631
2013-05-05 16:08:31 -04:00
Ingo Weinhold
5af6169bb2 x86[-64]: Fix arch_cpu_user_strlcpy() for small buffers
The case for small buffers was broken, since scasb operates on edi/rdi,
not esi/rsi.
hrev45630
2013-05-05 15:46:32 -04:00
Michael Lotz
ec4d0e426d BMediaNode: Handle port read syscall interrupts by retrying.
The syscall might be interrupted, especially in signal heavy
applications. In that case we need to retry the read until the timeout
runs out. since the timeout is already absolute we don't need to adjust
anything.
hrev45629
2013-05-05 21:16:45 +02:00
Ingo Weinhold
415f42489f Fix bash's default value for PATH 2013-05-05 21:04:11 +02:00
Rene Gollent
ab2e15ab8c Use default insets for inspector window as well. hrev45628 2013-05-05 13:34:07 -04:00
Oliver Tappe
5be0b187f5 Drop provides-declarations for commands that are no longer provided 2013-05-05 19:30:29 +02:00
Rene Gollent
2253368e6a Implement #8671.
Smarter Zoom behavior for TeamsWindow - resize such that the
team list view's horizontal scrollbar isn't needed.
hrev45627
2013-05-05 13:14:24 -04:00
John Scipione
ddd6037113 Some style fixes in MenuItem hrev45626 2013-05-05 13:12:15 -04:00
Ingo Weinhold
6fa5d4a7c6 Add liblocale symlink until packages have been rebuilt 2013-05-05 18:46:25 +02:00
Ingo Weinhold
bc07db8f0a Declare more package dependencies
Probably still a lot missing, but we want to get rid of the file soon,
anyway.
2013-05-05 18:31:02 +02:00
Michael Lotz
dff48661fd intel_extreme: Remove redundant cast of argument. hrev45625 2013-05-05 18:27:01 +02:00
Michael Lotz
f5d67f3f4d intel_gart: Fix build after argument type change. 2013-05-05 18:26:57 +02:00
Ingo Weinhold
b38b279649 Move package definitions to their own files 2013-05-05 18:25:31 +02:00