History log of /haiku/src/kits/tracker/TrackerSettings.cpp
Revision Date Author Comments
# 90510b4a 05-Dec-2023 John Scipione <jscipione@gmail.com>

Tracker: Remove Trash settings remnants

PoseView.cpp changes
* Create DoDelete() and DoMoveToTrash() convenience methods in BPoseView.
- Call DoMoveToTrash() in B_DELETE handler checking Shift.

Tracker: Update Delete warning dialog

This dialog pops up when you Move to Trash with Shift held down.

The Skip Trash version has been deleted since we've decided to
no longer using this settings.

Push Cancel button over to right on the "Delete files" version.

Handle default case in switches so that a weird value is returned it
will Cancel. If BAlert receives B_QUIT_REQUESTED it returns -1 for
example according to the Haiku Book so make sure to handle this case.

Add B_CLOSE_ON_ESCAPE flag and handle that case.

Change-Id: I16c532bfef585081207f1df3edc93f69dec6e529
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7199
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 6307bc57 09-Dec-2023 John Scipione <jscipione@gmail.com>

Tracker: Refactor Default settings to be in one place

Create TrackerDefaults.h to share default setting values between
TrackerSettings.cpp and SettingsView.cpp instead of duplicating
the default value in both places.

There is now one source of truth if we ever want to change a
setting it won't cause regressions to the Defaults and Revert
button state.

TODO Does not yet include Disk auto-mount settings.

Add HideDotFiles to the defaultable list for Windows settings
and make its default false (was true in some places).

Fix issues with the Defaults button not enabling Enable type-
ahead filtering and Generate image thumbnails as it should.

Move default color constants to TrackerDefaults.h, remove TODO.
Rename kSpaceBarAlpha to kDefaultSpaceBarAlpha matching rest.
Create RGBTOHEX(c) macro to convert rgb_color to a (hex) number
for HexScalarValue to set the default space bar colors.

Saving these old hex values in the commit message:
UsedSpaceColor: 0xc000cb00
FreeSpaceColor: 0xc0ffffff
WarningSpaceColor: 0xc0cb0000

Reorder setting to match display order.

I've gone way over 80 in TrackerSettings and SettingsViews due
to long variable names.

Change-Id: Iafd6dfc5e738562d73967558e1f151fc7fed5866
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7196
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# cde5ffa8 30-Sep-2022 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: Enable thumbnail generation by default.

Now that all known crashes and other instabilities relating to it
seem to be solved. Fixes #17726.


# 7f819534 05-Aug-2021 John Scipione <jscipione@gmail.com>

Tracker: Add thumbnail support

Define thumbnail attributes in Attributes.h:
Media:Thumbnail to store the thumbnail,
Media:Thumbnail:CreationTime to see if thumbs need to be regenerated.

Store 128x128 thumbnail in attribute, for icon sizes smaller than
128x128 down-scale the 128x128 thumbnail. Use B_FILTER_BITMAP_BILINEAR
to down-scale the image using the bilinear scaling algorithm which
creates nicer looking thumbnails than the default scaling algorithm.

Store thumbnails as WebP images which compress smaller than PNGs and
fit in the inode better at 128x128.

Check the file's modification time in GetFileIconFromAttr() and compare
it to the thumbnail creation time. If the file has not been modified
since the last time we generated thumbnails return the thumbnail from
the attribute, otherwise fetch a new thumbnail with GetThumbnailIcon().

Add "Generate image thumbnails" Tracker setting. Default is turned off
for now. To generate image thumbnails you must first turn this setting
on in Tracker Windows preferences.

Spawn a get_thumbnail() thread to generate thumbnails and retrieve them
later on from the window thread to fill out into the icon. This should
improve responsiveness of generating thumbnails from a folder with a
lot of images. The generator thread will write the thumbnail data to an
attribute if on writable BFS volume.

If not on writable BFS volume, the generator thread will send the data
back to the original thread through a port by calling write_port().

When the thread is finished creating the thumbnail it sends a message
back to the Tracker application thread to update the pose which
instructs the window thread to look for an thumbnail. It either finds a
thumbnail in an attribute, or picks up the thumbnail data that has been
sent through write_port() using read_port().

