Commit Graph
405 Commits
Author SHA1 Message Date
John Scipione f14cafbe87 Tracker: Prevent rename on mouse up after dragging, fixes #20176.
Remove previous fix from hrev59950, this was also not the correct place
to check for dragging.

Change-Id: I0a47a85794977298aee70934f01170fd57f6ce87
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11510
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2026-08-16 12:59:58 -04:00
John Scipione a7b8bf7b99 Tracker: Do not start edit while dragging, fixes #20176.
We have to check for dragging in Pulse(), it's too late to check
this by the time we have gotten to StartEdit().

A bit of additional cleanup including some related comments.

Change-Id: Id292d73593d12028e7368c50dac0869c4a7df94b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11439
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2026-08-07 22:42:35 -04:00
John Scipione 868b6993ea Tracker: Fix file handle leak while filtering poses
... closing the file handle it opens and fixing #20018.

Change-Id: Ic6da22bf46fa24ec5f056f468d334c2d6e41069e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11413
Reviewed-by: waddlesplash <[email protected]>
2026-08-04 04:28:10 +00:00
John Scipione cdcafe6d13 Tracker: Allow drag inside root window and save view state.
Fixes a pair of regressions listed in #20168 around hrev59677.

Change-Id: Id3f8e4e0ca57d11af5e178318869a87d6d8f2210
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11282
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: Máximo Castañeda <[email protected]>
Tested-by: Commit checker robot <[email protected]>
(cherry picked from commit 52f5d502d9be13f9fc42080f7e64ecfaf3277da9)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11327
2026-07-23 15:33:15 +00:00
Máximo Castañeda ba3a7735b4 Tracker/PoseView: save icon size when we are (not were) in icon mode
Fixes: #9040
Change-Id: I8714f3f193dfca07bf640852ef6535353313a5b7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11265
Reviewed-by: waddlesplash <[email protected]>
2026-07-16 19:42:52 +00:00
Fehér László c807e52c53 Tracker: Adjusted highlight boxes to better fit the icon label
* also fixes a glitch where label outline was sometimes cropped on some files

Change-Id: I24ab4808ac97a6ad7e24d605d1d892d5ce1c0080
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11248
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Máximo Castañeda <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2026-07-11 11:06:47 +00:00
Fehér László 7a51fa68c4 TextWidget: Use the cached FontHeight for better performance
* We already have a cached version, no need to recalculate it every time
* Font's height is rounded up to match TextView's LineHeight definition

Change-Id: Iba4e5b1f53d7b5b491fac9dcb8dfe17cb89b77d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11164
Reviewed-by: Máximo Castañeda <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-07-09 06:50:18 +00:00
John Scipione 58e64b2b93 Revert "Tracker: Remove drag fade, fixes a complaint from #19429."
Restore drag fade, fixes CPU spikes reported in #20102. Make fade
rect 256x256 instead of 256x192.

This reverts commit 5660b231ec.

Change-Id: Ia0f6c2389ea915ecc1a9691615264cf192560ac3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11009
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-05-26 11:38:45 +00:00
John Scipione 5660b231ec Tracker: Remove drag fade, fixes a complaint from #19429.
Change-Id: I9c9f7d416addd617628c448748d672f334695438
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10886
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2026-05-13 16:17:08 +00:00
John Scipione f1e9c36fcb Tracker: AttributeChanged() on current pose list, fixes #19770.
When filtering this is the filtered pose list, else this is the
pose list in list mode or the visible pose list in icon mode.

Remove filtered pose list fixup from hrev44493 to resync the lists
afterwords which fixes issue with duplicate symlinked files appearing
on other volumes that appear to be created when saving linked files
while filtering.

Change-Id: I6d6c85fe222960f47cc206322eeb4441f7fa73aa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10970
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2026-05-13 14:14:34 +00:00
John Scipione 37246ea447 Tracker: Make sure destWindow is locked before you "Move to" it
... fixes another crash reported in #20072, this time concerning
Looper must be locked.

Change-Id: Ia4161609066bd2a5094f51410058dce75a630dd9
2026-05-07 23:50:20 -04:00
John Scipione 9aabd008bf Tracker: Check if destWindow NULL before clearing selection.
Fixes #20075, regression from hrev59659.

