History log of /haiku-fatelf/src/kits/tracker/Utilities.h
Revision Date Author Comments
# ea001e58 28-Jul-2012 John Scipione <jscipione@gmail.com>

Round 2 of style changes to Tracker

* focused on 80-char limit fixes.
* also some whitespace and case statement indentation fixes


# 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


# 41836758 02-Mar-2012 Rene Gollent <anevilyak@gmail.com>

Move black/white color constant definitions to header.

Previously, there were two instances of the actual variables, named in
ControlLook.cpp and Utilities.cpp. This caused clashes on gcc4 builds, leading
to various crashes during initialization. Instead we now declare them as
static constants in the header itself as is done for various other interface
color constants elsewhere. Fixes ticket #8358.


# 04847ecc 27-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Fix style coding violation (possibly causing confusion)


# ec9e2f90 27-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

No functional change, avoid confusion in Coverity about exceptions

CID 9248, CID 9250, CID 10844, CID 10977, CID 10978, CID 10979, CID 10980,
CID 10981, CID 10982, CID 10983


# 6f477364 21-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Make BLocaleRoster::GetLocalizedFileName() take a const entry_ref& rather than a non-const entry_ref&. Remove private GetLocalizedFileName() from libtracker and make Tracker and Deskbar use the one in BLocaleRoster.

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


# ed7ee7a4 11-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Localization support for filesystem entries in Tracker and Deskbar (leaf menu). (It appears to work, but is likely incomplete and quite possibly incorrect.) Fix issue with RosterData::Refresh() resulting in a B_LOCALE_CHANGED broadcast, and Deskbar looping. Add a global boolean gLocalizedNamePreferred to avoid calling BLocaleRoster::Default()->IsFilesystemTranslationPreferred() too often from Model instances. Following Tracker code style in libtracker, so as to not mix in too much clean-up.

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


# f5c0a997 03-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Support for showing localized app entries in Deskbar. Just the app entries so far, and not yet the items in the leaf menu. Please review.

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


# 9daff332 28-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* moved NaturalCompare() from libtracker.so to libshared.a, in order
to make it available elsewhere


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


# 567ffaec 19-Oct-2010 Rene Gollent <anevilyak@gmail.com>

FetchNaturalChunk() needs to use isspace() just as NaturalCompare does
when retrieving number chunks. Otherwise we wind up with an infinite
loop if a number chunk is preceded by another whitespace char such as
\t. Fixes a hang observed on Clemens' mail store.



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


# b2323020 11-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* The leading spaces and zeros are now actually skipped, instead of copied first
and then replaced.
* Now considers a space to end a number chunk. In the future, we might want to
think about sorting fractional amounts correctly as well, but I guess that's
not that important for Tracker.


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


# 6a960972 11-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* We cannot use a natural sorting algorithm that only supports int32 - that
cannot be stable for entries with up to B_FILE_NAME_LENGTH (256) bytes.
* Rewrote the natural sorting code to be simpler where possible, but also
supports sorting numbers of arbitrary length.


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


# b3e4ce54 31-Jan-2010 Michael Lotz <mmlr@mlotz.ch>

Use the multibyte aware string functions for typeahead search and filtering so
that special characters can be used as well (umlauts for example).


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


# d2b45aa3 20-Nov-2009 Stephan Aßmus <superstippi@gmx.de>

Avoid an invalid GCC warning by using a union.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34159 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


# 7ce973c6 01-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

Patch by plasm with some modifications by myself: Implement natural sorting
in Tracker. Strings are compared in chunks where the type of each chunk can be
numer or string. Thanks a lot!


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


# 49ad25b3 16-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* The type ahead mechanism did not work correctly in list view mode: instead
of taking the contents of the columns, it would always use the file name
instead.
* That uncovered another bug, though: WidgetText::Text() tried to cast everything
to StringAttributeText, but GenericAttributeText is actually used for most
columns.
* Therefore, GenericAttributeText is now a subclass from StringAttributeText.
* Extended the type ahead to take other columns into account, and made it also
find strings in the middle (like a filter) as a second choice.
* Whitespace cleanup.


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


