Since the Back action already has two standard shortcuts, a third one appended
to the list will be invisible in the UI, which shows only the first two. This
leaves users unable to reassign it.
We therefore make it the first shortcut in the list, so that the hidden third
entry will be the dedicated Back button, which users are far less likely to
want reassigned.
BUG: 371130
This makes the behavior of kernel cifs/nfs mounts the same as with kio's
smb://. It also helps reduce the chance of the UI hanging due to
opendir/readdir slowing down stat calls on the UI thread.
Signed-off-by: Andrew Gunnerson <accounts+kde@chiller3.com>
* This commit fixes the right click context menu not being shown
whenever the click is made right on the placeholderLabel text
Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
The old expected behaviour was that pressing Space would select
the current item. We now trigger selection mode instead and don't
select. At some point in the future we might want to instead have
Space trigger a "QuickLook" feature for quick viewing of full
files. In any case, the old behaviour of having Space select is
no longer expected, but Ctrl+Space can still be used for this.
It might also make sense to have Space trigger the old selection
behaviour if both selection mode and "QuickLook" are disabled, but
that is very low priority and will cause more code complexity than
the non-default benefits are worth.
Before this commit, the "Space" keyboard shortcut was bound to
triggering selection mode by default. After this commit, pressing
"Space" will only trigger selection mode when the file view area
has keyboard focus.
Pros:
+ Other buttons in the UI can be triggered with Space once again
just like it is expected from an accessibility point of view.
+ "Type-ahead" searching works once more when typing the space
char for file names containing such a space char.
Cons:
- "Space" can no longer be used to add the currently underlined
item to the selection. Instead "Ctrl+Space" needs to be used.
(However, this is the current status anyway unless a user has
manually unbound "Space" as a shortcut from Selection Mode.)
- The Selection Mode action will no longer show "Space" as its
shortcut in menus.
Overall, I see solutions to all of these problems, but they seem
over-engineered for the issues they are trying to solve, so I
believe this somewhat small commit is the best solution for now.
BUG: 458282
BUG: 458281
CCBUG: 463048
FIXED-IN: 23.04
Symlink contents should not be visited for the purpose of displaying sizes.
Not only is potentially misleading because the storage is actually used
elsewhere (the target location), it can be completely wrong as contents can
be visited multiple times, even recursively.
BUG: 434125
(cherry picked from commit 491068a440)
The `break` that is replaced by a `return` here would only break
out of the innermost while loop so the std::vector::end could still
become accessed after that. By returning here we completely exit
out of both nested loops and therefore don't access the
std::vector::end.
When one instance of Dolphin activates another it passes a startupId (X11) / activation token (wayland) along.
On X11 this is passed using the DESKTOP_STARTUP_ID environment variable. The code tries to read that through KStartupInfo::startupId().
That doesn't work though, since Qt at startup reads the environment variable afterwards. However, it is nice enough to allow us to access
it through QX11Info::nextStartupId(). Use that to read the token in the first instance and pass it to the second instance like we do on Wayland
The user-facing impact of this is minimal since KStartupInfo::setNewStartupId internally falls back to KWindowSystem::forceActiveWindow when no
startupId is passed.
While building dolphin, a warning comes up about KStandardGuiItem::yes()
being deprecated, and that another action verb should be using instead.
This commit fixes the warning by replacing KStandardGuiItem::yes() with
a KGuiItem constructor in the file src/views/dolphinview.cpp.
The icon for the "Rename and Hide" button has also been changed from a
check mark (dialog-ok) to an eye with a cross (view-hidden) to make the
button look more unique and grab the attention of the user.
When the current view mode is different from the view mode for
which settings were changed in Dolphin's settings dialog, those
changes were sometimes not present when then changing the view
mode of a view to the view mode for which settings were changed.
This commit fixes this by always loading the settings for all view
modes in the DolphinItemListView even if the view is currently
using only one of those view modes.
This commit changes how the setting to switch between full row
highlight and the old way of only having the icons and names be
activatable in details mode is presented on the settings page.
Before this commit a singular checkbox is used that talks about
the highlight effect.
But the highlight effect isn't actually what users should be
interested in. They mostly care how much of the area can be used to
activate an item. To make this clear this commit uses radio buttons
instead that give a distinctive choice between activation areas.
When not using the full row highlight, the text of non-name columns
in details view mode was wrongly colored in a way that pretended
that the full row selection highlight was active.
When it isn't active we use the normal color that we generally use
when the additional information is not within the selection
highlight.
In d383961719 the details view mode
was changed in a way that made the full row of an item the click
target instead of only having the item's icon and text be the
representative clickable area of an item.
This commit makes this new behaviour optional through a setting
which can be changed in Dolphin's settings dialog.
The explanation for introducing yet another setting in this case is
as follows:
While the introduced change is an improvement for many typical
workflows, there are some workflows for which this new behaviour
is problematic. Quite prominently a usage of Dolphin that tries
to maximise information density is made worse by the change because
now side padding is necessary to click the view's background. While
the side padding is and was optional, disabling it made switching
the active view in split view mode more difficult among other
things. For a more complete discussion about the issues, please
check out the bug report(s) and the discussion in Dolphin's gitlab
issue with number 34.
Co-authored-by: Ivan Čukić <ivan.cukic@kde.org>
BUG: 453700
FIXED-IN: 22.12
This one liner changes the signal that is emitted when the
"Dismiss" button is pressed on the Paste bottom bar in selection
mode. Before this commit, the `leaveSelectionModeRequested()`
signal was used but it had no effect because technically the
selection mode isn't active anymore when the paste bar is shown.
Everything works as expected if instead
`barVisibilityChangeRequested()` is emitted.
The application launching Dolphin passes a token via the XDG_ACTIVATION_TOKEN environment variable
We need to pass that to the running instance so that it can use it to raise itself
This commit introduces the private getter
DolphinTabWidget::viewContainerAt(ViewIndex)
and another private method
DolphinTabWidget::activateViewContainerAt(ViewIndex).
Both methods return nullptr if there is no valid
DolphinViewContainer at the specified ViewIndex.
Before this commit, even items that are distant children of
currently open views were considered selectable. This lead to the
bug that items meant to be highlighted through DBus would not be
highlighted if any ancestor of the item was open in any view.
This was fixed by only considering items in view if they can be
seen by scrolling. Main difficulty here was to make this also work
for the details view mode which allows expanding.
To implement this cleanly, some refactoring seemed necessary
because the logic to determine if an item is already in view
was previously intertwined with the logic to identify already open
directories.
This commit also contains the following refactorings aiming to
make the code more readable:
- A magic value (-1) is replaced using std::optional.
- A boolean trap is removed.
- A QPair is replaced by a struct with named variables.
- More and improved documentation
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