This works on both read-write and read-only BFS volumes but it still
depends on the presence of a BEOS:TYPE parameter to have been written
to the volume before it became read-only. Thumbnail generation does not
work on other read-only volumes for example an ISO-9660 CD, but it does
work on read-only BFS volumes for example the BeOS R5 CD.

Move BPrivate::CheckNodeIconHintPrivate() from BNodeInfo to Tracker
Model CheckNodeIconHint(). Create Model::CheckAppIconHint() and look
for a vector icon or mini and large icon in that method. Check that
the base type is directory, volume, trash, desktop, or if executable
call CheckAppIconHint().

Add 1 to temp_name to fix the following warning:
src/kits/tracker/FSUtils.cpp:2437:12: note: 'snprintf' output 3 or more
bytes (assuming 267) into a destination of size 266

Rename temp_name to tempName following our style guidelines. Use
strlcpy() and strlcat() instead of strcpy() to safely copy the string.
This fixes thumbnail generation on 64-bit Haiku.

Change-Id: I7f927a5a1f8cf65e4b1aa1e0eb55bbfae87fd969
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3163
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 8e655993 31-Mar-2015 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: default HideDotFiles to false (again).

As discussed on the ML.


# 4e357263 29-Mar-2015 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: add "hide dotfiles" option to the GUI & enable it by default.

Changing this many lines of code to add a single boolean preference
is absolutely insane. We need a new preference-tracking system, and
one that can be reused in other applications, too.

Fixes #9200.


# 1463a012 22-Jul-2014 John Scipione <jscipione@gmail.com>

Tracker: Initialize pointers, CID 610135-610136


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

Tracker: style fixes to TrackerSettings


# 9437e677 09-Jun-2014 John Scipione <jscipione@gmail.com>

Tracker: Style fixes


# 163a3948 09-Feb-2013 Humdinger <humdingerb@gmail.com>

Revert "Renamed Tracker option "Don't move files to Trash" (#9352)"

This reverts commit 45f77dcd7029914ccd99178dfb333eb68c7af9e5.


# 45f77dcd 06-Jan-2013 Humdinger <humdingerb@gmail.com>

