on long touch (and not on mouse press) don't pop up the context menu
anymore but enter selection mode, similar behavior to mobile applications.
the full context menu is still available from the actions toolbar
appearing in selection mode
Sending SIGINT can be destructive, for example if we interrupt the
loading of the shell init files (e.g. .bashrc) and clobber history
preservation settings. Follow the example of Kate and send a Ctrl-E
Ctrl-U to clear the prompt instead.
BUG: 279614
Signed-off-by: John Brooks <john@fastquake.com>
Improve the test by also testing the various selection mode bars.
No combination of bars should lead to a resize of the paces panel.
This commit also helps with increasing code coverage by making all
possible selection mode bars appear.
@broulik noticed an issue in the code. This commit fixes it.
-------------------
Before this commit there was a `QObject::disconnect` call that did
nothing (because it had `nullptr` as the first parameter) and there was a `QObject::connect` call that created
the same connections multiple times because of this.
This had no effect on end users. However such code can lead to
issues in the future e.g. if we ever had a situation in which the selection mode could be toggled for an inactive view container.
This commit solves this by replacing the `QObject::disconnect` call
with one that works. The `QObject::connect` call is moved so
there won't be multiple connections of the same type.
Deleting DolphinView deletes KItemListContainer, which deletes
KItemListController, which emits modelChanged, which causes a
signal delivery to the already destroyed DolphinView
This is never good, and in Qt6 causes an assert
(https://codereview.qt-project.org/c/qt/qtbase/+/381860).
Co-authored-by: Nicolas Fella <nicolas.fella@gmx.de>
click-and-holding with a pointing device like a mouse.
This functionality was originally implemented because it seemed
useful to save users the effort of entering selection mode
explicitly by using its corresponding action.
However, click-and-holding to trigger anything is not really an
expected behaviour. (This contrasts with touch devices where
press-and-holding is common to trigger something.)
Aside from the above reasoning, the click-and-hold behaviour was
also buggy so that selection mode was entered in a couple of
situations that weren't strictly about click-and-holding.
So this commit removes the functionality and the bugs.
BUG: 457973
BUG: 458129
CCBUG: 457975
There were two changes in framework that triggered this commit:
KHamburgerMenu and KToolTipHelper.
When the Dolphin-specific hamburger menu was replaced by
KHamburgerMenu, I didn't clean everything up correctly. Not
anymore!
Help texts also weren't updated accordingly. This commit replaces
any mention of the old hamburger menu which was called "Control"
with text that reflects the current application state.
The other framework change "KToolTipHelper" takes responsibility
for opening links in help texts. So we won't need code to do this
in Dolphin anymore. This means we can also get rid of some
duplicate help texts which only existed because links didn't work
correctly in some places.
If this role isn't in the model yet, it would be `QVariant::Invalid`
which is obviously a distinct type from an empty string list.
This means `KFileItemModel::setData` treats them non-equal and
potentially does expensive operations on the model, which is
called every time a role is resolved in `KFileItemModelRolesUpdater`.
With this change, the number of pointless layout calculations is
significantly reduced.
In selection mode, a bottom bar with contextual actions appears
when at least one item is selected. This commit makes it so this
bottom bar also contains the "Invert Selection" and "Select All"
actions so users have more complete control over changing what is
and isn't selected while in selection mode.
- Make Esc leave selection mode and have it only clear selection
when already outside selection mode.
- Let translators know that the "More" overflow button should only
have a short text on it.
- Fix a crash that happened when any code tried to exit selection
mode even though selection mode had never been enabled to begin
with.
- Various code improvements
- Smoother animations
- The bottom bar in General Mode only becomes visible if items are
currently selected
- Removed the selection mode action from the default toolbar since
it can already be toggled in various ways
- More documentation
- Some cleaning
The selection mode action is a checkable toggle action named
"Select Files and Folders" which has "Space" as the default
shortcut.
In selection mode a bottom bar with contextual actions is shown.
These should mostly mirror the actions which are available through
the right-click context menu aka DolphinContextMenu.
Resizing of the window might make a overflow button appear in the
bottom selection mode bar.
This commit makes press and hold in the view activate selection
mode. This behaviour is not triggered if the press and hold is
used to either start a rubberband selection or a drag operation
within a short time. The length of the short timeframe is defined
by a QStyleHint. This is currently not implemented in touch
because I can't test it.
Mix the selection mode bars' background colors using a nice
combination of colors from the current color scheme
BUG: 427202