# 687e327b 19-Jun-2007 Michael Lotz <mmlr@mlotz.ch>

Reworked the handling of periodically updated poses (currently only ones with a volume space bar):

* Addad global list where poses that need periodic updates can be registered with a callback
* Use this mechanism for poses with a volume space bar
* Create only one BVolume when the BPose is created for a volume, instead of every time the free space is calculated
* On Pulse() the global list is used to update all of the registered periodic update poses
* As the poses know their volume, it is no longer necessary to use a BVolumeRoster to loop through each volume on each Pulse()
* Removed the now superfluous SendNotices() mechanism
* Removed corresponding watching / handling of these notices in BPoseView

The BPoseView did a linear search for each volume pose on each Pulse() before. What's more it did this once for each mounted volume as it did get one individual notice for each of them. To get these volumes a BVolumeRoster was used to loop through the volumes, but then the BPose did still create a new BVolume to actually calculate the free space! I'm surprised that it did not suck away more performance with this method...

Anyway, this should bring down BVolume construction and update overhead down to a minimum and hopefully fix ticket #1247.

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


# 4686f4f7 24-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

A little oversight made all icons white on BeOS. This fixes bug #990.


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


# 9ecf9d1c 26-Aug-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge from layout management branch.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18649 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


# 6d01b66d 13-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

GCC 4 fixes by Ingo Weinhold.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14893 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


# ea001e585a588e40404945a1201821da893d2e09 28-Jul-2012 John Scipione <jscipione@gmail.com>

Round 2 of style changes to Tracker

* focused on 80-char limit fixes.
* also some whitespace and case statement indentation fixes


# 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


# 418367589556790e6fb2b2a9cadf62b1408a87c9 02-Mar-2012 Rene Gollent <anevilyak@gmail.com>

Move black/white color constant definitions to header.

Previously, there were two instances of the actual variables, named in
ControlLook.cpp and Utilities.cpp. This caused clashes on gcc4 builds, leading
to various crashes during initialization. Instead we now declare them as
static constants in the header itself as is done for various other interface
color constants elsewhere. Fixes ticket #8358.


# 04847eccdf2a7d2158959b44e4cbf18eb34fdbd4 27-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Fix style coding violation (possibly causing confusion)


# ec9e2f901890930af72f12dcd9fb079e60d0cdba 27-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

No functional change, avoid confusion in Coverity about exceptions

CID 9248, CID 9250, CID 10844, CID 10977, CID 10978, CID 10979, CID 10980,
CID 10981, CID 10982, CID 10983


# 6f477364cc55e3d6d26880c79cada179d9f93f76 21-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Make BLocaleRoster::GetLocalizedFileName() take a const entry_ref& rather than a non-const entry_ref&. Remove private GetLocalizedFileName() from libtracker and make Tracker and Deskbar use the one in BLocaleRoster.

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


# ed7ee7a43256baac60e2345f42fc28897cf5585e 11-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Localization support for filesystem entries in Tracker and Deskbar (leaf menu). (It appears to work, but is likely incomplete and quite possibly incorrect.) Fix issue with RosterData::Refresh() resulting in a B_LOCALE_CHANGED broadcast, and Deskbar looping. Add a global boolean gLocalizedNamePreferred to avoid calling BLocaleRoster::Default()->IsFilesystemTranslationPreferred() too often from Model instances. Following Tracker code style in libtracker, so as to not mix in too much clean-up.

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


# f5c0a9970a3acbabb2289a20fdedcc9d1c7b6b7a 03-Mar-2011 Jonas Sundström <jonas@kirilla.com>

Support for showing localized app entries in Deskbar. Just the app entries so far, and not yet the items in the leaf menu. Please review.

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


# 9daff3323bf8d888dd4748427d1e482a939d0f83 28-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* moved NaturalCompare() from libtracker.so to libshared.a, in order
to make it available elsewhere


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


