History log of /haiku/src/kits/tracker/Pose.cpp
Revision Date Author Comments
# 2b6ccde0 25-Apr-2023 John Scipione <jscipione@gmail.com>

Tracker: Disable edit menu items on ro volumes

... such as virtual directories or read-only media.
Also applies to open/save panels.

Menu items disabled on read-only volumes:
* New >
* Duplicate
* Move to Trash
* Move To >
* Cut
* Paste

Other reasons a menu item is disabled:
* Duplicate, Move To Trash, Cut, Copy, Move to >,
Copy to >, Create link > and Identify require a
selection.
* Paste requires something in your clipboard.
* Edit name requires a single item is selected.

Edit name is permitted on a read-only volume so
that you may copy the name. However the name is
not editable, you may only select and copy.

Pop system folder warning dialog on Edit name
commit instead, this way you won't see the dialog
if you just want to copy the name.

Move "Create link here" option last in the right-
click drag menu. Disable "Move here" if source or
dest is read-only, rest if dest is read-only.

Ignore Paste to virtual directory, (even more)
but permit Edit name.

Allow drag-and-drop to virtual directory but alert
and disable all right-click drag menu items like
other read-only directories.

Tint window backgrounds on all read-only windows
darker, not just on virtual and query folders.
Automatically switch the background color as you
navigate in and out of read-only folders.

Fix highlight color on column resize when background
color is not white. Fix "reverse video" effect so
that the highlight color is the inverse of the
background color. On Desktop however, highlight
color is always black or white.

Do not alter focus in save dialogs after initial
focus on the file name because focus on the pose
view is required for cut/copy/paste to work.

Make Edit Name work in file open/save dialogs and
make Cut/Copy/Paste work while editing file name.

Make Select all work in Edit name.

Duplicate code cleanup:

NameAttributeText::CommitEditedTextFlavor() and
HeaderView::FinishEditingTitle() call common
EditModelName() function in FSUtils.

RealNameAttributeText inherits from
NameAttributeText and calls its inherited
CommitEditedTextFlavor() method.

The alert text is defined in just one place in
FSUtils ShouldEditRefName() instead of three.
Consequently file name changed in the info window
can now be undone.

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


# b7dd18b2 02-May-2023 John Scipione <jscipione@gmail.com>

Tracker: Style fixes only

... including whitespace, brackets, rename loc to where or
location, add a pragma.

Replace min_c with std::min.
Replace BPoint(0, 0) with B_ORIGIN
Use make_color() function to make static rgb_color objects.

Change-Id: I47a4e5e5f0e7038643baca7539d211350bbb8f20
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6404
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>


# 6d791f20 08-Dec-2022 CodeforEvolution <secundaja@gmail.com>

Tracker: Fix selected text drawing with light desktop colors, and delayed update for inactive text colors on desktop

This fixes two separate issues in relation to Tracker:
1) If the desktop base color is set to a lighter color (such that black text is used for desktop items),
clicking on another window and then dragging that window over the item leads
to a black selection and text color, leaving the text unreadable. (Fix in Pose.cpp)

2) After fixing the first problem, I noticed that Tracker still didn't immediately update the color of inactive,
though still selected desktop items until another window was dragged over them. (Fix in DeskWindow.cpp)

Change-Id: I43653e23c69a7666ed8a53751b0f65622c8dc596
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5882
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: nephele <nep@packageloss.eu>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 054c1b27 31-Aug-2022 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: Overhaul list column size initialization and storage.

Mostly for HiDPI, but this also cleans up the code in general, too.

* Apply a scale-factor when loading and serializing column size/offsets
in ViewState.

* Do not hard-code offset values for default columns but let
BPoseView::AddColumn() compute them manually instead.

* Change BPoseView::AddColumn() to support being called during
early initialization and utilize it in SetUpDefaultColumns...().

* When adding deserialized columns to a BPoseView, always realign
the offsets instead of just doing sanity checking. The rationale here
is that the first time the TitleView is touched, it will do this
anyway, and cause "snapping" or drawing glitches if the alignment
is not as expected.