Change-Id: Ie0cbd5c1afcf4f14dadfdcd2e428f46c4478ecc7
2026-05-06 12:49:59 -04:00
John Scipione 7f2e069f93 Tracker: Fix crash when destWindow is NULL, fixes #20072.
Regression from hrev59676. Unfortunately pose positions are
offset by position in source window in this case, like in #19698.

Change-Id: I5278f7f473fa52f35df9019a4cb93b4f7aab53ef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10925
Reviewed-by: John Scipione <[email protected]>
2026-05-05 03:46:43 +00:00
John Scipione 04bf4b0915 Tracker: Add Trash pose to Desktop in file panels again.
Make sure pose attributes are set correctly and fix dir menu warping.

Change-Id: Ia623517ee19a66dd9b74cbf477ceb258cce1c8d0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10861
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2026-05-04 01:19:04 +00:00
John Scipione 297cc9240e Tracker: BPoseView style fixes: viewstate => state, wrongEndianness => wrongEndian.
These shorter variable names make it easier to fit in 100 and are clear in context.
Explicit NULL checks.

Change-Id: I95a77b244a44bbff79404ee9a0f94ed79b1f40cf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10858
Reviewed-by: John Scipione <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-05-04 01:19:04 +00:00
John Scipione 4856376f00 Tracker: Fix pose locations when moving/copying to a folder
... in different view mode or icon size. Fixes #19698.

Change-Id: I386fc5acc0f97c24d6554c5220aebf20d58cbd83
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10863
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2026-05-04 00:59:04 +00:00
John Scipione 706fc8e3c6 Tracker: Fix drop onto file assume parent directory regression.
Also fix a minor TODO regarding dropping file onto root dir.

Regression from hrev59656, fixes #20069.

Change-Id: I153539cb714b9a5872eca16da3aa4a8de25c0f64
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10890
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2026-05-04 00:53:46 +00:00
John Scipione c9967ab17b Tracker: Set list mode to scroll position not extent. Fixes #20050
Change-Id: I35f43a837c222fe66e2a0dacdb1fd76e46a0cfcc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10883
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-05-03 03:05:26 +00:00
John Scipione 9c6b7508fc Tracker: Don't sort poses in BPoseView::AddPosesCompleted().
Fixes #20018, #20050.

The sort was causing the scroll position on change directory
(go up/back) in navigation (single-window/browser) mode and
causing issues with pose list when type-ahead filtering.

Change-Id: Id07890462ac3ecd36f3db508671c77c943ee3e2c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10860
Reviewed-by: waddlesplash <[email protected]>
2026-04-30 17:39:10 +00:00
John Scipione 4c1a136caa Tracker: Select moved poses replacing destination's selection.
Change-Id: I3b423f4b3ed887260d870d638b114dd373190562
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10816
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-04-26 20:54:09 +00:00
John Scipione 87dc1df680 Tracker: Unselect all except clicked pose if >1 pose selected
... and we're not extending the selection or dragging.

Done on MouseUp() to allow for drag & drop. Fixes #20043.

More fixes included in this commit:
* Refactor BPoseView::MouseUp() code dealing with selection and
  popping menu. Don't consider fAllowPoseEditing for selection.
* Command **and Shift** extend selection.
* Create BPoseView::ExtendSelection() convenience method
  (also used in mouse down).
* List view/icon view loc "fix". Code worked before because index
  is 0 in icon mode but be explicit about pose location in list mode
  vs. icon mode anyway.
* Add ASSERT() for Window() and CurrentMessage() to BPoseView::MouseUp().
  We were already assuming they weren't NULL and it would have crashed
  if they were.
* Replace pose with clickedPose style fix (meaning is clearer).
* Comment update for "last_buttons" message param.

Change-Id: I3ecb035dbca8b343c230f1e6aee3070939a4a3f6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10814
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-04-26 20:54:09 +00:00
John Scipione 54a3883e26 Tracker: Create a symlink of a file in the same directory again
... without regression from #19403. Fixes #19769.

Drop version of BPoseView::MoveSelectionTo() signature changed.
Pass in uint32 moveMode to pass on create link or relative link.

This fixes the double create link on:
- Context-click => Create link/relative link => Current folder.