Renamed Tracker option "Don't move files to Trash" (#9352)

Renamed that option as it is the only negatively phrased to
"Move deleted files to Trash first" and also the option below
that to "Ask before deleting for good".
Also renamed every function name etc. in that regard and also
settings string of the Tracker settings file.


# 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


# 5987b2a3 07-Apr-2011 Jonas Sundström <jonas@kirilla.com>

Offer a 'Real name' column in Tracker list view mode, when set to show localized names. As discussed a while back. I honestly don't know if this is such a great idea after all. Name + real name is kind of silly. Ideally it would be labeled in a more logical way, or the feature should be dropped.

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


# 4a7b2e04 07-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Add FormatDateTime function to BLocale
* Use the function to localize the date/time in tracker.


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


# 545ebde0 30-Jan-2010 Michael Lotz <mmlr@mlotz.ch>

Implement type ahead filtering (this time for real and without abusing the
vertically sorted pose list). When enabled typing will filter based on the
currently visible attribute columns. Using shift-space as a delimiter
independent filtering strings can be typed, so you can filter based on multiple
attributes at once to refine results while you type. Filtering stays active
until you cancel it using the escape key. While the filtered result is displayed
all normal file operations can be used. Using the return key while filtering
auto-selects and opens the first filter result, allowing for fast traversal
through directories and directly opening the topmost result.

* Introduces fFilteredPoseList which stores the active filter result. The list
is only used when filtering is currently active, so no syncing is required
otherwise.
* Some minor adjustments to leave out invalidations where non-visible poses are
updated.
* Account for the now possible multiple lists throughout BPoseView.
* Add filter string output to the CountView and made that one a bit wider.
* Added all the settings-cruft for type ahead filtering (defaults to off).


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


# 671dd808 12-Jan-2010 Rene Gollent <anevilyak@gmail.com>

Various cleanups:
* Removed dead/obsolete Integrate Non-boot Desktops code.
* Modified PoseView to ignore the fInvisible attribute of BPoseInfo for now.
This has the net effect that the Desktop folder and /boot/var are no longer
hidden from the user. To go with this change, Tracker no longer forcibly
writes that hidden setting to those folders on access. This feature might
be useful again in the future (especially in conjunction with relocating
the Trash folder somewhere such as the disk root), but is currently somewhat
problematic because those dual-booting with BeOS will still have a Tracker
that force writes those attributes which would bring us back to square one
with respect to showing the Desktop folder when we start respecting the
attribute again. Suggestions welcome. Haiku-only users can remove the
_trk/pinfo_le attribute on those folders to remove the invisibility
in any case.
* TrackerSettings: Removed obsolete desktop integration settings. Also
modified TrackerSettings parser to skip unrecognized settings instead
of aborting the settings file parsing process entirely.

Closes ticket #2872.



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


# 9e59c0f7 03-Sep-2009 Ryan Leavengood <leavengood@gmail.com>

Fix #4407 by making the volume space bars on by default.

+alphabranch


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


# 3831b0dc 18-Feb-2008 Alexandre Deckner <alex@zappotek.com>

- Revert button's first update didn't work since revert data is stored in the Show() method.
- Default data is defined in two places, and was inconsistent.
- Color comparisons could be done with the wrong alpha. note: BColorControl's behavior wrt alpha might differ from R5's.

This fixes part of #254


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


# efd98f31 20-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

The "show shared volumes on Desktop" setting now defaults to true.


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


# e89c2353 06-Feb-2007 Waldemar Kornewald <wkornewald@nowhere.fake>

"Show Folder Location in Title Bar" is now disabled, by default.


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


# 5f5d917a 24-Jan-2007 Ryan Leavengood <leavengood@gmail.com>

Your wish is my command: now only removable read-only volumes have their
desktops integrated in Tracker.


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


# 2395270d 21-Jan-2007 DarkWyrm <darkwyrm@gmail.com>

Label tweaks as agreed upon on list
"List folders first" and "Show Full Path" default to on now


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


# 7befa79a 01-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

Imported SettingsViews.cpp 1.10, FilePanelPriv.cpp 1.14, TrackerSettingsWindow.cpp 1.7,
SettingsViews.h 1.8, FSClipboard.cpp 1.12, PoseView.cpp 1.60,
TrackerSettingsWindow.h 1.2, TrackerSettings.cpp 1.11 from the OpenTracker repository.


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


# 8e655993c32ccb98deceb4bc773d41c539e56f8e 31-Mar-2015 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: default HideDotFiles to false (again).

As discussed on the ML.


# 4e3572635487f5a4fb948640fdeb747f47750e4a 29-Mar-2015 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: add "hide dotfiles" option to the GUI & enable it by default.

Changing this many lines of code to add a single boolean preference
is absolutely insane. We need a new preference-tracking system, and
one that can be reused in other applications, too.

Fixes #9200.


# 1463a012636e0c45e5788ad69bfd9fc6fabc6e96 22-Jul-2014 John Scipione <jscipione@gmail.com>

Tracker: Initialize pointers, CID 610135-610136


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

Tracker: style fixes to TrackerSettings


# 9437e677ba3d5f813929944ae2b09fc37feb8d2d 09-Jun-2014 John Scipione <jscipione@gmail.com>

Tracker: Style fixes


# 163a39483387c5db4156dfcf36e4b48156df30a6 09-Feb-2013 Humdinger <humdingerb@gmail.com>

Revert "Renamed Tracker option "Don't move files to Trash" (#9352)"

This reverts commit 45f77dcd7029914ccd99178dfb333eb68c7af9e5.


# 45f77dcd7029914ccd99178dfb333eb68c7af9e5 06-Jan-2013 Humdinger <humdingerb@gmail.com>

Renamed Tracker option "Don't move files to Trash" (#9352)

Renamed that option as it is the only negatively phrased to
"Move deleted files to Trash first" and also the option below
that to "Ask before deleting for good".
Also renamed every function name etc. in that regard and also
settings string of the Tracker settings file.


# 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


# 5987b2a380151a1ddc4e168114f2df52873f8b3e 07-Apr-2011 Jonas Sundström <jonas@kirilla.com>

Offer a 'Real name' column in Tracker list view mode, when set to show localized names. As discussed a while back. I honestly don't know if this is such a great idea after all. Name + real name is kind of silly. Ideally it would be labeled in a more logical way, or the feature should be dropped.

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


# 4a7b2e0484dc12783c1cf56dd23175ffb7c7649a 07-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Add FormatDateTime function to BLocale
* Use the function to localize the date/time in tracker.


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


# 545ebde00c3d50510a5236de1c5eef25ac21d757 30-Jan-2010 Michael Lotz <mmlr@mlotz.ch>

Implement type ahead filtering (this time for real and without abusing the
vertically sorted pose list). When enabled typing will filter based on the
currently visible attribute columns. Using shift-space as a delimiter
independent filtering strings can be typed, so you can filter based on multiple
attributes at once to refine results while you type. Filtering stays active
until you cancel it using the escape key. While the filtered result is displayed
all normal file operations can be used. Using the return key while filtering
auto-selects and opens the first filter result, allowing for fast traversal
through directories and directly opening the topmost result.

* Introduces fFilteredPoseList which stores the active filter result. The list
is only used when filtering is currently active, so no syncing is required
otherwise.
* Some minor adjustments to leave out invalidations where non-visible poses are
updated.
* Account for the now possible multiple lists throughout BPoseView.
* Add filter string output to the CountView and made that one a bit wider.
* Added all the settings-cruft for type ahead filtering (defaults to off).


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


# 671dd808619ef6043eca11b09a193d877181d10f 12-Jan-2010 Rene Gollent <anevilyak@gmail.com>

Various cleanups:
* Removed dead/obsolete Integrate Non-boot Desktops code.
* Modified PoseView to ignore the fInvisible attribute of BPoseInfo for now.
This has the net effect that the Desktop folder and /boot/var are no longer
hidden from the user. To go with this change, Tracker no longer forcibly
writes that hidden setting to those folders on access. This feature might
be useful again in the future (especially in conjunction with relocating
the Trash folder somewhere such as the disk root), but is currently somewhat
problematic because those dual-booting with BeOS will still have a Tracker
that force writes those attributes which would bring us back to square one
with respect to showing the Desktop folder when we start respecting the
attribute again. Suggestions welcome. Haiku-only users can remove the
_trk/pinfo_le attribute on those folders to remove the invisibility
in any case.
* TrackerSettings: Removed obsolete desktop integration settings. Also
modified TrackerSettings parser to skip unrecognized settings instead
of aborting the settings file parsing process entirely.

Closes ticket #2872.



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


# 9e59c0f7b9a6277090f5dc00572818ede87b566d 03-Sep-2009 Ryan Leavengood <leavengood@gmail.com>

Fix #4407 by making the volume space bars on by default.

+alphabranch


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


# 3831b0dcd0fe02d90c88cf92adaa756fb3e5b8c7 18-Feb-2008 Alexandre Deckner <alex@zappotek.com>

- Revert button's first update didn't work since revert data is stored in the Show() method.
- Default data is defined in two places, and was inconsistent.
- Color comparisons could be done with the wrong alpha. note: BColorControl's behavior wrt alpha might differ from R5's.

This fixes part of #254


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


# efd98f31b28131c9c6972e12dc7da6f74f954eb8 20-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

The "show shared volumes on Desktop" setting now defaults to true.


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


# e89c235337a6f0e900fbff5f9a141f4acb593d59 06-Feb-2007 Waldemar Kornewald <wkornewald@nowhere.fake>

"Show Folder Location in Title Bar" is now disabled, by default.


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


# 5f5d917ad1f9dc4eeafffe03aed29d88c111269b 24-Jan-2007 Ryan Leavengood <leavengood@gmail.com>

Your wish is my command: now only removable read-only volumes have their
desktops integrated in Tracker.


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


# 2395270daa4d7ea80477d12aa0d417f61e36601d 21-Jan-2007 DarkWyrm <darkwyrm@gmail.com>

Label tweaks as agreed upon on list
"List folders first" and "Show Full Path" default to on now


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


# 7befa79ace38aeecb9ceb86e7244c6d6747fd888 01-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

Imported SettingsViews.cpp 1.10, FilePanelPriv.cpp 1.14, TrackerSettingsWindow.cpp 1.7,
SettingsViews.h 1.8, FSClipboard.cpp 1.12, PoseView.cpp 1.60,
TrackerSettingsWindow.h 1.2, TrackerSettings.cpp 1.11 from the OpenTracker repository.


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