If it was actually somehow an intended feature that non-adjacent
columns can be displayed, changes are needed in TitleView and PoseView
to properly support this without triggering redraw glitches.

I still saw some very slight redraw glitches (e.g. column contents
shifting by 1px) at higher font sizes; however, Tracker before this
commit had far more of those glitches (this commit seems to resolve
a number of them.)

Tested with 12pt, 18pt, and 20pt font sizes; this seems to work
pretty well. But if you see strange behavior or more redraw glitches
than there were previously, please do file a ticket.


# 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.


# 50107f9f 20-Jun-2021 John Scipione <jscipione@gmail.com>

Tracker: fix last minute mini icon mode bugs

Pose::CalcRect() assumed top is at icon top in mini-icon mode. This
is not true for larger font sizes where the top of the text is above
the top of the icon. Calculate top and bottom based on font and icon
size matching the calculation in TextWidget::CalcRectCommon(). This
fixes a highlight redraw bug in mini icon mode at larger font sizes.

Push Edit name right 2px to match label position (in mini-icon mode.)

Round to integer to help with 1px off bug. Edit name box is still off
by 1px from the label for some font families and sizes.

Change-Id: Ibba897d6f3c7a879631adedada5cd59d2071191a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4204
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 61282f95 10-Jan-2021 Adrien Destugues <adrien.destugues@opensource.viveris.fr>

Tracker: fix invisible selection text in disabled windows

Regression introduced in hrev54742 which used DeskTextColor() on a
non-desktop view. The view color isn't set anywhere in that case and
does not match the background color, which led to drawing white text on
a white background.

Moreover, a second bug was stacked on that: the selection is drawn in
"reverse video" (using the document color for the text and document text
color for the background) only for active windows. For inactive ones, it
is drawn normally, and then a middle-grey rectangle is alpha blended on
top. Add a comment to clarify that and reintroduce the ckeck that had
been removed.

Also replace the hardcoded black for the selection background, so it
will be more easily visible for people using dark mode.

Fixes #16627.


# 84c62f1d 02-May-2017 Brian Hill <supernova@warpmail.net>

Fix drawing of Tracker volume icon freespace bar

For icon sizes less than B_LARGE_ICON (32) the icon size was
incorrectly just set to B_MINI_ICON (16) causing an error in where
horizontally the free space bar was drawn for icon sizes between 16
and 32. This has never really been an issue because the predefined
options in Tracker do not allow selecting an icon size between 16 and
32, but this fix will prevent drawing issues in the future if that
ever does become an option.


# b01e48c6 22-Jan-2017 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: Warn if there is < 5% of free space left on the drive.

Previously it would warn only below 20MB of free space, if this was
less than 10% of the drive's capacity. This is obviously ridiculous now.
The first suggested patch used a simple 10% as the new criteria, but that's
a little high -- 100GB out of a 1TB drive is still a bunch of space left.
5% seems like a more appropriate choice here, and preserves a behavior
closer to the original 20MB on smaller (older) drives (5% of 500MB = 25MB.)

If this turns out to be too annoying for some users, we can make the check
more refined than it is now, but I don't think that will be necessary.

Fixes #4520.


# ee20ff95 01-Sep-2016 John Scipione <jscipione@gmail.com>

Tracker: Style fixes

More style fixes


# 4cb40196 20-Oct-2015 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: Remove needless NULL check before delete.

Thanks John!


# c746acc2 21-Oct-2015 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: Delete own BTextWidgets in BPose destructor.

Fixes a memory leak, and #12393.


# 46dd7d50 09-Sep-2015 Axel Dörfler <axeld@pinc-software.de>

Tracker: Fixed vertical list icon position.

* Instead of drawing it at the bottom of the line, draw it in the
middle of it.


# 9e78efbb 27-Feb-2015 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: delete un-needed #includes.

All of these header files are already included by the .h file that
corresponds to the .cpp file.


# c8c5ac51 26-Feb-2015 John Scipione <jscipione@gmail.com>

Tracker: Fix double delete

