┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
AgeCommit message (Collapse)Author
2026-02-20Add keyboard shortcut support for service menu actionsAlbert Mkhitaryan
Introduce ServiceMenuShortcutManager, which registers all service menu actions with KActionCollection at startup allowing users to assign keyboard shortcuts in Configure Keyboard Shorcuts. Save/Load of configs happens via KXMLGUI in dolphinui.rc. Notes: - Manager initializes before setupGUI() for shortcut restoration - Execution and validation handled entirely by KFileItemAction in KIO. BUG: 260266
2026-01-28panel/terminal: Add ability to disable konsole url syncEgor Maksimov
Sometimes when you work on the project using the build in konsole, most commands are meant to be run at the project root. This allows for user to disable URL sync so that one could browse the project tree without constantly needing go back to the root folder just to run a command. BUG: 306381
2026-01-22clang-tidy: fix unecessary-value-paramMéven Car
2026-01-22clang-tidy: use default for trivial constructorMéven Car
2026-01-20dolphinview: when creating a subfolder expand to it if in details modeMéven Car
So the new folder is in view.
2026-01-17Add options to always show tab bar and hide close buttonsxi ota
This MR adds options to keep tab bar always visible and to remove the close button from tabs. MR !269 cannot be reopened because the branch it is based on is no longer accessible. Per @meven direction, I am opening this new MR. Note: Defaults to current defaults. ![dolphin-config](/uploads/342914c6067f69dfe7146a3c938e2083/dolphin-config.png){width=734 height=597} ![dolphin-main](/uploads/2da396c36ca5074829123511f54968cc/dolphin-main.png){width=762 height=580} Criticisms of previous MR: * Options should take effect immediately when users apply new settings, rather than requiring restart. * Done. * Concern about potential maintenance burden. * I've been maintaining some version of this patch for ~4-5 years, available via [aur/dolphin-tabopts](https://aur.archlinux.org/packages/dolphin-tabopts) and Chaotic AUR. During that time, only two major rebases were needed. First was what appeared to be automated linting and reformatting. Second was when the preferences system was reorganized. Had the patch been integrated in the code base prior to those refactors, the first would have required zero maintainer intervention (assuming automated reformatting). The second would have required minimal effort beyond what was needed for the refactor itself. Every defect I've noticed during that time were also present in the unpatched package. * There is no demand or desire for this feature. * Equivalent settings are available in various apps across operating systems and desktop environments, including several KDE apps, such as akregator, kate, konsole (confirmed in 25.12.1). * The first merge request in this repo !1 was to implement always showing the tab bar. * Some users have found, created an account, and commented at the previous MR to ask that it be reconsidered. * Arch opt-in pkgstats shows non-zero count for aur/dolphin-tabopts since early 2023. Max 15 in early 2025. Current 5. * Chaotic AUR download metrics is 41 (rolling 30-day count). * Unproductive "discussion" not worth further comment.
2026-01-10Use Q_ASSERT instead of Q_CHECK_PTR for plain checks of pointer valueFriedrich W. H. Kossebau
Q_CHECK_PTR (other than the name suggests) is intended only to check the success of memory allocations. Using it for any pointers instead can be misleading due to the "Out of memory" log printed in case of hits.
2026-01-09dolphinmainwindow: Reload context menu plugins when configuration changesPan Zhang
Reload the context menu plugins and share the KFileItemActions with the context menu so it stays up-to-date as the user changes the service menu settings. This uses a KConfigWatcher to trigger settings reload on "kservicemenurc" changes, covering both internal settings changes and external scripts. Remove the obsolete restart prompt in ContextMenuSettingsPage since changes are now applied instantly. BUG: 508722
2025-12-03folderstabssettingspage: add 3 options for closing split viewRafał Lichwała
There is one bool setting in Dolphin Interface->Folders&Tabs->Split_view which determines which panel is closed on "Close split view" button click (currently focused or unfocused one). This commit replaces this setting with (enum-based) 3-state combo box. Since now we can set "When closing a split view" action to: - Close the active pane - Close the inactive pane - Close the right pane BUG: 464696 BUG: 186185
2025-11-21context menu: use selected item as containing folder for New file menuMéven Car
Use current view url as fallback. Don't update the selection after a directory is created, except if there was no selection. CCBUG: 508196 BUG: 512020
2025-11-02Revert "Make create folder use selected directory !1026"Méven Car
This reverts merge request !1035 65bb95f5 This simply made an unexpected behavior change, opposite to most users expectations. https://discuss.kde.org/t/slightly-strange-behaviour-in-dolphin/40209/33 Disregarding https://en.wikipedia.org/wiki/Principle_of_least_astonishment (Occam's razor) Having different behavior when there a folder selected + shortcut, and a folder selected + context menu should be considered different use case. One has a strong context established, the other has no context from the user perspective. BUG: 510757 CCBUG: 508196 It re-introduces 508196
2025-09-19DolphinTabPage: Show separator when navigator is outside of menubarAkseli Lahtinen
When navigator is outside of menubar, we should show separator under it to make it visually easier to understand it's a clickable area. This adds a small separator, that will be disabled when the navigator is moved back to menubar. BUG: 508303
2025-09-07Add support for Redo operationsGleb Kasachou
This MR updates Dolphin to support redo functionality added in KIO's FileUndoManager. It enables triggering redo operations from the user interface and ensures appropriate integration with the undo/redo command flow. Require: [!1941](https://invent.kde.org/frameworks/kio/-/merge_requests/1941) BUG: 451746
2025-08-26Make create folder use selected directorylzwind lzwind
This change makes `Ctrl+Shift+N` behavior consistent with right-click context menu: - If a single directory is selected, create inside it - Otherwise, create in current working directory BUG: 508196
2025-08-13Add a Window Color Scheme menu in the Configure menuKostiantyn Korchuhanov
The menu is located at Menu -> Configure -> Window color scheme Either in menu or hamburger mode. FEATURE: 506618
2025-08-07DolphinMainWindow: Notify current selection changed when changing tabsLeonardo Malaman
So the Information Panel refreshes.
2025-06-27dolphinmainwindow: zoom action is now a KToolBarPopupActionMéven Car
It has no menu() but popupMenu() instead.
2025-06-01fix incorrect view reset when unmounting similarly-named devicesVladislav Kachegov
Previously, unmounting a device would incorrectly reset views containing: - Paths with similar names (e.g. "/media/disk" and "/media/disk_2") - Substrings of the mounted path Now only resets views showing either: 1. The exact mounted path (e.g. "/media/disk") 2. Its subdirectories (e.g. "/media/disk/docs")
2025-05-12Prevent a compile warningMéven Car
NO_CHANGELOG
2025-04-19Add Filelight menu to Tools menuFelix Ernst
The menu for installing and launching Filelight was only available through the status bar free space info button until now. By default we do no longer show the free space info button because the status bar has been changed to show less information by default. This commit adds the "Manage Disk Space Usage" menu to the "Tools" menu in the menu bar so it is more discoverable for users.
2025-04-16Fix session restoreFelix Ernst
Since https://commits.kde.org/kxmlgui/8c9fb02a1d37672b26a03a9dd9e8675743deb269 KXmlGui only triggers a session restore for a window when the session config contains a "NumberOfWindows" key with a value >= 1. This commit adds such a key to the Dolphin session config, which fixes the Dolphin main window restore for KXmlGui versions containing that commit. BUG: 502770
2025-04-16Add a new "view_settings" actionJin Liu
This should replace the "View Mode" button in the toolbar by default. Its dropdown menu contains more actions related to the view: zoom, sort by, show additional columns, show hidden files, grouping, show file previews. The original "view_mode" action is kept so the "Change View Mode" submenu in the main menu (or in the hamburger menu when this button is invisible) is unchanged.
2025-04-12DolphinNavigator: Hide the KUrlNavigator background if DolphinNavigator is ↵Akseli Lahtinen
outside of toolbar When the DolphinNavigator is outside of the toolbar, it's better to hide the background for better looks. This change works only when Dolphin is built against KIO 6.14.
2025-04-07Rewrite search integrationFelix Ernst
This huge commit is a nearly complete rewrite of the Dolphin search code. It implements most of the improved Dolphin search UI/UX as designed and discussed in a collaborative effort by Kristen McWilliam, Jin Liu, Andy Betts, Tagwerk, a few others and me. See https://invent.kde.org/system/dolphin/-/issues/46. # Notable changes - A toggle to change the search tool is provided as most contributors deemed that useful in https://invent.kde.org/system/dolphin/-/merge_requests/642#note_985112. - The default search is changed to filenamesearch for maximum reliability. - Removing all search parameters will take users back to the view state prior to starting a search instead of keeping the search results open. - The UI for choosing file types or modification dates has been made more powerful with more granularity and more options. - Most search parameters can be configured from a popup menu which gives us extra space for extra clarity. - Labels and help buttons as well as hyperlinks to settings makes sure the user always knows why some search parameters are unavailable in some contexts. - Chips show important search parameters while the popup is closed. They allow quickly removing filters. - The titles of the search and the input field placeholder message change to make clear whether file names or file contents are searched. - When the user actively switches the search tool, whether content should be searched, or whether to search everywhere, this is preserved for the initial state of the search bar when the user opens it the next time after restarting Dolphin. # Architecture - The new DolphinQuery class is independent of the UI and contains all search parameters modifiable in Dolphin as easy setters and getters. - DolphinQuery objects are also used to update the states of every component in the search UI. There is now a clear separation of UI and search configuration/DolphinQuery. - DolphinQuery is responsible for exporting to and importing from search URLs. - The search UI always reflects the currently configured DolphinQuery no matter if the user changed the UI to change the DolphinQuery or loaded a DolphinQuery/older search URL which then is reflected in the UI. - I tried to simplify all classes and their interaction between each other as much as possible. - I added some tests BUG: 386754 CCBUG: 435119 CCBUG: 458761 BUG: 446387 BUG: 470136 CCBUG: 471556 CCBUG: 475439 CCBUG: 477969 BUG: 480001 BUG: 483578 BUG: 488047 BUG: 488845 BUG: 500103 FIXED-IN: 25.08
2025-03-17contextmenu: Use default terminal's icons for "Open Terminal" and "Open ↵Angus McLean
Terminal Here" actions The "Open Terminal" and "Open Terminal Here" actions now use the icon of the user default terminal emulator application, instead of always using the "utilities-terminal" icon. BUG: 501435
2025-03-04Use nicer split iconNate Graham
This is the icon that Konsole uses, and it communicates the point better than the current one. Related to #68
2025-02-24Add smaller statusbar and set it as defaultAkseli Lahtinen
- Statusbar has three modes: Small, FullWidth and Disabled - FullWidth is the original statusbar - Small is the new default statusbar - This statusbar overlays on top of the items instead of taking space - It changes size according to content - Disabled turns statusbar completely off - Zoom slider and space information is only shown in full-width statusbar - Space information is now always on - If user navigates with keyboard, or scrolls to selection, the scrolling will take the statusbar into account - This makes sure the statusbar does not cover any items Related discussion: https://invent.kde.org/system/dolphin/-/issues/50
2025-02-23Improve Close split menu action labelKai Uwe Broulik
A "Close" isn't very descriptive. Instead, show "Close Left View" or "Close Right View" in the menu.
2025-02-03implement shortcut action for file creationChristian Schwarz
BUG: 462899
2025-01-28Clear forward action popup menu before adding history actionsKai Uwe Broulik
Otherwise the menu keeps growing and growing. The back button had the clear call but here it was forgotten.
2025-01-06When marking recent folders access specify mimeTypeMéven Car
CCBUG: 496179
2024-12-04Always focus the view after place activationFelix Ernst
This one-liner makes sure keyboard focus always moves to the active view when a place in the places panel is activated. Previously focus would remain on the places panel if the activated location was identical to the already displayed location. This added consistency is helpful because keyboard-only users will get used to be able to move from the places panel to the view by pressing the Enter key, even though this does not always work prior to this commit. This issue was identified in an accessibility scan done by HAN University of Applied Science.
2024-11-29Make "open path" and "open path in new tab" scroll to the selected itemAkseli Lahtinen
**Open Path** When user clicks on "Open Path" after searching for an item, user expects the view to show the item immediately. We wait for the KItemListSmoothScroller to be done with its animation before the scrollbar sizes are being changed. **Open Path in New Tab** When user selects "Open Path in New Tab", we open a new tab to the folder where the file is, then select and set the file current. We need to get the correct tab when opening one, so it has been added as a return value. BUG:495613
2024-11-02when splitting view, use selected folder as urlMéven Car
BUG: 483937
2024-10-31Have "Replace Location" toggle focus of the viewFelix Ernst
The "Replace Location" action moves focus to the location bar and selects the full path there so it can easily be replaced with a different path. When the full path is already selected, triggering "Replace Location" will toggle the editable state of the location bar. This commit makes it, that this also moves the focus to the view. This way, pressing Ctrl+L multiple times will switch back and forth between focusing and selecting the location bar path and focusing the view. This seems more sensible than only partially resetting the state when the "Replace Location" keyboard shortcut is pressed twice.
2024-10-31refactor: replace QString() with QStringLiteral() for better performanceZhangzhi Hu
2024-10-17Disable inline renaming for phones by defaultFelix Ernst
It currently does not seem to work together with virtual keyboards.
2024-10-17Add phone UIFelix Ernst
Previous to this commit launching Dolphin on phones (e.g. those running Plasma Mobile) would show Dolphin with its default user interface optimised for desktop usage. This commit changes this so instead a phone form factor optimised user interface is used. The differences to the default UI configuration are: -Toolbar at bottom -Icon-only toolbar -Different actions on the toolbar -Places panel hidden -Location bar at the top with a button to show places -Zoom slider hidden (pinch gestures to zoom still work) Through these changes Dolphin actually has a good user experience on phones by default. All the features were already there. Especially Steffen Hartleib's work to trigger selection mode on long press leads to great UX when dealing with multiple files. Still, this might be considered just a start towards making Dolphin great on phone form factors. Secondary windows that Dolphin might spawn are not yet adapted, but are usable on Plasma Mobile as they are anyway.
2024-10-15Fix double-click view background featureFelix Ernst
c934e803647674b4692668f047b6ffa18121982a was meant to change the double-click view background feature to only allow double-clicks with the left mouse button. However, it mistakenly did the exact opposite and allowed every double-click except ones with the left mouse button to trigger the feature. This one-liner fixes this.
2024-09-02Don't crash when there is no view container yetNicolas Fella
SENTRY: DOLPHIN-2Q3
2024-08-18Implement "Focus Places Panel"Felix Ernst
This commit implements an action to move focus to the Places panel analogous to "Focus Terminal Panel" functionality-wise. The implementation of the "Focus Terminal Panel" and "Focus Places Panel" actions is streamlined while improving their code quality. The "Focus Terminal Panel" action is moved into the "Show Panels" sub-menu because it makes more sense to be there considering that its previous location (the "Tools" menu) is meant for external applications and not for functionality internal to Dolphin. This commit also makes it so the keyboard focus is moved to and from the Places panel whenever it is toggled visible or invisible. This is now consistent with the focus handling when the Terminal panel is shown or hidden. The "Focus Places Panel" is one of the actions which was wished for in KDE's accessibility chat room because people relying on keyboard controls might need to press the Tab key a lot to move from the view to the Places panel. The new default shortcut is Ctrl+P.
2024-08-16Only accept left mouse button for double click actionsMéven Car
Such * double click background BUG: 485295
2024-07-04avoid need for activities libChristoph Cullmann
use KRecentFilesAction like Kate and others to signal used files/dirs could later be used to plug-in a recently used menu, too, if ever wanted avoids that this dependency could be missed and the functionality is not there, too
2024-06-24DolphinViewContainer: Use KMessageWidget::MessageType instead of own typeFelix Ernst
This slightly simplifies code and allows showing KMessageWidget::Positive message boxes.
2024-06-23fix information panel iconleia uwu
see https://invent.kde.org/frameworks/breeze-icons/-/merge_requests/364#note_969048
2024-05-11Add "Act as Administrator" toggle actionFelix Ernst
This commit adds an "Act as Administrator" toggle action to the View menu if kio-admin is installed. The action allows switching between acting as an admin with root-access or not. This was already possible in Dolphin when kio-admin is installed by editing the location bar directly. However this is somewhat unintuitive and there are no warnings at all about the dangers of acting as an administrator. This commit adds a warning dialog when triggering the action. It is somewhat explicit about the risks because this is in fact very dangerous. Furthermore, while acting on a view with administrative privileges, a bar above the view shows up that contains a warning. The bar can be closed to stop acting with elevated privileges. The warning dialog can be disabled and re-enabled from the Dolphin settings but only if the action is even available. There is a lot more to be done to further improve this feature both security-wise as well as when it comes to usability. But considering that we are already encouraging users to use this feature without any warnings at all, I feel like now is a good time to merge this. This work is part of a project funded through the NGI0 Entrust Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology. As such, please contact me if you plan on doing related work so what you are doing doesn't collide with work I am being funded to do.
2024-05-11Check if namejob is already being run before opening new createDirectory dialogAkseli Lahtinen
This is a fix for a bug where in network views (or otherwise slow systems), pressing `Ctrl+Shift+N` multiple times opens multiple popup windows and thus causes a crash when any of the popups is interacted with after closing the topmost one. The problem is not the crash with popups themselves, but that we're opening multiple popups in the first place. In regular views this works fine, since the `nameJob` does not take long time at all and only one popup opens, immediately blocking the shortcut. In network views, the `nameJob` seems to take a while to run, since it is loading info from network. If user spams `Ctrl+Shift+N` shortcut in frustration, it starts more `nameJob`s and eventually when those jobs are done, it opens multiple popups. This code checks that if we're already running a `namejob`, we're very likely waiting for the `createDir` popup to appear, so we don't do anything until there is no more `nameJob` running. I've tested that it works in both network and regular Dolphin views. BUG:481401
2024-05-08view: Add setting to trigger user set action with double clickGeorge Florea Bănuș
Default action is select-all.
2024-04-06Change "Could not" to "Cannot" in error messagesJin Liu
To align with KIO
2024-04-03DolphinMainWindow: show a banner when the user presses the shortcut of a ↵Jin Liu
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