Use synchronous Go() in ShowDropContextMenu() to get the
return value. Asynchronous Go() always returns NULL so didn't
work right. Also don't send message since we're handling this
through the return value. Send MoveTo/CopyTo/LinkTo shortcuts
messages to window instead of the view.

This fixes the double create link on:
- Context-click drag and drop => Create link/relative link here.

Update loop control status better. Set stat size and perms.

Fixup MoveTo/CopyTo/LinkTo pose locations.

Change-Id: Ibff9f16d7c1c921a46a425de2f280318c40f4c69
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10715
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2026-04-26 20:50:15 +00:00
John Scipione 1e58b7a03e Tracker: Pass suffix length into FSMakeOriginalName()
... and remove the "copy" suffix from it, that has to be passed in
along its length. Create convenience version to hide this.

Change-Id: Ifb488e73f496da676a413fd9e5d8fdeedcc7a2b4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10783
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2026-04-26 20:50:15 +00:00
John Scipione 6b60801833 Tracker: Style fixes related to creating links.
Change-Id: Iac673bc07c52cfd3c095ded5658f083fbeddfefd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10714
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2026-04-26 20:50:15 +00:00
John Scipione b8bae43e9b Tracker: Never scroll Desktop, fixes #20046
Change-Id: I33d05009956585577c02741e851741600b7d9002
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10821
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-04-16 20:39:17 +00:00
Augustin Cavalier 157e34f264 Tracker: Skip watch_node(B_STOP_WATCHING) if we aren't watching individual nodes.
Avoids unnecessary syscalls and saves time.
2026-04-13 18:59:59 -04:00
Augustin Cavalier fd2113c61a Tracker: Restore handling of B_DELETE key in KeyDown.
If the shortcut is not available (due to the menus not being active),
then this will make sure we handle the key regardless. If the shortcut
is active, then it'll get eaten by BWindow, and we won't get here.

Change-Id: Id6c3ae590f596481f9dfb720aa088238ccc6413c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10718
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2026-04-13 19:24:15 +00:00
John Scipione 026ca93095 Tracker: Update Filetypes menu when a mime type changes.
Fixes #20032.

Change-Id: I31292b2db36bc370fad07152297449a3090b561a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10727
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-04-13 16:04:25 +00:00
John Scipione 6e64d5681f Tracker: Tell pose view on Desktop to update its colors and replicant colors
... on B_RESTORE_BACKGROUND_IMAGE (which sets the Desktop color or wallpaper).

Remove kRestoreBackgroundImage, preferring the B_ version we got from
Backgrounds (and represents the same constant). Tracker already imported
this constant long ago.

Fixes #20028.

Change-Id: I6c59f4ddd1b2a7ec0d5e90fe6a8a9671dc66d50e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10729
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-04-13 16:02:04 +00:00
John Scipione 75628f3bac Tracker: Move CreateTrashPose() to DesktopPoseView and simplify
Add AddPosesCompleted() override in DesktopPoseView.

Better Desktop checking (by use passed in param).

Add an IconAttrChanged() convenience method that checks for icon
attribute changes only. AttrChanged() calls this and then checks
a couple of other attributes.

Change-Id: Id7d399eaea3ca2f97083c93ebfb9157327ae4f0d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10638
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-03-31 17:04:07 +00:00
John Scipione 3d8e280ccf Tracker: Skip 0 capacity volumes from Trash.
(system & packages)

Change-Id: I62ac9c4496f357de00d3c1579f22b7fda2728ea4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10636
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-03-31 17:04:07 +00:00
John Scipione b283cb27dc Tracker: Foregin => Foreign typo fix, remove old defines
Change-Id: I01ca540abaf62e5cd9cea393eec94594fc5f0d91
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10634
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-03-31 17:04:07 +00:00
John Scipione 2d172c081f Tracker: Style issues related to Trash pose
Change-Id: I33dda6b353e91ec3c34835ac955e8946a4d203c1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10631
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-03-31 17:04:07 +00:00
John Scipione 3180756b92 Tracker: Make Trash pose invisible on boot volume.
This means that the Trash icon will no longer appear
on the boot volume, only on Desktop. It's still there
just invisible and should not have been visible.