fWidgetList is a BObjectList, the items are deleted when removed already so we
should not have the BObjectList delete them for us too. Instead, let's just turn
that off so we can delete the items ourselves one time.


# 8c2813c1 25-Feb-2015 John Scipione <jscipione@gmail.com>

Tracker: Style fixes


# 10489e89 22-Jul-2014 John Scipione <jscipione@gmail.com>

Tracker: check if widget == NULL, CID 600509

Add a few helpful comments too.


# f13a47d2 14-Jul-2014 John Scipione <jscipione@gmail.com>

Tracker: Pose style fixes kind => which


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

Tracker: style fixes to Pose class


# db416834 02-Jan-2013 Matt Madia <mattmadia@gmail.com>

Automatic whitespace cleanup. No functional change.


# c2535dc4 07-Aug-2012 Philippe Saint-Pierre <stpere@gmail.com>

Tracker: various issues regarding filtering

1. A BRefFilter-ed PoseView wouldn't keep monitoring files after its opening
thus not picking up files that happen to fit the filter thereafter (mime attr
updated, etc..)
2. A filtered PoseView wouldn't get updated when:
a) a column was added or removed
b) a file was renamed
c) a file was moved
3. Harmonize the way BRefFiltering and Type-ahead filtering are working. Both
can be used together.
4. The handler for AttributeChanged() wasn't working properly if link(s) of a
changed model was/were its siblings.
5. Broken links weren't detected/updated (it nows monitor the lost target
parent directory, and wait for the target creation to show the link fixed)

This is a big change (even more considering the 'critical-ness' of the component)
Testing is MUCH welcome!

Should fix #4254, #5381, #1717 (and maybe others)


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

WIP: Yet more style fixes, mostly 80 char violations.


# 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


# c5b852f9 14-Jan-2011 Rene Gollent <anevilyak@gmail.com>

Patch by Shade: If the volume does not return a valid capacity, don't crash with a division by zero error. Resolves #7103. Thanks!



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


# bdb32d10 04-May-2010 Rene Gollent <anevilyak@gmail.com>

Simplify the check for what volumes to show free space bars on. They are
now shown only on read/write volumes that are not CDDA.



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


# 725ad924 20-Aug-2009 Alexandre Deckner <alex@zappotek.com>

* When checking a draw/updateRect intersection, an offset was added too early
making the check fail when Pose::Draw was called with a non zero offset.
Fixes #4289
* Fixed an x/y typo (that had no really visible effect, the fade effect might
need some more indepth review)
* Removed dead code, and replaced an inlined intersection check with
BRect::Intersect.



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


# 50f1b82d 19-Aug-2009 Alexandre Deckner <alex@zappotek.com>

* Rewrote rename-click detection to be more usable. The code is much smaller
and is based on the pose selection time, not on click time. It is more
robust and since the selection might have been by click, keyboard or
selection rect, it makes the behavior very pleasant (in my opinion) for
multiselections. Try and tell me!
* Disabled the modifiers (first click editing). Too many of them, and
conflicting with other usages, i'd like your opinions/preferences.
* Removed old, hackish and now unused DelayedEdit/SetDelayedEdit stuff.

Fixes #3617



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


# 6a71afb0 08-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

Sorry for mixing some cleanups into this patch...
* When changing icon sizes, invalidate before scrolling. This causes silent
scrolling in app_server and avoids a visual jerk. Everything needs to be
re-drawn at the new icon size anyways.
* Removed the fUpdateRegion member from BPoseView. It was supposed to make
drawing quicker, but it only made it slower. Checking for intersection with
the update rect passed to Draw() should be much more straight forward and
does not involve app_server communication...
* Refactored some misnamed methods, ScrollIntoView() would always draw and
only sometimes scroll - I couldn't agree with that.
* There is a very confusing mix of "fullDraw" and "minimalRect" booleans which
seem to be used with wrong semantics. The minimalRect flag passed to BPose::
CalcRect() means to get the pose rect for the icon and the first column only,
not all columns. Contrary to that, some pose rect calculation happens with
minimalRect == fullDraw... I tried to fix some of that.
* The visible changes of this patch are when adding poses. The
SynchronousUpate() wasn't working so well, I made it work reliably by invoking
Invalidate() and Window()->UpdateIfNeeded(), which also takes care of any
drawing that the app_server has to do for the background. And it's flicker
free in double buffered mode...
-> This fixes poses being drawn multiple times and the text getting darker.
* And there was another bug when adding poses. The extent (bottom of last item
in list view for example) can be just above the current view bounds. When the
next item is added above the view bounds, then the extent scrolls into view,
but there is nothing to be scrolled in this case. srcRect is still invalid
and so is dstRect. But destRect should be valid in this case.
-> This fixes some poses being cut off at the bottom when opening Tracker
windows.


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


