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]>
* 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]>
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]>
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]>
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]>
... 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]>
... 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]>
... 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]>
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]>
... 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]>
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]>
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]>
* 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]>
... 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]>
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]>
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]>
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]>
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]>
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]>
* 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]>
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]>