Change-Id: I1c95b39667af1603d8114b29185a352b047787cb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10421
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-03-31 17:04:07 +00:00
Nathan Patrizi 605a1f4f4e Tracker: Prevent bringing windows to foreground when not dragging
* Prevent bringing Tracker windows to the foreground when moving the mouse
  over them with a button held but not actually dragging a file.
* Fix a regression caused by changing window->Dragging() calls to
  IsDragging().

Fixes #19683

Change-Id: Ife55885e72d4682b857baf4103d144f49b765693
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10601
Reviewed-by: nephele nephele <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-03-28 12:32:27 +00:00
John Scipione ed34c67cdb Tracker: attrHash variable minor code simplication.
Change-Id: I609148f32ced27a19d8ffcf102ae3abce3894cb9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10419
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-03-09 16:45:27 +00:00
John Scipione f41b44fa34 Tracker: Place window background images at top-left of extent
... instead of top-left of view bounds.

This only affects backgrounds inside windows (not on Desktop).

The view bounds may be scrolled over but we don't want to draw the
background from the scrolled over position, we want to draw from
the top-left of the window which is the top-left of the extent.

We also have to set the icon origin in the view state to the extent
instead of the view because it will be different if scrolled.

Change-Id: Ieff9d0a66086d116d46ffbd713b2dcd45d312870
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10413
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-03-04 22:42:42 +00:00
John Scipione c91678c156 Tracker: We only need to consider visible poses for extent
... if filtering use filtered pose list instead.

Change-Id: I77c666a6c061a3ac0d1c1174f7bd430ff7ce22c9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10412
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-03-04 22:42:42 +00:00
John Scipione 1d20c1fb5c Tracker: Disallow background image on Desktop windows.
Custom background image is disallowed on the Desktop folder and Root
aka "Disks" folder. However, you may use a default background image.

We store the background image on the node, Desktop window and the
actual Desktop share the same node so we have to explicitly disallow
background images from showing on Desktop windows.

Make UpdateBackgroundImage() protected.

Remove unused BDeskWindow::UpdateDesktopBackgroundImages();

Handle all background image code in ContainerWindow. BPoseView calls
its window if targetted to update its background image.

Fixes Desktop background portion of #19947.

Change-Id: I4b104340b5a69807961b99bde7b0455d7d58065a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10392
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-02-28 13:20:52 +00:00
John Scipione a89c4cc6e9 Tracker: Revert SortPoses() change from hrev59185. Fixes #19946.
Change-Id: I0d4ab3a15c13ad1dd81b52a6f588d2ed09772a4d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10394
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2026-02-27 21:14:42 +00:00
John Scipione 71dc2a086c Tracker: Draw dragged pose text selected, fixes #18572
Note this is a change to how BeOS R5 and Haiku has always worked.

Drawing dragged poses as selected ensures that the text can be read
even on black on black or white on white because the selection rect
creates contrast.

Lessen contrast by blending with gray when selected and cut, even
more when window is unfocused.

Pose text on Desktop is inverted compared to in a folder by default
so this bug typically occurs when dragging to and from Desktop.

Change-Id: Icb1ee7ccbf9b5e2d8c3a4b89c6b90e19da15c917
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9520
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: humdinger humdinger <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2026-02-13 04:21:27 +00:00
PulkoMandy a65ba286ee PoseView: improve drag bitmap computations
Tracker creates a drag bitmap containing the selection being dragged.
There is a size limit if the selection is too large to avoid moving a
huge bitmap around.

There were two problems with the way this was done:

- The smaller rectangle was always centered on the cursor, even if that
  was near the edge of the selection being dragged. In that situation,
  most of the drag bitmap would end up being empty. Instead, move the
  rectangle to align it with the edges of the selection if it goes
  outside them. This makes sure we always use as much of the drag
  rectangle as possible for useful data.
- Moreover, there was a regression on the rendering of the
  "fade" at the edge of the rectangle. This is a transparency gradient
  that should be at the edge only, to indicate that the drag bitmap has
  been truncated, and that more (invisible) things are also being
  dragged. In hrev58665, this transparency gradient was changed to cover
  the entire width and height of the dragged bitmap, instead of just the
  edge. This lead to most of the text being almost invisible in a lot of
  cases. Change the code to use a gradient only near edges again.