# 96da4b41 07-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

* Fix the completely broken desktop icon size changing which I introduced
yesterday. It needs to auto-place icons which go out of view or underneath
the deskbar or a replicant. Also it obviously cannot scroll to keep the
view "centered" as normal Tracker windows.
* Fix/improve the desktop context menu with regards to icon size options. It
also displays the shortcuts, which now work on the desktop too.
* When doing an icon cleanup on the desktop, not only the deskbar is avoided,
but also replicant views.


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


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

* Changing the icon size will now work more like simply scaling/zooming the
view. BPose converts the scale in SetLocation() and Location(), which does
_not_ affect performance for list mode, BTW. So that should be fine.
* The center of the pose view is now locked when changing the icon size.


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


# e70b6d95 06-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

* Cleanup in the icon mode stuff. kScaleIconMode is gone. There is simply
kIconMode and it can have different sizes.
* The "Icon Mode" super menu item is marked, when in icon mode, as well as
the size item in it's sub menu.
* When switching from mini icon mode or list mode back into icon mode, the
previous icon size is now restored. This also works when the folder has
been closed meanwhile. (The on-disk format for view state has changed, so
your folders will open with default values.)


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


# 95da0645 14-Feb-2009 Rene Gollent <anevilyak@gmail.com>

Some pose performance improvements by aldeck and myself:
1) We don't need to call FindPose() on every pose as we're freshly adding it,
and a duplicate should never happen in this circumstance (the FindPose() is still there if
Tracker is compiled in debug mode however.
2) Adjust the FSClipboard calls such that the locking is optional. This allows us to lock
once per CreatePoses group rather than once per pose.

Together these changes make for a significant performance improvement when it comes to
populating a large folder.



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


# e9842421 31-Oct-2008 Alexandre Deckner <alex@zappotek.com>

* On date format change, remove the need for the synchronous call to
DrawViewCommon(), simply invalidate since the logic is simplified now,
see below.
* Reworked the way TimeAttributeText was updated when date format is
changed. Got rid of the recalculatText flag propagation, it was broken
since forever anyway (was here on r5 max4.1): It was only updating
visible poses and wasn't robust in certain cases. Besides, it was
cluttering the code on several layers upfront only for date format changes.


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


# 1de41c15 06-Sep-2007 Stephan Aßmus <superstippi@gmx.de>

* fixed tracker single click selection.

If I may say so, I find this code extremely messy and in desperate need for
refactoring. The bad news is that selection flickers now - the columns which
don't need to be drawn at all. I printed some debugging info in
BTextWidget::Draw() and it appears that for a single selection state change,
at least four invokations of BTextWidget::Draw() will result. Sometimes many
more. Since the code calculated the dirty rects wrongly in many places, it
appears that this bug might not have shown before. Like I said, the code is
a mess and there is not a single place for invalidating poses, so I am not
surprised why tons of invalidations arrive. :-/ Maybe I should make myself
more familiar with Tracker... or revert my text outline patch. :-P


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


# c9f80156 28-Aug-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed DEBUB build.


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


# 5c34aef7 22-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

