Commit Graph

46470 Commits

Author SHA1 Message Date
Ingo Weinhold 00090d290d boot loader: print max heap usage info before entering kernel 2013-05-09 03:14:35 +02:00
Ingo Weinhold c92c12d71a libroot_build: Fix incorrect skipDot check in find_dir_entry()
Would result in the _kern_open_parent_dir() failing for "/" and maybe in
other cases as well.
2013-05-09 01:48:36 +02:00
Ingo Weinhold 865ab2816d Pull class MimeInfoUpdater out of UpdateMimeInfoThread
* 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.
2013-05-09 01:48:36 +02:00
John Scipione 879020baf1 Info: Set fixed size true for pref app menu field
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.
2013-05-08 14:26:45 -04:00
John Scipione ec1f08fb05 Resize menu field menu bar iff fFixedSize is true
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.
2013-05-08 14:26:45 -04:00
John Scipione a61d468cf9 BMenuItem: Round to prevent unneeded truncation
The case I fear is if frameWidth is 99.999999 and labelWidth is 100.0
it will attempt to perform a truncation unnecessarily.
2013-05-08 14:26:44 -04:00
Jérôme Duval a130bab351 ext2: fixes 64 bit warnings 2013-05-08 20:10:33 +02:00
Rene Gollent df720531e3 Use B_USE_SMALL_{SPACING,INSETS} as suggested by Axel. 2013-05-07 22:59:35 -04:00
Ingo Weinhold 9ea1940c48 mimeset: WIP to support custom MIME DB directories
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.
2013-05-08 04:51:48 +02:00
Ingo Weinhold d0815ca03b Add private MIME DB classes to libbe_build
* 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.
2013-05-08 04:39:56 +02:00
Ingo Weinhold 57a7a6b916 mime/database_support: Make buildable for host platform 2013-05-08 04:29:18 +02:00
Ingo Weinhold ed92790ce5 mime/Database::Install(): Fix subtype without supertype case
If the supertype directory for a given subtype didn't exist yet, the
method would fail.
2013-05-08 04:28:31 +02:00
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
2013-05-06 21:16:24 -04:00
Rene Gollent 4efba5fd99 Use default spacing for inspector's groups too. 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.
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.
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.
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.
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 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.
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. 2013-05-05 17:16:46 -04:00
Rene Gollent 1b17f7ab00 Fix x86-64 build. 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.
2013-05-05 16:08:31 -04:00