History log of /haiku/src/kits/tracker/MountMenu.cpp
Revision Date Author Comments
# 183b85dd 12-Jan-2023 xoblite <haiku@xoblite.net>

Tracker: NavMenu and MountMenu should not set font themselves (inherit from BMenu instead)

Change-Id: Ie04908ebb1c05bd2abe19e8574bae0fa1cf47e1a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5990
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 0c973c94 26-Aug-2022 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: Refactor IconCache size handling and usages.

* Instead of taking an icon_size, which we were having to cast
random integers to anyway, just take a BSize and convert internally
as needed. This simplifies a lot of usages of IconCache methods.

* Compute what B_MINI_ICON size will be at startup. This way,
we do not wind up caching "mini" icons in the fLarge*Icon variables
under HiDPI.

This does have a downside that if anything actually
does try to fetch "true mini" (16x16) icons when the real
ComposeIconSize(B_MINI_ICON) is larger than that, it will wind up
(confusingly) in fLarge*Icon, but that should not cause problems
and after this commit should not happen at all, anyway.

* Make mini-icon-mode use ComposeSize instead of the hardcoded 16x16,
and adjust metrics computations around it.

* Fetch larger icons in MountMenu logic. Also use BString::SetToFormat.

* Remove an unused, deprecated method from BPoseView.

* Rename variables in thumbnail generation code to match new behavior.


# dbe62cc7 20-Jun-2014 John Scipione <jscipione@gmail.com>

Tracker: style fixes to MountMenu class


# adf8818e 05-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Compilation fixes for Terminal, add to image.

It runs, but has shown up various bugs: app_server crashes, kernel
panics, rendering problems. Working on fixing these now.


# b05aa8b5 27-Jul-2012 John Scipione <jscipione@gmail.com>

Style changes in Tracker, no functional change.

Manual whitespace cleanup
Change instances of const char * to const char*
Convert /* */ C style comments to // C++ style comments


# 546208a5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 5c6b9eb0 23-Feb-2012 Jerome Duval <jerome.duval@gmail.com>

Some fixes for GCC 4.6 warning: variable set but not used


# 7b80b5d5 17-Sep-2010 Alexandre Deckner <alex@zappotek.com>

* Use multiple translate contexts in Tracker for easier translation


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38691 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4ed28a57 12-Jul-2010 Alexandre Deckner <alex@zappotek.com>

