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
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.
adds a method to ask what's the sorting strategy (column and order) for a particular Url, as Dolphin can have directory-specific sorting strategies
This makes possible for other apps that have lists of files, like Gwenview to use the same sorting when invoked from dolphin, ie opening an image
CCBUG:236059
Have the secondary ViewContainer slide into/out of view when split view mode is switched on or off by the user.
This should help users understand what split view mode is about. Without the animation it might seem like the only thing the button does is creating a weird vertical line in the middle of the view or something. With the animation it should be clear that the second view is a separate entity that was added. The closing animation will help users understand which of the ViewContainers was just closed.
Summary:
All modern web browsers offer a function to show tabs from last time when a browser starts, and many apps today
restore their prior state when they're launched. This patch implements thatfunctionality as an option and turns it on by default.
The settings window is accordingly adjusted to be clear about what applies when:
{F7681752}
FEATURE: 413564
FIXED-IN: 20.08.0
Depends on D25106
Depends on D25219
Test Plan:
With the new setting turned off:
- No behavioral changes at all
With the new setting turned on:
- When launched from the GUI or CLI without any URLs, dolphin restores session
- When rebooting with Dolphin open, it restores session normally after the system comes back (i.e. no behavioral change here)
- When launched with URLs, Dolphin window is opened showing those URLs instead of restoring session
- When Dolphin is already running and a new window is opened, that new window shows a single tab with the same URL as was visible in the previously-open Dolphin instance (i.e. no behavioral change here)
- "Open Containing folder" functionality in other apps works regardless of whether or not Dolphin is running
Reviewers: #dolphin, #vdg, feverfew, meven, elvisangelaccio, ndavis
Reviewed By: #dolphin, #vdg, feverfew, elvisangelaccio, ndavis
Subscribers: davidedmundson, ndavis, intika, feverfew, kfm-devel, ngraham, broulik, #dolphin
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D11382
Summary: This allows compile-time checks for the main window dbus methods.
Test Plan: Same test plan as in D21691, D21666 and D25510.
Reviewers: #dolphin
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26214
Summary:
`dolphin --daemon` does not have the `/dolphin/Dolphin_1` dbus path,
because it doesn't have any DolphinMainWindow.
Instead of working around this issue (as we did in D21666 and D25510),
just exclude these processes from the list of dbus instances checked by
`Dolphin::attachToExistingInstance()`.
CCBUG: 408244
Test Plan: Same test plan as in D21666 and D25510
Reviewers: #dolphin
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26213
Summary:
QtDBus caches known interfaces when passing a non-empty interface name
to the QDbusInterface constructor. This is an issue when calling the
FileManager1 methods more than once, because `preferred` could be a
valid interface from the cache, but it would later fail to call the
`openFiles`/`openDirectories` methods on the main window.
By passing an empty interface name, we prevent QtDBus from using the
cache so that we always get an invalid interface when calling the
FileManager1 methods on a daemonized dolphin process (that doesn't have
the Dolphin_1 dbus object).
BUG: 414402
FIXED-IN: 19.12.0
Test Plan:
1. dolphin --daemon
2. qdbus org.freedesktop.FileManager1 /org/freedesktop/FileManager1 ShowFolders "/tmp" ""
3. Close the dolphin window that was just opened.
4. Start a normal dolphin process
5. qdbus org.freedesktop.FileManager1 /org/freedesktop/FileManager1 ShowFolders "/tmp" ""
6. Close again the dolphin window
7. qdbus org.freedesktop.FileManager1 /org/freedesktop/FileManager1 ShowFolders "/tmp" ""
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D25510
Summary:
`dolphin --daemon` does not have the `/dolphin/Dolphin_1` dbus path,
because it doesn't have any DolphinMainWindow.
Checking if the QDBusInterface is valid is not enough, we also need to look for dbus errors.
This should have been part of commit 7df5fc8edb. Not sure how I missed it.
BUG: 408244
FIXED-IN: 19.08.0
Test Plan:
1. Make sure the new "Open new folders in tabs" setting is enabled.
2. Run `dolphin --deamon` and make sure is the only dolphin process around.
3. Call the `org.freedesktop.FileManager1.ShowFolders` method from QDbusViewer.
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D23087
Summary:
Adds an option to open externally called folder in a new tab.
By default this option is enabled
Test Plan:
If option selected:
1. All valid arguments passed to Dolphin should be opened in tabs of an instance(s) (if it exists). Duplicate tabs just change activation to current tab.
If option not selected:
1. All calls to Dolphin result in a new instance being opened
This option does not require Dolphin to be restarted to take effect.
Reviewers: #dolphin, elvisangelaccio, ngraham
Reviewed By: #dolphin, ngraham
Subscribers: broulik, ngraham, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D21736
Summary:
BUG: 408387
BUG: 408244
FIXED-IN: 19.08.0
Currently Dolphin only opens a new instance of itself in the following two scenarios:
1. No other Dolphin instances ( D21666 deals with not matching daemonized instances) are currently running.
2. A new instance is explicitly asked for via: `dolphin --new-window`
A third scenario is needed to fix this bug:
3. If no URLs are passed in as arguments then open a new instance.
This patch adds this third scenario.
Test Plan:
STEPS TO REPRODUCE
1. Open Dolphin
2. Right-click on Dolphin's Task Manager Entry and click "Start New Instance"
3. A new instance is created.
As my system stuff is not built on master I am unable to replicate the bug (and can't confirm whether this fixes it), hence I'll rely on @ngraham to confirm whether this patch fixes the issue.
Reviewers: ngraham, elvisangelaccio
Reviewed By: ngraham, elvisangelaccio
Subscribers: elvisangelaccio, ngraham, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D21691
Summary:
`dolphin --daemon` does not have the `/dolphin/Dolphin_1` dbus path,
because it doesn't have any DolphinMainWindow.
Checking if the QDBusInterface is valid is not enough, we also need to look for dbus errors.
BUG: 408244
Test Plan:
1. Make sure there is a `dolphin --deamon` process around.
2. Start another dolphin process.
Reviewers: broulik, ngraham, feverfew
Reviewed By: feverfew
Subscribers: kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D21666
Summary:
Current implementation matches org.kde.dolphin-.*PID while trying to exclude itself from the list of running instances.
With this fix applied only org.kde.dolphin-PID is matched.
Test Plan: Open dolphin twice. Observe only one window.
Reviewers: feverfew, #dolphin, elvisangelaccio
Reviewed By: #dolphin, elvisangelaccio
Subscribers: elvisangelaccio, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D21547
Summary:
FEATURE: 183429
FIXED-IN: 19.08.0
GUI: new cli argument --new-window
Externally called files/directories are opened in a a new tab of an instance of Dolphin that already exists. If any of the given URIs are already open in a tab, then those tabs are activated instead of a new tab being opened. If there is no instance then the files/directories are opened in a new window. The newly opened file/directory has its tab activated, and consequently, the window is also activated.
When the user clicks "Open In New Window" or "Detach Tab", the files/directories are opened in a new window.
Test Plan:
[Manual]
Before testing, set the default file manager in system settings as the newly built Dolphin executable.
One must also include the new dolphin executable in the $PATH, otherwise some functions will attempt to open the system dolphin instead of the new one.
Furthermore, running two different versions of Dolphin (in particular, where one does not have this patch included) can result in bugs appearing, in particular, new tabs not opening as old instances will not recognise the DBus commands sent to it. However, I see no reason why a user will have two different versions of Dolphin (apart from people like us :D).
Open directories with the help of auxillary programs (i.e. a browser). The files/directories should appear in a new window if an instance does not exist. If an existence already exists, then a new tab should be opened and activated in that instance and the window activated.
Use QDBusViewer to open folders/items by calling the ShowFolders/ShowItems methods in org.freedesktop.FileManager1 of the Dolphin instance.
When a user chooses to "Open In New Window"/"Detach Tab" then the files/directories should be opened in a new window.
Reviewers: #dolphin, elvisangelaccio
Subscribers: zzag, dfaure, fvogt, fikrim, magar, fbg13, davidedmundson, kwin, ngraham, elvisangelaccio, anthonyfieroni, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D16648
- "include own header first line"
- "put config.h in angle brackets line"
- "do not include QtModule/QtClass line"
`QElapsedTimer` was implicitly included by
kfileitemmodelsortalgorithm.h, now we need to explicitly include it in
kfileitemmodel.cpp.
We also need to explicitly link to `Qt5::Concurrent`, otherwise we
cannot `#include <QtConcurrentRun>`.