┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2026-01-22clang-tidy: fix performance-avoid-endlMéven Car
2025-11-16main: set active view in split mode when not restoring sessionRafał Lichwała
When Dolphin config was set to start in split mode by default AND simply open the given folder in both panels (Settings -> Folders&Tabs -> Show on startup -> selected folder [NOT "...state from last time"]) no view was initially active making weird side-effects described in both bugs. This commit solves that by calling mainWindow->openDirectories on start when both of the above conditions are met. BUG: 503576 BUG: 508554
2025-07-23Don't unset XDG_ACTIVATION_TOKEN manuallyKai Uwe Broulik
If we didn't attach to an existing instance, we call QWindow::show() on our MainWindow which requires the token. Upon successful attachment to another instance we exit anyway.
2025-07-18Make strings in credits HIG compliantPhilipp Kiemle
See https://develop.kde.org/hig/text_and_labels/ - Use en-dashes for date ranges - Use ©
2025-04-18Use dolphin icon for dolphin windowsKylie CT
intended as a fix for icon themes with different `org.kde.dolphin` and `system-file-manager` icons https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/issues/3663#issuecomment-2798459480 Also noticed that it should also actually make the upcoming dolphin on the icon change apply in places where setting the icon is respected (title bar).
2025-01-15Clean stop-gap porting ifdef for KICONTHEMES_VERSIONMéven Car
That were introduced in: a55c467fbb31d822d89722812388425327830377 38ab14c87a945153e683657483fa4bcf44d6b0fb
2025-01-04Update copyright to 2025Justin Zobel
BUG: 474515
2024-10-08daemon: prevent daemon to quit on `openNewWindow`Jin Liu
2024-08-12Set up KCrash after KAboutData::setApplicationData()Laurent Montel
2024-07-17Remove dead codeManuel Alcaraz Zambrano
2024-07-01Guide users to using kio-admin instead of sudoFelix Ernst
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.
2024-05-13use proper icon set and style outside of PlasmaChristoph Cullmann
the framework functions used will setup the proper icon set and re-coloring and style to use details see https://invent.kde.org/frameworks/kiconthemes/-/issues/3
2024-03-28Also use breeze style on macOSMéven Car
2024-03-28Use breeze style on Windows Julius Künzel
Most KDE apps to the same
2024-01-14DolphinMainWindow: autosave sessionAmol Godbole
Currently, the session is saved only when the app quits normally. Save the session after a fixed time interval from the last state change i.e. anytime the url is changed, or a tab is opened or closed, or the active view is changed. BUG: 425627
2023-12-25main.cpp about data: update homepageMarius P
2023-11-21Create thumbnails with scene devicePixelRatioKai Uwe Broulik
2023-04-05Make "don't run me with sudo/kdesu" message informativeNate Graham
We tell users what not to do, but we don't tell then what to do instead. At one point we told them to just use Dolphin normally and the polkit integration would kick in, but that work ended up being reverted and abandoned. Instead, tell them to use kio-admin, which exists as a released product and will hopefully not get removed anytime soon. CCBUG: 467948
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2023-01-29Fix sudo messageBharadwaj Raju
We don't have KIO PolKit support yet
2022-12-30Properly use X11 startup idsNicolas Fella
When one instance of Dolphin activates another it passes a startupId (X11) / activation token (wayland) along. On X11 this is passed using the DESKTOP_STARTUP_ID environment variable. The code tries to read that through KStartupInfo::startupId(). That doesn't work though, since Qt at startup reads the environment variable afterwards. However, it is nice enough to allow us to access it through QX11Info::nextStartupId(). Use that to read the token in the first instance and pass it to the second instance like we do on Wayland The user-facing impact of this is minimal since KStartupInfo::setNewStartupId internally falls back to KWindowSystem::forceActiveWindow when no startupId is passed.
2022-12-12Ensure there's a dot at the end of each --help options descriptionivan tkachenko
It will help make --help output more uniform, which in turn will be used in Tab-completions for zsh.
2022-10-14Fix Wayland window activation when attaching to an existing instanceNicolas Fella
The application launching Dolphin passes a token via the XDG_ACTIVATION_TOKEN environment variable We need to pass that to the running instance so that it can use it to raise itself
2022-09-26Remove unused includesLaurent Montel
2022-08-05Update copyright and maintainership infoElvis Angelaccio
2022-06-15Use cmakedefine01Ahmad Samir
This way we get a build time warning if the var isn't defined at all, e.g. a missing check_include_files() CMake call.
2022-06-15Use one config-dolphin.h.cmake configuration fileAhmad Samir
2022-05-31It's enabled by default in qt6Laurent Montel
2022-05-31Kdelibs4ConfigMigrator is deprecated in KF6Ahmad Samir
2022-01-04Add Flatpak patches to Dolphin depending on CMake definitionClaudio Cambra
When Dolphin gets packaged as a flatpak, this patch gets applied: https://invent.kde.org/packaging/flatpak-kde-applications/-/blob/master/dolphinpatch.patch That's not really an ideal solution, so this is probably a better idea -- to upstream the patches and apply them depending on a CMake definition
2021-12-31Improve sudo/kdesu error messageNate Graham
Now that you can get elevated privileges while using the app, we can display a more useful and descriptive error message when people try to run Dolphin using `sudo` or `kdesu`. Also bump the frameworks dependency to 5.90 since that's the KIO version that includes this change, so we can be sure that the message is always accurate.
2021-08-02Merge branch 'release/21.08'Nate Graham
2021-08-01Fix how --select treats filesJordan Bucklin
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. BUG: 436584
2021-07-28Revert "Don't session-restore invalid paths"Nate Graham
This reverts commit c733b3aa9787a618a0ce5bb03b3fc731f5663b21. 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. BUG: 439864 CCBUG: 427619 FIXED-IN: 21.08
2021-07-16Allow to have HiDpi previewsMéven Car
BUG: 401170
2021-07-10Don't exit immediately if DBus isn't runningAlex Richardson
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.
2021-03-28Port away from KInitNicolas Fella
KInit is planned to go away https://phabricator.kde.org/T14298
2020-11-19Allow having the UrlNavigators below the tab barFelix Ernst
This commit restores the possibility to have the UrlNavigators below the tab bar. This will happen automatically whenever the UrlNavigator is removed from the toolbar. It is also now again possible to have the toolbar on the side. This option is disabled while the toolbar contains the UrlNavigators. This commit makes no changes to the new default which is having the UrlNavigators in the toolbar but makes sure that upgrading users won't be affected.
2020-11-09Make UrlNavigators in the toolbar the only optionFelix Ernst
The UrlNavigators will be automatically added to the toolbar. The Sort By action is removed from the default toolbar to make space. Remove all options to have UrlNavigators outside the toolbar and remove those code paths. Make it so the new NavigatorsWidgetAction contains two UrlNavigators when in split view mode. Spacing was also added to align these UrlNavigators with the ViewContainers when enough space is available. Force the toolbar to be either at the top or bottom of the window. Set a sane sizeHint for DolphinUrlNavigator. It would be better to do this in KUrlNavigator in the future. This commit also contains a changes which should be moved to a separate merge requests before this gets merged: - Add an expansion animation when split view is enabled by the user
2020-11-05Add support for KUserFeedbackElvis Angelaccio
This commit introduces KUserFeedback in dolphin with some basic data sources and with a settings page to configure the telemetry values. There are also a couple custom data sources as proof of concept: a bunch of settings and the count of available network shares as listed by Solid. The settings page is shown only if the user feedback framework is enabled, but currently in Plasma we don't have a global kill switch to disable it. At the moment we never show an encouragement message. We need to connect to the `Provider::showEncouragementMessage()` signal, but first we should agree to a common way to show a non-annoying message to the users.
2020-10-29Disable session management for daemonNate Graham
We don't need to autostart the daemon if it was running at logout. BUG: 417219 FIXED-IN: 20.12
2020-10-23Don't session-restore invalid pathsNate Graham
When session restore is populating the main window, it's unconditional; you'll get whatever was there before. This can be a problem if any of those things are now missing. For example, maybe you were browsing files on a removable disk, then quit Dolphin, and finally removed the disk. The next time you launch Dolphin again, it will try to show you the view from the now-missing removable disk. To prevent this, we now look at all the URLs in all of the view containers that were created after session-restore has finished doing its thing; if any of them are invalid local URLs, we change the URL to the home folder instead to avoid showing the user a view with an invalid location in it. BUG: 427619 FIXED-IN: 20.12
2020-10-11When restoring former window state, append any URLs passed as argsNate Graham
Before, when Dolphin was closed but opened with any URLs, it would open a new window with only those URLs, rather than restoring any window state (if the user has this feature enabled). Now, Dolphin will first restore state (if enabled) and then append any URLs, rather than replacing the existing set of URLs. The "new instance" case was previously handled automatically and now needs to be explictly handled by checking for it, to make sure that new instances give you a clean window rather than a state-restored window. BUG: 427274 FIXED-IN: 20.12
2020-08-25Output of licensedigger + manual cleanup afterwards.Elvis Angelaccio
Unfortunately licensedigger does not strip the trailing * characters. While at it, use a common style for all source files.
2020-07-19Fix "Show folders, tabs, and window state from last time" featureAntonio Rojas
We were using the DBus interface before declaring it, oops. BUG: 422300 FIXED-IN: 20.08.0
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-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-06Correct invalid homepage URLNate Graham
BUG: 414901 FIXED-IN: 19.12.1
2019-10-13properly enable hi-dpi supportChristoph Cullmann
2019-09-02Making sure that DBus objects are all created before the serviceAlexander Saoutkin
Summary: Currently the DBus service is created before the MainWindow DBus object is created. This can cause hangs if another service makes calls to a a method in an object that's not been initialised, when the service is already published. This patch defers the creation of the service until all DBus objects are created. Test Plan: Tested in KDevelop. Have "open new folders in tabs" feature enabled. Open several folders with Dolphin at once. Before this patch there would be noticeable hanging. With this patch all tabs instantly open with no hanging. Reviewers: elvisangelaccio, ngraham Reviewed By: elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D23672