* Pull out base class MimeEntryProcessor out of AppMetaMimeCreator.
* Pull class MimeInfoUpdater out of UpdateMimeInfoThread and derive it
from MimeEntryProcessor.
* MimeInfoUpdater: Instead of BMimeType::GuessMimeType(), use
Database::GuessMimeType() directly.
Fixes#9753
This changes the preferred app menu field to no longer resize itself
based on the item width and instead always take up the rest of the
available space in the window. For narrower items this means that there
will be empty space to the right where there wasn't before. For items
wider than the available width of the window (like the example in #9753)
this means that the item will be truncated when selected.
AFAIK this was always a problem and was not caused by my recent work on
menu fields, we just didn't notice it because it's rare that an application
name in English at the default 12pt font size is wider than the available
space.
That being said, this fix is a band aid, the real fix is to convert this
window to use the layout APIs so that if you have an application that is too
wide to fit then the window will resize itself to fit the new item. There are
other some layout problems in this window too. Unfortunately, like Find, this
window has not been updated in aldeck's Tracker layout branch. Luckily,
converting this window to use the layout API is a lot less work than Find was.
If the menu field is not fixed size than the width of the menu bar
should depend on the menu item contents so just do the default and
get the Bounds() without any extra resizing.
Add option -m/--mimedb for specifying one or more directories to be
used as the MIME DB instead of the system MIME DB. Currently only works
with --apps and only non-recursive.
When fully implemented the new feature will be used in the build system
and on Haiku when building packages to generated the MIME DB entries for
applications, so those can be included in the same package. Furthermore
it will be possible to use the MIME DB the build system already
generates to identify files before packaging them.
* This pulls in some more stuff, like libicon and agg which are also
included in libbe_build, now.
* Update a few libbe_build classes and headers needed to get things
building.
* This likely breaks the <build>mimeset build on Haiku.
* 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.
* 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).
* 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".
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.
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.
* 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.
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).
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.
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.
...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.
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.
* 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.
* 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.
- 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.
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.