Felix Ernst [Thu, 18 Apr 2024 10:28:28 +0000 (10:28 +0000)]
Add branding colors for Flathub
This is needed or they definitely won't feature us.
The light blue color is chosen because it is vibrant and fits the
association with "Dolphin". The very dark color is chosen to still have
a good contrast with the Dolphin icon even though it is already quite
dark at the top left corner.
For more information see:
https://docs.flathub.org/blog/introducing-app-brand-colors/
Felix Ernst [Wed, 17 Apr 2024 07:32:27 +0000 (07:32 +0000)]
Fix crash while entering selection mode with Qt6.7
`deleteLater()` on a non-existing object seems to cause a crash with
Qt6.7. This makes some sense but wasn't the case previously.
I didn't test this yet but it is a harmless change so if anyone can confirm we can IMO merge directly.
This was brought up in https://invent.kde.org/system/dolphin/-/merge_requests/764#note_920935, reported in the bug linked below, and the sentry crash reporting page also has a few dozen reports (https://crash-reports.kde.org/organizations/kde/issues/13589/?project=4&query=is%3Aunresolved&referrer=issue-stream&stream_index=1).
Dolphin 24.02 is also affected but we are already past the last bug fix release for it.
Felix Ernst [Tue, 9 Apr 2024 05:53:41 +0000 (05:53 +0000)]
Fix saving sort role after change from header
This is a partial revert of 5186f09cabf0af4b0683e75b0bcde1061f84a67e. That commit tried to
simplify code, however this lead to the saving of view properties
being skipped, introducing the linked bug.
The issue is that by the time the slotSortRoleChangedFromHeader()
method is called, the model already changed its sort role.
Therefore the check if the new role is identical to the old sort
role fails and no saving would occur.
With this partial revert the header will continue to change the
sort role itself (which allows a minor optimization of not double
sorting when also changing the sort order at the same time). The
method slotSortRoleChangedFromHeader() is then only responsible
for saving that change in the ViewProperties and telling the
SortBy menu in the user interface that the sorting has changed.
Jin Liu [Wed, 3 Apr 2024 12:34:50 +0000 (12:34 +0000)]
DolphinMainWindow: show a banner when the user presses the shortcut of a disabled action
Currently, there's no feedback when the user presses a shortcut of a disabled
action, e.g. cut / paste in a read-only directory. This patch shows a banner
in that case.
It's implemented by enabling a QShortcut for each disabled action. the
QShortcut is deleted when the action is enabled again.
The following actions are included:
cut
paste
rename
moveToTrash
deleteWithTrashShortcut
deleted
createDir
copyToOtherView
moveToOtherView
Nate Graham [Mon, 1 Apr 2024 19:25:13 +0000 (13:25 -0600)]
Mark servicemenu items' KNS content as risky
By design, these items will run arbitrary shell scripts on the user's
machine. That makes them security-sensitive and risky. Mark them
accordingly so the user is informed of the risk.
Depends on https://invent.kde.org/frameworks/knewstuff/-/merge_requests/309
Tem PQD [Wed, 27 Mar 2024 23:52:18 +0000 (23:52 +0000)]
Touch up various user-visible strings
This improves consistency among wording. More clarity is achieved
by avoiding technical terms or terms with multiple meanings.
Notable changes:
-Specify full settings path: "Configure Dolphin > View > General"
in Show Hidden Files whatsThis
-Mention setting to hide files with application/x-trash MIME type
in "Show Hidden Files" whatsThis
-Mention Split View mode in "Copy/Move to Other View" whatsThis
-Reword "Activate Tab" actions to "Go to Tab" (Next, Previous,
Last, numbers)
-Add "Last Tab" iconText, consistent with "Next Tab" & "Previous
Tab"
-Update Split View whatsthis to explain how to tell which view is
"in focus" visually
-Replace "pane" with "view" in split view settings text, and
clarify tooltip text
-Reword "objects" to "items" in whatsThis texts
-Reword "find bar" to "search bar" in Search button whatsThis text
Eugene Popov [Wed, 27 Mar 2024 10:28:15 +0000 (10:28 +0000)]
Better support for RTL
This MR fixes some issues related to RTL scripts:
- wrong layout in Compact View mode
- broken horizontal scrolling in Icon View and Details View modes
- broken navigation with left and right arrow keys in Details View mode
Méven Car [Sat, 23 Mar 2024 10:55:37 +0000 (11:55 +0100)]
versioncontrol: Prevent a use-after-free in UpdateItemStatesThread
UpdateItemStatesThread kept a pointer reference to m_plugin whose
lifetime was tied to VersionControlObserver parents.
On application shutdown it could happen the thread is still running when
the Observer is destroyed.
Make the plugin pointer a weak reference, allowing to stop the thread
when the plugin is gone.
Benedikt Thiemer [Fri, 15 Mar 2024 16:28:35 +0000 (16:28 +0000)]
Add settings page for Panels
For now this just includes the settings for the information panel.
Prior to this commit the options for configuring the information panel
were only exposed via right clicking the information panel. This was
not discoverable enough. Our guidelines also state that much. See:
https://community.kde.org/Get_Involved/Design/Frequently_Discussed_Topics#Context_menus_are_not_enough
The settings page is missing the "Configure" button for the entries in
the information panel, which can only be found in the context menu.
This is because I thought it would be weird to move it to the settings
page. (The "configure" button is used to select the entries for the
information panel)
Felix Ernst [Thu, 14 Mar 2024 10:50:48 +0000 (10:50 +0000)]
Adapt testOpenInNewTabTitle() to upstream change
Prior to this commit the test failed because it expected a generic "inode-directory" icon for directories like "home" or "tmp" even though we have more specialised and nicer icons for these directories. I assume the test only used to pass because we were actually always using generic and therefore unhelpful icons for tabs.
This commit removes the hard-coded expectation of the "inode-directory" icon and instead compares the tab icon with the return value of KIO::iconNameForUrl(tabUrl).
Felix Ernst [Wed, 13 Mar 2024 15:39:00 +0000 (15:39 +0000)]
Animate most of the bars
When a bar is toggled visible this usually happens because the
user might want to use its functionality now. However, if bars
appear without animation or at a location the user is not
currently looking at, they might not notice that they have appeared
at all.
An animation makes it more likely that the user notices the change
and can then use the newly made visible component.
Another reason for animations for showing or hiding of components
is that it can be disorienting for users when panels or bars
suddenly appear or disappear without animation. There is no visible
movement then, so the user might not know what happened if they
didn't concentrate or blink at that moment. The newly appearing or
disappearing component might also displace other components which
can make it difficult to find what one was just looking at.
These bars animate now after this change:
- Search panel
- Filter bar
- Status bar
This is implemented by extracting the animation code from
SelectionMode::TopBar into a new abstract base class
AnimatedHeightWidget. This class is now also used in
SelectionMode::BottomBar and the animating code there was removed.
These bars are left in Dolphin that stay without animation:
- Menu bar (Would probably need to be implemented in KXmlGui)
- Tool bar (Would probably need to be implemented in KXmlGui)
- Tab bar (Needs a different appraoch because it already inherits
QTabBar and therefore can not inherit AnimatedHeightWidget)
Jin Liu [Tue, 12 Mar 2024 09:43:44 +0000 (09:43 +0000)]
Enable custom view properties for special folders even if "remember for each folder" is off
Special folders include: search, trash, recents, timeline
Not including Downloads, although we have a custom view when "remember
for each folder" is on.
Rational: These folders really need the custom view. So even if the
user selects a global view for all "normal" folders, s/he probably
still want a custom view for special folders.