┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/global.cpp
AgeCommit message (Collapse)Author
2020-04-26Add an option to show tabs from last time when Dolphin startsNate Graham
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
2020-04-15Port KRun::run usage to run another Dolphin process, to ApplicationLauncherJobDavid Faure
Test Plan: Opening a new window works Reviewers: elvisangelaccio, ngraham, meven Reviewed By: elvisangelaccio, meven Subscribers: meven, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D28807
2020-03-16Switch to generated MainWindow dbus interfaceElvis Angelaccio
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
2020-03-16Exclude daemonized processes from Dolphin::attachToExistingInstance()Elvis Angelaccio
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
2019-12-24Rename variables to improve readability of Dolphin::attachToExistingInstanceElvis Angelaccio
Services and interfaces are not the same thing. Also clarify the name of dbus replies.
2019-11-28Force dbus introspection on the Dolphin_1 objectElvis Angelaccio
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
2019-09-08GIT_SILENT: minor qstring optimizationLaurent Montel
2019-08-11Match style of if() condition used aboveElvis Angelaccio
To be consistent with aeba47648d8b4b43ad0f8e237cfc95b8a4bd60ac.
2019-08-11Merge branch 'Applications/19.08'Elvis Angelaccio
2019-08-11Move variables closer to their usageElvis Angelaccio
GIT_SILENT
2019-08-11Coding style fixesElvis Angelaccio
GIT_SILENT
2019-08-11Do not match daemonized dolphin instances: part 2Elvis Angelaccio
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 7df5fc8edb54153f. 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
2019-06-23Adding option to open externally called folder in a new tabAlexander Saoutkin
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
2019-06-22Open new instance of Dolphin if no URLs are givenAlexander Saoutkin
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
2019-06-10Do not match daemonized dolphin instancesElvis Angelaccio
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
2019-06-08Fix container detachingElvis Angelaccio
2019-06-03Tighter match own service when trying to find suitable window to open path in.Thomas Posch
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
2019-05-30Open externally called files/directories in new tabsAlexander Saoutkin
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
2018-03-04Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: bcooksley, markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2018-02-04Fix all krazy #include warningsElvis Angelaccio
- "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>`.
2017-03-08Pass application name and icon to KRunKai Uwe Broulik
Otherwise this results in the generic executable icon as bouncy cursor. Differential Revision: https://phabricator.kde.org/D4823
2016-10-03Pass current dir explicitly to QUrl::fromUserInputDavid Faure
It works with QString() but that's a bug, I didn't expect it to work with my fromUserInput code and wrote otherwise in its documentation...
2015-10-21Allow home directories with non-local file paths.Emmanuel Pescosta
Paths like file:/home/me work now instead of showing an error message. BUG: 352743 BUG: 353550 FIXED-IN: 15.08.3 REVIEW: 125586
2015-04-22Add dbus interface to dolphinAshish Bansal
Implemented org.freedesktop.FileManager1 dbus interface in dolphin http://www.freedesktop.org/wiki/Specifications/file-manager-interface/ REVIEW: 123313 BUG: 343016