changed the meaning of the "icon view label background" Tracker setting:
* it is replaced by a "icon view label outline" feature that renders a black
or white outline around the text of a label under an icon. This can be used
for background images that have a lot of contrast and is visually more
pleasing (IMHO) than the text box in the workspace color (but the outline
could of course still be improved as well)
the outline or "false bold width" feature is a new BFont feature in Haiku
* Tracker appeared to have a disabled feature to install default background
images, I enabled this feature and rewrote it a bit to use our big logo
from the artwork folder, the placement is for 800x600, so not optimal for
larger desktops, but at least it is shown by default on new installations
or rather "fresh" images
* changed the way the dotted underline is rendered under links, accidentally,
this fixes the bug that it was not dotted at all since a while, which is
a bug in app_server or BView not tracking the need to update the drawing
pattern in certain situations (this bug needs to be fixed too of course)


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


# 7fb6186f 29-Aug-2006 Stephan Aßmus <superstippi@gmx.de>

* integration of vector icons with the registrar and the mime data base
* additional versions of SetIcon[ForType] and GetIcon[ForType] in BMimeType
and BAppFileInfo, which handle flat vector icon data
* changes in Tracker to support scalable icons (currently broken for
non-vector icons and needs cleanup) and drawing icons correctly with alpha
channel (large parts of this work done by Michael Lotz)

If someone feels like looking over the changes, that would be much
appreciated! :-)


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


# 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


# 46dd7d5077c0ef26d079ae007f158abdec06de83 09-Sep-2015 Axel Dörfler <axeld@pinc-software.de>

Tracker: Fixed vertical list icon position.

* Instead of drawing it at the bottom of the line, draw it in the
middle of it.


# 9e78efbb4d21a6821be64e5053defd99ed364aea 27-Feb-2015 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: delete un-needed #includes.

All of these header files are already included by the .h file that
corresponds to the .cpp file.


# c8c5ac51070f79ecb3f4ebe64815cf260a4faefd 26-Feb-2015 John Scipione <jscipione@gmail.com>

Tracker: Fix double delete

fWidgetList is a BObjectList, the items are deleted when removed already so we
should not have the BObjectList delete them for us too. Instead, let's just turn
that off so we can delete the items ourselves one time.


# 8c2813c1871f922248d187c377ccd4a3176b6432 25-Feb-2015 John Scipione <jscipione@gmail.com>

Tracker: Style fixes


# 10489e89dd921a1764bda5d79c7706edfdaf3b0e 22-Jul-2014 John Scipione <jscipione@gmail.com>

Tracker: check if widget == NULL, CID 600509

Add a few helpful comments too.


# f13a47d22483f23f0dd9cc9ce043c25ba73bd073 14-Jul-2014 John Scipione <jscipione@gmail.com>

Tracker: Pose style fixes kind => which


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

Tracker: style fixes to Pose class


# db41683495bfde817554415d14ae6f9cc91e77eb 02-Jan-2013 Matt Madia <mattmadia@gmail.com>

Automatic whitespace cleanup. No functional change.


# c2535dc48a28016ead05c4ebf522f018dc770429 07-Aug-2012 Philippe Saint-Pierre <stpere@gmail.com>

Tracker: various issues regarding filtering

1. A BRefFilter-ed PoseView wouldn't keep monitoring files after its opening
thus not picking up files that happen to fit the filter thereafter (mime attr
updated, etc..)
2. A filtered PoseView wouldn't get updated when:
a) a column was added or removed
b) a file was renamed
c) a file was moved
3. Harmonize the way BRefFiltering and Type-ahead filtering are working. Both
can be used together.
4. The handler for AttributeChanged() wasn't working properly if link(s) of a
changed model was/were its siblings.
5. Broken links weren't detected/updated (it nows monitor the lost target
parent directory, and wait for the target creation to show the link fixed)

This is a big change (even more considering the 'critical-ness' of the component)
Testing is MUCH welcome!

Should fix #4254, #5381, #1717 (and maybe others)


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

WIP: Yet more style fixes, mostly 80 char violations.


# 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


# c5b852f95fddc659447d55bab0785a8452cfad8c 14-Jan-2011 Rene Gollent <anevilyak@gmail.com>

Patch by Shade: If the volume does not return a valid capacity, don't crash with a division by zero error. Resolves #7103. Thanks!



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