* Applied libtracker localization patch from T.Murai (a.k.a mt) with some modifications (see below).
* Functional modifications:
Reworked InfoWindow file size localization, the patch removed number formating (size in bytes) and was too complicated to my taste.
Replaced the uses of sprintf with the safer snprintf.
Changed signature to x-vnd.Haiku-libtracker instead of x-vnd.Haiku-libTracker (to be consistent with the binary name)
* Style modifications:
Reworked lots of 80 char indenting (probably due to the now shorter line lengths since your previous patch that wasn't using the macros)
Lots of missing brackets when "if's" becomes multiline.
Other minor fixes.

Noticed a few uses of FindItem on translated names that might become problematic someday. Added some TODO's regarding localization of file sizes. Localization might still be
optimized a bit regarding the produced en.catkeys

Note to translators: .catkeys files should be placed in haikusource/data/catalogs/kits/tracker though beware as the base en.catkeys might change
slightly in the next days.
Note to users: As with any other app you need to restart Tracker (or any aother app using libtracker's filepanels) for it to pick the locale setting. E.g: use 'quit an
application' and 'restart Tracker' from process controller.

Thanks a lot T.Murai


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37492 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aa61ee48 17-Jan-2010 Rene Gollent <anevilyak@gmail.com>

Cleaned up legacy icon mappings and add some missing resource definitions to
TrackerIcons.h. Also removed the setup for the folder icon mimetype in
TrackerInitialState, as it was using a non-existent resource ID to do so with.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35118 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 82d8aaf8 12-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Humdinger:
Changed strings to sentence case. The changes in StatusWindow and
FSUtils are missing because I have some unfinished work in progress
in those files. Will commit them separately. This is case-tracker.diff
from #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35047 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c1b274fd 12-Oct-2009 Stephan Aßmus <superstippi@gmx.de>

* Removed auto mounter code from Tracker.
* Tracker forwards auto mounter related messages to the mount_server.
* Rewrote AutoMounterSettings to not know AutoMounter and use
the layout-management.
* Moved the "Eject When Unmounting" setting into the Mount Settings.
* Launch the mount_server during boot, but delay the script until all
previously mounted volumes have been mounted. This solves some annoying
timing bugs during boot. For example when you have desktop backgrounds
on other volumes and some servers don't deal well with the situation
of links to add-ons on other volumes becoming valid with a delay...
* src/kits/tracker/Commands.h includes the private headers/private/
mount/MountServer.h header, which made adjustments to the DiskUsage
Jamfile necessary.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33555 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4fba3522 11-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed src/kits/tracker/OpenHashTable.h. The shared version in
headers/private/shared is newer, though with small interface changes.
* Removed the unnecessary Debug.h include in
headers/private/shared/ObjectList.h.
* Adjusted sources using these headers, mostly by adding missing includes.
* Lots of automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30123 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 06ba3f0a 17-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dcdf3137 03-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Unnamed volumes now get the disk size instead of "unnamed" in their mount
menu name, ie. "(unnamed Ext2 File System)" could become "(12.5 GB Ext2 File System)".
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26242 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 47908b9a 10-Apr-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fixed warnings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24895 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 64866164 19-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

* To get away with that empty mount menu, it now at least shows all mounted and
mountable volumes - there are no icons yet, and it will also not work at all,
that is, you cannot mount/unmount any volumes yet.
* Got rid of _INCLUDES_CLASS_DEVICE_MAP in MountMenu.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19870 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cd94fdda 28-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Tracker wrote icons with the wrong type at several places.
* Also replaced all B_COLOR_8_BIT with the B_CMAP8 constant.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16909 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 77187226 16-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Was broken when the mounting feature is disabled. This fixes bug #132.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16436 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 02be5353 22-May-2005 Axel Dörfler <axeld@pinc-software.de>

Added libtracker.so to the repository and the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12772 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dbe62cc77f6a4cc2a2e282107235b178421b0c83 20-Jun-2014 John Scipione <jscipione@gmail.com>

Tracker: style fixes to MountMenu class


# adf8818ec004e8a20614523f3e893303ea318642 05-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Compilation fixes for Terminal, add to image.

It runs, but has shown up various bugs: app_server crashes, kernel
panics, rendering problems. Working on fixing these now.


# b05aa8b5b16e5b4f420a35c37805c6387df98737 27-Jul-2012 John Scipione <jscipione@gmail.com>

Style changes in Tracker, no functional change.

Manual whitespace cleanup
Change instances of const char * to const char*
Convert /* */ C style comments to // C++ style comments


# 546208a53940a26c6379c48a7854ade1a8250fc5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 5c6b9eb00d0d623c12f72eb82a471cb4c71f4f33 23-Feb-2012 Jerome Duval <jerome.duval@gmail.com>

Some fixes for GCC 4.6 warning: variable set but not used


# 7b80b5d5181053872dd475b1c559bc010914a31c 17-Sep-2010 Alexandre Deckner <alex@zappotek.com>

* Use multiple translate contexts in Tracker for easier translation


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38691 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4ed28a571a7d5f7f13b5b4636fabfeabdfddd40b 12-Jul-2010 Alexandre Deckner <alex@zappotek.com>

* Applied libtracker localization patch from T.Murai (a.k.a mt) with some modifications (see below).
* Functional modifications:
Reworked InfoWindow file size localization, the patch removed number formating (size in bytes) and was too complicated to my taste.
Replaced the uses of sprintf with the safer snprintf.
Changed signature to x-vnd.Haiku-libtracker instead of x-vnd.Haiku-libTracker (to be consistent with the binary name)
* Style modifications:
Reworked lots of 80 char indenting (probably due to the now shorter line lengths since your previous patch that wasn't using the macros)
Lots of missing brackets when "if's" becomes multiline.
Other minor fixes.

Noticed a few uses of FindItem on translated names that might become problematic someday. Added some TODO's regarding localization of file sizes. Localization might still be
optimized a bit regarding the produced en.catkeys

Note to translators: .catkeys files should be placed in haikusource/data/catalogs/kits/tracker though beware as the base en.catkeys might change
slightly in the next days.
Note to users: As with any other app you need to restart Tracker (or any aother app using libtracker's filepanels) for it to pick the locale setting. E.g: use 'quit an
application' and 'restart Tracker' from process controller.

Thanks a lot T.Murai


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37492 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aa61ee48ef2a616cf1b459f335f97b34de83f66f 17-Jan-2010 Rene Gollent <anevilyak@gmail.com>

Cleaned up legacy icon mappings and add some missing resource definitions to
TrackerIcons.h. Also removed the setup for the folder icon mimetype in
TrackerInitialState, as it was using a non-existent resource ID to do so with.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35118 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 82d8aaf85a8c1ad19f69637468102ca08040facf 12-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Humdinger:
Changed strings to sentence case. The changes in StatusWindow and
FSUtils are missing because I have some unfinished work in progress
in those files. Will commit them separately. This is case-tracker.diff
from #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35047 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c1b274fd6796be287dcd7cb81a105c91c2152629 12-Oct-2009 Stephan Aßmus <superstippi@gmx.de>

* Removed auto mounter code from Tracker.
* Tracker forwards auto mounter related messages to the mount_server.
* Rewrote AutoMounterSettings to not know AutoMounter and use
the layout-management.
* Moved the "Eject When Unmounting" setting into the Mount Settings.
* Launch the mount_server during boot, but delay the script until all
previously mounted volumes have been mounted. This solves some annoying
timing bugs during boot. For example when you have desktop backgrounds
on other volumes and some servers don't deal well with the situation
of links to add-ons on other volumes becoming valid with a delay...
* src/kits/tracker/Commands.h includes the private headers/private/
mount/MountServer.h header, which made adjustments to the DiskUsage
Jamfile necessary.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33555 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4fba3522e02906506b6c713ef5b57d72e9458fef 11-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed src/kits/tracker/OpenHashTable.h. The shared version in
headers/private/shared is newer, though with small interface changes.
* Removed the unnecessary Debug.h include in
headers/private/shared/ObjectList.h.
* Adjusted sources using these headers, mostly by adding missing includes.
* Lots of automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30123 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 06ba3f0acb06fd0a5818f2609886fe1d35fbfbd3 17-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
a predefined location on disk (not yet implemented). This would also allow
to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
icons for those.
- B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
variants that can also retrieve the icon data directly (like
BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dcdf3137e1945ff01f625682595a961c7a246e27 03-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Unnamed volumes now get the disk size instead of "unnamed" in their mount
menu name, ie. "(unnamed Ext2 File System)" could become "(12.5 GB Ext2 File System)".
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26242 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 47908b9ae32aa7cacb2651e6b33b880f0d6ae2bd 10-Apr-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

fixed warnings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24895 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 64866164235ad0456de526824185af7642d4d87e 19-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

* To get away with that empty mount menu, it now at least shows all mounted and
mountable volumes - there are no icons yet, and it will also not work at all,
that is, you cannot mount/unmount any volumes yet.
* Got rid of _INCLUDES_CLASS_DEVICE_MAP in MountMenu.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19870 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cd94fddab267dad9683764eb2606994ae38479c0 28-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Tracker wrote icons with the wrong type at several places.
* Also replaced all B_COLOR_8_BIT with the B_CMAP8 constant.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16909 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 77187226cd201207c54da69be21ef06ea2c7dfe6 16-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

Was broken when the mounting feature is disabled. This fixes bug #132.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16436 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 02be5353fd41ea40007a382e13f007eaf6b5a3a0 22-May-2005 Axel Dörfler <axeld@pinc-software.de>

Added libtracker.so to the repository and the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12772 a95241bf-73f2-0310-859d-f6bbb57e9c96