Felix Ernst [Sat, 13 Jul 2024 15:37:31 +0000 (15:37 +0000)]
Stop acting as admin when the authorization expires
Previously, the authorization just silently expired without any
visible change. The surprise only came when the user tried to do
any action, which immediately would show a password prompt. We
don't want users to randomly type passwords into password
prompts unexpectedly showing up. This commit avoids that.
With this change, the view container visibly de-escalates
privileges and shows a message explaining what happened.
Felix Ernst [Mon, 8 Jul 2024 11:41:56 +0000 (11:41 +0000)]
Improve Filelight installation UX
Before this commit pressing the free space button when Filelight
is not installed would show a singular action called "Install
Filelight to View Disk Usage Statistics…". Pressing this button
would open the store page for Filelight. This is an okay user
experience, but we can do better.
This commit makes it so pressing the free space button when
Filelight is not installed shows an attractive UI that makes clear
that freeing up disk space can be accomplished nicely by installing
Filelight. The "Install Filelight…" button on this UI is connected
to PackageKit directly, so we do not need to show a separate store
like Discover and instead trigger an installation right then and
there. For this, the recently introduced DolphinPackageInstaller
KJob is used.
Installation progress is reported through the status bar similar to
the progress reporting of slowly loading directories or searches.
Installation failure or success is ultimately shown within Dolphin
as a passive notification above the view.
On Microsoft Windows or when PackageKit is not available, the
install button will only open a store page for Filelight.
This prevents a crash. One issue identified is that the commit that
I am reverting here accesses a QDropEvent at a moment in time in
which it might have already been deleted. We cannot check if it
exists by that time because we do not control its lifetime and it
is not a QObject.
Felix Ernst [Mon, 1 Jul 2024 12:03:22 +0000 (12:03 +0000)]
Guide users to using kio-admin instead of sudo
This commit adds a guided setup that leads users from a situation
in which they try to "sudo dolphin" towards them successfully
setting up and using kio-admin.
1. When users enter "sudo dolphin", they are told to start Dolphin
by typing "dolphin --sudo" or "dolphin --admin" instead.
2. When Dolphin is started with "--sudo" or "--admin" it checks
whether an "admin" protocol is installed. If not, a guided
setup leads users towards installing it.
3. After that, Dolphin starts with an installed "admin" protocoll
like kio-admin. Now a non-modal information dialog appears that
explains how to activate and use kio-admin.
Felix Ernst [Thu, 13 Jun 2024 14:38:41 +0000 (16:38 +0200)]
Prevent inconsistent status bar progress reporting states
Merge setting title and progress percent into one method. This
makes sure that the method can be called from all over the place
and will still always show a consistent state instead of partially
showing the progress percent for one progress but the label for
a different one.
This is to enable various tasks reporting progress at the same time
in a way that doesn't lead to a confusing mess for users. Usually
multiple tasks do not show progress at the same time, but when it
happens this commit should make sure that the user experience is
at least bearable.
Allow not having a "Stop" button next to the progress report for
tasks that cannot be stopped.
Ben Cooksley [Sat, 25 May 2024 20:22:56 +0000 (08:22 +1200)]
Baloo Widgets and kio-extras are both part of KDE Gear - which is also what Dolphin is part of.
Accordingly, they should be using @same for their dependencies
This commit introduces an action which creates a new folder with a name
specified by the user and moves all the currently selected items there
in one go.
This action is implemented as a KFileItemActionPlugin which means users
can disable it on Dolphin's context menu settings page.
Felix Ernst [Mon, 20 May 2024 16:52:57 +0000 (16:52 +0000)]
Add label to button for closing the admin bar
The exact effect of the button is not perfectly clear without a
label because it could theoretically also have no effect other than
dismissing the bar (which is not the case). This situation is
clarified through this added label.
The tooltip of the button is adapted to complement the new button
label.
Felix Ernst [Sat, 18 May 2024 22:18:14 +0000 (22:18 +0000)]
Avoid implicitly selecting items
Items should only be selected if the user wants to act on them.
However, previous to this commit we sometimes selected items even
when there is no reason to assume that the user would like to act
on them. Such selections are dangerous because they make it more
likely that the user manipulates items by accident which they
never even explicitly selected.
Example: The "Up" action is used to navigate to the parent folder.
This will implicitly select the folder one emerged from after
opening the parent folder, so just one accidental press of the
Delete key will lead to data loss if the press goes unnoticed. This
scenario would have been avoided if no folder had been selected
automatically.
The above example becomes even more dangerous if the user is acting
with elevated privileges.
The following implicit selections of items are being removed:
- Selecting items that are being activated
- Selecting folders one emerges from
Even though these items will no longer be selected after these
actions, they will still be marked as current.
The only downside I see is that our indication of which item is "current" is a lot weaker than the selection highlight, so it might be more difficult to spot which folder one has emerged from. However, this could be counter-acted with some other temporary indication if this really turns out to be a problem.
The only downside I see is that our indication of which item is
"current" is a lot weaker than the selection highlight, so it might be
more difficult to spot which folder one has emerged from. However, this
could be counter-acted with some other temporary indication if this
really turns out to be a problem.