# bdb32d10a992a12efd6b773f43ae8e1ff4e7e435 04-May-2010 Rene Gollent <anevilyak@gmail.com>

Simplify the check for what volumes to show free space bars on. They are
now shown only on read/write volumes that are not CDDA.



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


# 725ad924ff644eee9794a0da605730415b562da1 20-Aug-2009 Alexandre Deckner <alex@zappotek.com>

* When checking a draw/updateRect intersection, an offset was added too early
making the check fail when Pose::Draw was called with a non zero offset.
Fixes #4289
* Fixed an x/y typo (that had no really visible effect, the fade effect might
need some more indepth review)
* Removed dead code, and replaced an inlined intersection check with
BRect::Intersect.



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


# 50f1b82d5b7fe9b4d37fd4b56039ce921941fb70 19-Aug-2009 Alexandre Deckner <alex@zappotek.com>

* Rewrote rename-click detection to be more usable. The code is much smaller
and is based on the pose selection time, not on click time. It is more
robust and since the selection might have been by click, keyboard or
selection rect, it makes the behavior very pleasant (in my opinion) for
multiselections. Try and tell me!
* Disabled the modifiers (first click editing). Too many of them, and
conflicting with other usages, i'd like your opinions/preferences.
* Removed old, hackish and now unused DelayedEdit/SetDelayedEdit stuff.

Fixes #3617



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


# 6a71afb0d1c29bfa1fcc45e0d6aa191e2f09e028 08-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

Sorry for mixing some cleanups into this patch...
* When changing icon sizes, invalidate before scrolling. This causes silent
scrolling in app_server and avoids a visual jerk. Everything needs to be
re-drawn at the new icon size anyways.
* Removed the fUpdateRegion member from BPoseView. It was supposed to make
drawing quicker, but it only made it slower. Checking for intersection with
the update rect passed to Draw() should be much more straight forward and
does not involve app_server communication...
* Refactored some misnamed methods, ScrollIntoView() would always draw and
only sometimes scroll - I couldn't agree with that.
* There is a very confusing mix of "fullDraw" and "minimalRect" booleans which
seem to be used with wrong semantics. The minimalRect flag passed to BPose::
CalcRect() means to get the pose rect for the icon and the first column only,
not all columns. Contrary to that, some pose rect calculation happens with
minimalRect == fullDraw... I tried to fix some of that.
* The visible changes of this patch are when adding poses. The
SynchronousUpate() wasn't working so well, I made it work reliably by invoking
Invalidate() and Window()->UpdateIfNeeded(), which also takes care of any
drawing that the app_server has to do for the background. And it's flicker
free in double buffered mode...
-> This fixes poses being drawn multiple times and the text getting darker.
* And there was another bug when adding poses. The extent (bottom of last item
in list view for example) can be just above the current view bounds. When the
next item is added above the view bounds, then the extent scrolls into view,
but there is nothing to be scrolled in this case. srcRect is still invalid
and so is dstRect. But destRect should be valid in this case.
-> This fixes some poses being cut off at the bottom when opening Tracker
windows.


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


# 96da4b41b0baadab6c3f9b2fcdfe6573df564d4c 07-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

* Fix the completely broken desktop icon size changing which I introduced
yesterday. It needs to auto-place icons which go out of view or underneath
the deskbar or a replicant. Also it obviously cannot scroll to keep the
view "centered" as normal Tracker windows.
* Fix/improve the desktop context menu with regards to icon size options. It
also displays the shortcuts, which now work on the desktop too.
* When doing an icon cleanup on the desktop, not only the deskbar is avoided,
but also replicant views.


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


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

* Changing the icon size will now work more like simply scaling/zooming the
view. BPose converts the scale in SetLocation() and Location(), which does
_not_ affect performance for list mode, BTW. So that should be fine.
* The center of the pose view is now locked when changing the icon size.


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


# e70b6d957a03fbd24b6c47ad2668d23c11806912 06-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

