Felix Ernst [Thu, 15 Aug 2024 18:40:02 +0000 (20:40 +0200)]
ContextMenuSettingsPage: Stop forcing focus onto search field
Prior to this commit when switching between categories in Dolphin's
settings dialog by keyboard, the focus would suddenly switch away
from the category chooser when going over the "Context Menu"
category. This meant that one couldn't move to the Trash category
in a straightforward way but had to fight the focus change forced
by Dolphin.
This commit removes that forced focus change so the category can
now be changed by keyboard as expected.
Felix Ernst [Thu, 15 Aug 2024 17:56:39 +0000 (19:56 +0200)]
DolphinSettingsDialog: Move focus to Okay button last
This commit changes the Tab order in Dolphin's Configure dialog
so that the items which are visually at the end of the dialog are
also last in the keyboard focus order when cycling through the
interface using the Tab key.
Previously, the "Cancel", "Defaults", "Okay", and "Apply" buttons
received focus prior to the actual contents of the pages which
does not make sense from a workflow perspective.
This change should also make navigating this dialog easier when
relying on screen readers because reading those buttons out prior
to users even having a chance to change any setting did not make
any sense.
John Veness [Fri, 16 Aug 2024 07:35:27 +0000 (07:35 +0000)]
Fix display of filename ampersands in actions
If you added the "Actions for..." button to the toolbar, filenames that contain "&" would not appear correctly in that button. This MR fixes that, and also the button that appears when using "Delete" with selection mode.
Yifan Zhu [Fri, 9 Aug 2024 03:21:08 +0000 (20:21 -0700)]
KStandardItemListWidget: select by number of unicode chars
Previously during rename, the number of QChar is used for selection,
which might be different from number of unicode characters.
Test plan:
- create the file zz❤️❤️.txt
- rename the file
- verify that the first 4 characters are correctly selected, which
didn't work before the patch.
Felix Ernst [Mon, 22 Jul 2024 10:51:33 +0000 (10:51 +0000)]
Notify users if authorization is required to proceed
Previous to this commit entering a folder without read access would show the non-descriptive error message "Could not enter folder". If the user actually is not allowed to view the contents of the folder, this is indeed true and this commit will preserve this message as is.
However, if an admin protocol is installed, users can actually view the contents of most folders after authorizing themselves as administrators. So this commit changes the error message in those specific circumstances to instead read "Authorization required to enter this folder." and provide a button to authorize themselves. This button is the "Act as Administrator" action.
If no admin protocol is installed, this commit has no effect.
The idea for this change came from Harald Sitter.
I receive funding for changes like this by the Next Generation Internet Initiative, which (as I understand it) will no longer provide funds for future projects like this if the current EU draft budget goes through as it is.
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.