# 567ffaecb936a12f2cd61787aa0f114ff7df4628 19-Oct-2010 Rene Gollent <anevilyak@gmail.com>

FetchNaturalChunk() needs to use isspace() just as NaturalCompare does
when retrieving number chunks. Otherwise we wind up with an infinite
loop if a number chunk is preceded by another whitespace char such as
\t. Fixes a hang observed on Clemens' mail store.



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


# b2323020771d7cef1f5b98cb664b354a89768ab6 11-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* The leading spaces and zeros are now actually skipped, instead of copied first
and then replaced.
* Now considers a space to end a number chunk. In the future, we might want to
think about sorting fractional amounts correctly as well, but I guess that's
not that important for Tracker.


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


# 6a960972b5349596f2f8f11b65ae71407b7d7bf0 11-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* We cannot use a natural sorting algorithm that only supports int32 - that
cannot be stable for entries with up to B_FILE_NAME_LENGTH (256) bytes.
* Rewrote the natural sorting code to be simpler where possible, but also
supports sorting numbers of arbitrary length.


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


# b3e4ce5422563f8d157a779811c19a452ba102c4 31-Jan-2010 Michael Lotz <mmlr@mlotz.ch>

Use the multibyte aware string functions for typeahead search and filtering so
that special characters can be used as well (umlauts for example).


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


# d2b45aa3ded279afe9658472450ded5eb4c3863a 20-Nov-2009 Stephan Aßmus <superstippi@gmx.de>

Avoid an invalid GCC warning by using a union.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34159 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


# 7ce973c6767b03dfc3a25aaf60e1b83c540ed0c1 01-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

Patch by plasm with some modifications by myself: Implement natural sorting
in Tracker. Strings are compared in chunks where the type of each chunk can be
numer or string. Thanks a lot!


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


# 49ad25b3922a6354639b9fe6325c7c6aa1895e41 16-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* The type ahead mechanism did not work correctly in list view mode: instead
of taking the contents of the columns, it would always use the file name
instead.
* That uncovered another bug, though: WidgetText::Text() tried to cast everything
to StringAttributeText, but GenericAttributeText is actually used for most
columns.
* Therefore, GenericAttributeText is now a subclass from StringAttributeText.
* Extended the type ahead to take other columns into account, and made it also
find strings in the middle (like a filter) as a second choice.
* Whitespace cleanup.


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


# 687e327bace5d8abca3e75ce74a8f532fac5c151 19-Jun-2007 Michael Lotz <mmlr@mlotz.ch>

Reworked the handling of periodically updated poses (currently only ones with a volume space bar):

* Addad global list where poses that need periodic updates can be registered with a callback
* Use this mechanism for poses with a volume space bar
* Create only one BVolume when the BPose is created for a volume, instead of every time the free space is calculated
* On Pulse() the global list is used to update all of the registered periodic update poses
* As the poses know their volume, it is no longer necessary to use a BVolumeRoster to loop through each volume on each Pulse()
* Removed the now superfluous SendNotices() mechanism
* Removed corresponding watching / handling of these notices in BPoseView

The BPoseView did a linear search for each volume pose on each Pulse() before. What's more it did this once for each mounted volume as it did get one individual notice for each of them. To get these volumes a BVolumeRoster was used to loop through the volumes, but then the BPose did still create a new BVolume to actually calculate the free space! I'm surprised that it did not suck away more performance with this method...

Anyway, this should bring down BVolume construction and update overhead down to a minimum and hopefully fix ticket #1247.

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


# 4686f4f71682dba98045cfdb0cc9a24141b3807a 24-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

A little oversight made all icons white on BeOS. This fixes bug #990.


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


# 9ecf9d1c1d4888d341a6eac72112c72d1ae3a4cb 26-Aug-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge from layout management branch.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18649 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


# 6d01b66d300c2841dba033705f120a7f6e709696 13-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

GCC 4 fixes by Ingo Weinhold.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14893 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