Nate Graham [Mon, 29 Nov 2021 17:15:41 +0000 (10:15 -0700)]
Use new "edit-copy-path" icon for "Copy Location" menu item
This is safe to change without a fallback icon explicitly specified
because if it doesn't exist in the active icon theme, it will fall back
to edit-copy which is a standard FreeDesktop icon name present in
every icon theme ever.
Eduardo Cruz [Sun, 28 Nov 2021 13:24:32 +0000 (13:24 +0000)]
Properly display parent folders when filtering is active and items are added or refreshed
The methods slotRefreshItems(), slotItemsAdded() and slotItemsDeleted()
are adapted so they are now compatible with the new behavior of
filtering expanded folders achieved in ed83f37f06bd5c4b38c100503c3ad4dec2a87912. The new behavior is that
expanded folders are hidden from view if neither the folder itself
nor any of its contents passes the filter. Previously expanded folders
would always stay visible no matter the filter.
A bug where the parent expanded folder would disappear after adding
or refreshing an item while filtering is also fixed.
Tests are added to make sure these behavior changes won't regress.
Kai Uwe Broulik [Tue, 16 Nov 2021 19:35:05 +0000 (20:35 +0100)]
KFileItemModelRolesUpdater: Generate thumbnails for visible files first
Folder thumbnails are not cached as we cannot know whether something
inside a folder changed. Moreover, they are also a collage of several
files and might even traverse into subdirectories. This takes time.
This MR fixes an issue where the window and tab titles don't properly handle creating/deleting/renaming items in the places bar, as well as switching to the Search mode.
Felix Ernst [Sat, 7 Aug 2021 13:48:02 +0000 (15:48 +0200)]
Port ViewModeSettings from macros to std::variant
Macros should be avoided if possible. Instead this commit replaces
the usage of macros with an std::variant of the ViewModeSettings.
As part of this cleanup, code that belongs to the VideModeSettings
class is moved there. Some parameters are also renamed to be more
in line with typical naming conventions.
David Murray [Sat, 30 Oct 2021 15:39:06 +0000 (16:39 +0100)]
Add support for recentlyused: kio to view properties.
Add "recentlyused" to the URL schemes recognised by ViewProperties as
needing special handling. User-set view properties for the
recentlyused: kio are then saved under view_properties/recentlyused in
dolphin's app data directory.
(Previously, the recentlyused: kio was treated, by default, as if it was
a remote location for the purposes of view properties. Since it
displays somewhat specialised results (files/directories from various
locations), users might find it useful to set particular view properties
and have them remembered.)
Blaster goo [Mon, 11 Oct 2021 17:41:42 +0000 (17:41 +0000)]
Currently, when changing Version Control settings in Configure -> Context Menu, it
tells you to restart to apply those settings. This commit changes that by asking you
if you would like to restart now or later.
Nate Graham [Tue, 31 Aug 2021 15:09:14 +0000 (09:09 -0600)]
Port to KTerminalLauncherJob
Dolphin still uses KToolInvocation::invokeTerminal() which is
deprecated and requires KInit. However Dolphin was ported away from
requiring it in other ways, so it is now possible to have Dolphin
running but not KInit, which breaks the "Open in Terminal"
functionality.
Using KTerminalLauncherJob fixes this. It was introduced in Frameworks
5.83, so the CMake dependency version is accordingly increased.
Jan Paul Batrina [Thu, 19 Aug 2021 14:34:40 +0000 (22:34 +0800)]
FoldersPanel: Fix inline renaming
Commit 5a0da4a9c8d10dc1921077d84bdabf05d20150b0 changed the value
for emitRoleEditingFinished() to a struct containing
the new name, but folderspanel was not updated.
Andrey Butirsky [Fri, 20 Aug 2021 09:31:36 +0000 (12:31 +0300)]
DBus activation with filemanager iface
In Dolphin on wayland currently, if you right clicks a file and create a
zip file from it, Dolphin makes a new window.
What we want to happen is Dolphin to focus the window we have with the
file selected.
This patches Dolphin's dbusinterface.cpp to call
KWindowSystem::setCurrentXdgActivationToken()
with the startupID
Returns from function as soon as we encounter a decisive comparison,
while ensuring the fallbacks provide a stable sorting. Added comment
to clarify the situation.
The accompanying feature to make the behavior configurable and disable
it by default was reverted in 21.08, so we need to revert the feature
itself as well and only ship it in 21.12, to avoid changing people's
setting back and forth, which is often not well-received.
Jordan Bucklin [Sat, 31 Jul 2021 19:31:49 +0000 (12:31 -0700)]
Fix how --select treats files
Previously, when passing file URLs with the --select option,
Dolphin would open the file in its corresponding application, as
well as opening an empty tab in Dolphin as if the file were a
directory. This happens specifically when trying to restore a
session.
This commit prevents Dolphin from opening a file in an application
and from opening an empty tab while passing the --select option,
and selects the URLs instead.
Felix Ernst [Sat, 31 Jul 2021 15:01:52 +0000 (17:01 +0200)]
Fix width issues when un-maximizing Dolphin
Before this commit un-maximizing or to be more precise instantly
changing the size of the window by a large amount could potentially
change the width of the sidebars, the viewContainers and the window
itself to unexpected/undesired widths.
This happened because the spacing calculation is triggered when the
primary ViewContainer is resized but at this point in time some of
the other widgets, especially the secondary ViewContainer and the
navigatorsWidget have generally not been resized yet. Therefore the
width and spacing calculations are based on partly updated and
partly outdated values leading to wrong results.
This commit makes it so calculation of spacings is delayed until
all widths have been updated.
Yes, spacing probably should not have the power to resize the
window but unfortunately the spacing can not be set to be less
forceful when taking space because otherwise the UrlNavigators
will take all space they can get with their
QSizePolicy::MinimumExpanding.
There are people who prefer the old behavior of session-restoring all
paths including the ones which are currently inaccessible. The idea is
that Dolphin is like a web browser; if a website is not currently
available, the browser tells you that instead of silently discarding the
URL and showing you the homepage. Doing this can be considered a form
of data loss.
In addition, the reason for the change was to prevent Dolphin from
showing invalid paths on launch for unmounted removable disks, but that
specific case was fixed separately by switching to ~ for any tabs/views
that were showing locations on a just-unmounted removable disk. So you
will never run into the problem if yo unmount a disk in Dolphin and then
close it.
Accordingly, let's revert the change because it causes more problems than
it resolves.
This MR removes the horizontal scrollbar of the Places panel. For titles that don't fit in the panel, their elided versions will be used (i.e., with ...).
Under some conditions, when zooming, only the size of the icon is changed, but not the entire item, which visually doesn't look good. The main idea of this MR is that when scaling the whole element should be resized, not just the icon, so I came up with some zoom levels for the main icon sizes. With this commit, zooming will resize the entire element, even if the resizing of the icon doesn't affect the size of the entire element.
This MR removes the horizontal scrollbar of the Places panel. For titles that don't fit in the panel, their elided versions will be used (i.e., with ...).
Jordan Bucklin [Sat, 17 Jul 2021 01:37:36 +0000 (18:37 -0700)]
Fix placeholder label text within an empty folder in Trash
An empty folder within the Trash bin previously had the placeholder
label "Trash is empty". This label should only appear in top-most
Trash/ url, and "Folder is empty" otherwise.
Alex Richardson [Fri, 9 Jul 2021 08:32:04 +0000 (09:32 +0100)]
Don't exit immediately if DBus isn't running
I am trying to run Dolphin on a minimal FreeBSD CHERI-RISC-V QEMU
instance and I haven't got DBus running. Without this change, KDBusService
causes dolphin to exit immediately since the default behaviour is to
exit if it can't connect to DBus.
Alex Richardson [Fri, 9 Jul 2021 08:30:58 +0000 (09:30 +0100)]
Avoid crashing on startup if DBus isn't running
I am trying to run Dolphin on a minimal FreeBSD CHERI-RISC-V QEMU
instance and I haven't got DBus running. Without this change, I get
crashes because QDBusConnection::sessionBus().interface() returns NULL
if DBus isn't running.