* Cleanup in the icon mode stuff. kScaleIconMode is gone. There is simply
kIconMode and it can have different sizes.
* The "Icon Mode" super menu item is marked, when in icon mode, as well as
the size item in it's sub menu.
* When switching from mini icon mode or list mode back into icon mode, the
previous icon size is now restored. This also works when the folder has
been closed meanwhile. (The on-disk format for view state has changed, so
your folders will open with default values.)


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


# 95da064570eefc4815a20f8e547f1fc58a7565fc 14-Feb-2009 Rene Gollent <anevilyak@gmail.com>

Some pose performance improvements by aldeck and myself:
1) We don't need to call FindPose() on every pose as we're freshly adding it,
and a duplicate should never happen in this circumstance (the FindPose() is still there if
Tracker is compiled in debug mode however.
2) Adjust the FSClipboard calls such that the locking is optional. This allows us to lock
once per CreatePoses group rather than once per pose.

Together these changes make for a significant performance improvement when it comes to
populating a large folder.



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


# e9842421554da064c665301a10b6a6b3f69ac818 31-Oct-2008 Alexandre Deckner <alex@zappotek.com>

* On date format change, remove the need for the synchronous call to
DrawViewCommon(), simply invalidate since the logic is simplified now,
see below.
* Reworked the way TimeAttributeText was updated when date format is
changed. Got rid of the recalculatText flag propagation, it was broken
since forever anyway (was here on r5 max4.1): It was only updating
visible poses and wasn't robust in certain cases. Besides, it was
cluttering the code on several layers upfront only for date format changes.


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


# 1de41c158d4aee02e639595539c3f29bf849e09f 06-Sep-2007 Stephan Aßmus <superstippi@gmx.de>

* fixed tracker single click selection.

If I may say so, I find this code extremely messy and in desperate need for
refactoring. The bad news is that selection flickers now - the columns which
don't need to be drawn at all. I printed some debugging info in
BTextWidget::Draw() and it appears that for a single selection state change,
at least four invokations of BTextWidget::Draw() will result. Sometimes many
more. Since the code calculated the dirty rects wrongly in many places, it
appears that this bug might not have shown before. Like I said, the code is
a mess and there is not a single place for invalidating poses, so I am not
surprised why tons of invalidations arrive. :-/ Maybe I should make myself
more familiar with Tracker... or revert my text outline patch. :-P


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


# c9f801562845abf9a0809aaa87c5fc0c097cf07e 28-Aug-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed DEBUB build.


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


# 5c34aef797c60839b66395519c53b39291dc35c7 22-Aug-2007 Stephan Aßmus <superstippi@gmx.de>

changed the meaning of the "icon view label background" Tracker setting:
* it is replaced by a "icon view label outline" feature that renders a black
or white outline around the text of a label under an icon. This can be used
for background images that have a lot of contrast and is visually more
pleasing (IMHO) than the text box in the workspace color (but the outline
could of course still be improved as well)
the outline or "false bold width" feature is a new BFont feature in Haiku
* Tracker appeared to have a disabled feature to install default background
images, I enabled this feature and rewrote it a bit to use our big logo
from the artwork folder, the placement is for 800x600, so not optimal for
larger desktops, but at least it is shown by default on new installations
or rather "fresh" images
* changed the way the dotted underline is rendered under links, accidentally,
this fixes the bug that it was not dotted at all since a while, which is
a bug in app_server or BView not tracking the need to update the drawing
pattern in certain situations (this bug needs to be fixed too of course)


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


# 7fb6186f3cb93a14ea0f96a82bdfc3d18f3ad56e 29-Aug-2006 Stephan Aßmus <superstippi@gmx.de>

* integration of vector icons with the registrar and the mime data base
* additional versions of SetIcon[ForType] and GetIcon[ForType] in BMimeType
and BAppFileInfo, which handle flat vector icon data
* changes in Tracker to support scalable icons (currently broken for
non-vector icons and needs cleanup) and drawing icons correctly with alpha
channel (large parts of this work done by Michael Lotz)

If someone feels like looking over the changes, that would be much
appreciated! :-)


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


# 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