Fixes #19429.

Change-Id: I395fda191dc61732e4bdc5287a09882cdc2b5f55
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10177
Reviewed-by: John Scipione <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2026-01-06 13:29:09 +00:00
John Scipione d7022afd57 Tracker: Simplify adding/removing poses when mounting/unmounting
... and sorting.

Change-Id: Ia72e85d12682d4f77200629f3f5f278a9a40c423
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9890
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-30 19:05:25 +00:00
John Scipione 1584b1ecab Tracker: BPoseView replace BView with _inherited and style fixes.
Change-Id: Ic24f4ee3831a94a659cc584e5b4393f08695061d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9889
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-30 19:05:25 +00:00
John Scipione b5884b112e Tracker: Clear drag data on MouseUp().
The same is done at the top of MouseDown.

Fixes #19402.

Change-Id: I75fe2249a585612c859d80a7a71825b5cb1b1df8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10026
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-27 04:10:53 +00:00
John Scipione 5388208c0b Tracker: Fix EditFirstWidget() pose location in icon mode.
The old code works because in icon-mode you have just one row
but this is not the intended way to determine the pose location
in icon mode (and mini-icon mode).

Refactor CommitActivePose() and kEditName in PoseView.

Use CurrentPoseList() to use filtered or regular pose list
(but don't update both).

In practical terms this should do nothing.

Change-Id: Iedafb147a6963bdb1411491be25641141325c1bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10025
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-11-27 04:10:53 +00:00
John Scipione e32d782cb4 Tracker: Allow draggable container icon on Root, Trash and Printers
Use new DraggableContainerIcon name when invalidating icon.

Create a ShouldHaveDraggableFolderIcon() method on BContainerWindow
to consolidate the gating logic to a method.

We alert if you try and copy, move or create link to any of these
directories, however you may drag the icon in some instances such as
to change the directory in a file panel or to open the directory up
in FileTypes. You may create a link to the printers directory.

Set the Printer icon on the printers directory.

Fixes #3385

Tracker: Disks menu in CountView

* Open Disks directory on click.
* Skip volumes with no capacity (e.g. system, config) from
  Root and Desktop menus (still shown in Home and volumes though).
* No Trash on volumes, add only to Desktop.
* Declare some variables outside loop.
* Rename originatingWindow to source.

Fixes #3549

Change-Id: I66318d2485a5a8405f5459c355a467f34e19ecc5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9499
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-07-30 04:07:05 +00:00
John Scipione 64334a1580 Tracker: Redraw Trash icon when pose attribute updates.
* Don't set Trash icon in FSGetTrashDir anymore, do it in TrashWatcher.
* Write vector icon to attr or large/mini icon attrs, but not both.
* Only update Trash icon attribute on boot volume, not the hidden trash
  folder on other volumes.
* Monitor Trash icon attribute changes by TrashWatcher in BPoseView.
* Get rid of ShouldUseWellKnownIcon(), update ResetIconFrom().
* Remove model param from BPose::UpdateWidgetAndModel() and always use
  the ResolvedModel() of the pose instead.
* Pass poseLoc into BPose::UpdateWidgetAndModel() in icon-mode.
* Workaround for GetAttrInfo() failing to update removed icon attrs.
* Check fNode not NULL in Model::StatChanged() to prevent crash when
  unmounting volumes with trashed items.
* Filter out 0 capacity volumes checking for Trash directory.

Fixes #8696

Change-Id: Ief2efc07c85866cc0e49468c668e47ec90b855af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9458
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-07-30 04:00:12 +00:00
John Scipione 091cc6357e Tracker: Set location in BPoseView::UpdateIcon() for icon-mode.
Change-Id: I8d4fea5eea7a19daedd31bd81cd59270a2b56720
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9476
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-07-30 04:00:12 +00:00
John Scipione 43db356db7 Tracker: GetInt32() instead of FindInt32() when getting opcode
FindInt32() works in this case but is deprecated.

No functional change intended.

From the BeBook BMessage page:
"Several functions, such as FindRect() and FindInt32(), have versions
that return the found value directly. These versions don't report errors
and may not be supported in the future."

Change-Id: Ida979153dd00e247c2174edd73d0019752b388f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9079
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-07-28 21:26:42 +00:00