... by setting the incoming shortcut instead of the old one
in BMenuItem::SetShortcut().
Fixes #19405 a regression hrev58611.
Change-Id: Iecf19a323f6b6ead288e3f1ef1169376b11cddb3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8948
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
... by calling Install() on Go() in BPopUpMenu.
Install() prepares item shortcuts and set missing targets to the
target window. Combined with hrev58611 for regular menus this
passes most of the shortcut prep work on to BWindow.
Fixes pop up portion of #19395 a regression from hrev58589.
Change-Id: I8a1615502e0d6e0b75f9cd3ca2a45d08b53d11ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8946
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
If it changed, then don't try to do I/O past the end.
It would presumably just fail anyway, and since the
addition of extra asserts to VMCache page insertion,
will cause assertion failures due to inserting pages
past the end of the cache.
This case is particularly easy to trigger by holding
the down arrow in the keymaps list (i.e. changing keymaps
very rapidly.)
It doesn't make much sense to do this, and the Be Book specifies that
doing so will return an error. A user on the mailing list tested
against BeOS and confirmed that it does reject this, so we should too.
The shortcut detection was working, just not the display of the
modifiers in the menu. I've added back the necessary code to fix
this in BMenuItem.
BWindow does the heavy lifting of preparing the keys and
modifiers. I have changes _FindShortcut() used by BMenuItem to
send the prepared modifiers back to BMenuItem.
Set the parameters raw in the constructor, they will get fixed
up in Install().
I also make sure to use the prepped version of the key and mods
in BWindow::AddShortcut() to remove the old one. This is a minor
update that eliminates an edge failure case of malformed input.
Fixes #19395 a regression from hrev58589.
Change-Id: I4333f89149ff843f92dbffbd53d58ffc2def6760
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8943
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
* Determine whether we're currently dragging by looking at the
current window message what, dragging replaces direct in a few
places especially crucial to drawing semi-transparent dragged
items correctly.
* Export kMsgMouseDragged and kMsgMouseLongDown to the BPoseView
header to check for dragging (but still in BPrivate).
* Turn on outline label drawing for dragged items and remove TODO.
Fixes #6461
Change-Id: I45cd401299dec408b76cb4b9ce1e9350ed59ef5b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8842
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Create a DrawTextWidget() method in BPose to share drawing
between list and icon modes.
* Remove direct param from BPose::DrawIcon() and remove the state
changes from that method.
* Remove direct parameter from TextWidget::Draw(), we can calc it.
* Refactor BPose::Draw() to set the LowColor() only. This is now
considerably more simple to read and understand.
* Refactor ColumnRedraw() to reset colors and drawing mode.
* Many explanatory comments added.
* Remove BackColor() and TextColor(), use LowColor() and HighColor().
* Use AdoptSystemColors() and HasSystemColors() to set colors.
These are virtual in BPoseView and the colros are overridden by
DesktopPoseView, OpenWithPoseView and QueryPoseView.
* Add ReadOnlyTint() version to Utilities that takes a color_which.
* Rename InvertedBackColor() to InvertColorSmart().
* Force Edit name select box background color to be black/or white
depending on the inverse of your background color on Desktop
instead of using document colors.
* Determine if volume is read-only by pose instead of its parent,
this fixes a bug where read-only volumes mounted on a read-write
directory like the Desktop had an editable name even though they
were not supposed to. It wouldn't let you change the name though.
* Remove fIsDesktop param from BPoseView, use only IsDesktopView()
now except in FilePanelPoseView when navigating to the Desktop.
* Update BContainerWindow, DesktopPoseView and FilePanelPoseView
to adjust to this change. IsDesktopView() is always true for
DesktopPoseView, never true otherwise.
* DesktopPoseView disambiguated further from BPoseView. Add a few
virtual override methods.
* Custom Brightness() value on DesktopPoseView based on the default
Desktop color.
* Respond to B_WORKSPACE_ACTIVATED and B_RESTORE_BACKGROUND_IMAGE
messages to update the Desktop text color.
Change-Id: I122dbeab668244772012656a59cbba3050245f44
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8885
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Pass buttons into DragSelectedPoses instead of calling GetMouse(),
and bail out if a mouse button is not down.
Eliminate HeaderView::fMouseDown, get buttons from CurrentMessage()
instead. Reduce icon_track indent by breaking early on invalid.
Add B_WILL_DRAW flag to bitmap drawing view.
Refactor BPoseView::MakeDragBitmap().
Move DragStart(), DragEnd(), Dragging(), (now IsDragging())
DragMessage() and related method parameters from BContainerWindow
to BPoseView. This avoids having to dynamic_cast to get the window
from the pose view.
Put bool params at the bottom of the BPoseView class with width 1
to facilitate packing.
Remove buttons parameter from WasDoubleClick() and get from
Window()->CurrentMessage() instead (along with clicks).
Change-Id: I94b345e44af7b1136f94ded02e9c2a118188a877
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8841
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Goodbye sweet prince!
This hasen't worked for quite some time, Webkit uses the curl backend
currently which has no support for gopher.
Our netkit backend also never "truely" supported gopher, instead
translating pages to html with some prebuild styles, those also don't
use the CSS system colors, for lack of existence back then.
Change-Id: I5d5098db9512bb22cde8c17fa1553637b30ae65b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8938
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Since BObjectList is a template class, this only breaks ABI where
BObjectList was exposed in public methods, and even then it's only
a name mangling break and we should be able to add compatibility
methods if necessary.
(The old "bool owning" member variable is left intact for ABI
compatibility, for the moment, though it's otherwise unused now.)
Tracker's PoseList is the only remaining type that has a "bool owning"
switch in the constructor rather than template parameters.
This should significantly improve the output of static code analysis
tools that previously detected list operations as causing use-after-frees
and double-frees, as well as make code maintenance easier by making it
easier to determine what list owns (or does not own) an object.
It should also be a minor performance optimization, since the branches
for calls to delete/free should now be optimized out altogether.
Still boots to desktop and Tracker, Deskbar, Debugger all tested
and verified as working.
Change-Id: If2a24a6f0d22e7a506ef554fcfdd328907279ed4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8915
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Simplifies the API and makes ownership semantics clearer.
Change-Id: I59d2e3ef8055253e85943500fb65356762055c54
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8914
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This is to make BMenuBar and BMenu margins the same.
The hardcoded menu item margin numbers come from this math on what the
BMenu and BMenuBar item margins respectively used to be a long time ago:
14 - 8 = 6 // for left margin
(14 + 20) - (8 + 8) = 18 // for left + right margin
We have since updated these margins so they need to be recalculated.
Use BPrivate::MenuPrivate to get the new margin deltas.
IconMenuItem and ModelMenuItem classes are used by Tracker add-ons and
those can be in the menu bar as well.
Change-Id: Ie4147c31e6b19764cb36b9c414f7e91c47b7d9bd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8905
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
to silence libasan on libtracker.so
Change-Id: I7c634271f4ec2b4ca0d5f76c18ddbfc7dddf2793
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8910
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Make it clear that this enum just defines ASCII control characters, and
there is no 'free space'. Also add comment showing which key combination
produces each control character.
Change-Id: I01884132842281cce6c13dd9398b1aeddadae58a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8899
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Drop all HOST_KERNEL_* definitions, they aren't used or needed
anymore, it seems.
* Use --no-as-needed unconditionally; it works under Clang+LLD now.
(and indeed it's still needed for the "unzip" host tool to
compile and link properly.)
* Drop --copy-dt-needed-entries. It was added around the time of
GCC 10, but it seems that it's not needed anymore, or at least I
did a minimum build having compiled the host tools without it
and all seemed to be fine. Furthermore, it seems lld doesn't support
it, so this fixes the build under FreeBSD and other platforms
that also don't use ld.bfd same as Darwin/macOS.
* use -fstack-protector-strong and -fstack-clash-protection
* also bin and some user add-ons
Change-Id: I593365e55414ac447bde54980a5c73202e9bb172
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8887
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Replace private _UsesSystemColors() with public HasSystemColors()
and make sure to consider the tints when checking if system colors
are used or not.
Document HasSytemColors() in the Haiku Book.
Change-Id: I78de4904d5ddb24b98ad27eb93d4e5ccb330d76a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8897
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
... and set alternates. This is updated because we can now set
shortcuts without B_COMMAND_KEY. Setup Alt for Win/Linux mode.
* Word-wise shortcuts Option+arrows.
* Line-wise shortcuts Alt+arrows AND Ctrl+arrows for
Win/Linux mode and for when there's a conflict.
Otherwise these shortcuts are not expected to conflict.
Add shortcuts for Alt+Backspace and Alt+Delete to delete to
the beginning or end of line instead of word.
Split out vertical and horizontal shortcuts so that if one is
used by an app we at least get the other one.
Fixes #9913
Change-Id: I0124fec7df4585a70ded8d3e7bf2aa8cb4acecb4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7289
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
... fixing a TODO now that #7078 is fixed.
There are 2 remove playlist actions: 'Remove' and 'Move file to Trash'
* 'Remove' playlist shortcut: Cmd+Delete => Delete
(This also works from the main window to remove the file you're
currently focused on/listening to from the playlist.)
* 'Remove file from playlist' shortcut has been removed. We have
decided not to Trash files from MediaPlayer's playlist anymore,
you'll have to trash the files from a regular Tracker window.
The 'Remove' shortcut gets plain old delete as the author intended.
Change-Id: I3b1e19405e029d9c5f398cfd7a8dbab49fb21fc7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7292
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
Reviewed-by: John Scipione <jscipione@gmail.com>