┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
AgeCommit message (Collapse)Author
2023-05-08Merge branch 'master' into kf6Méven Car
2023-04-25Fix activating the Selection Mode with a keyboard shortcutEugene Popov
If a spacebar is used as a keyboard shortcut to activate the Selection Mode, then allow this shortcut to be triggered only if the view has a keyboard focus. BUG: 465489
2023-04-22TerminalPanel: rename currentWorkingDirectoryIsParentOf to ↵Méven Car
currentWorkingDirectoryIsChildOf NO_CHANGELOG
2023-04-21TerminalPanel: better check if terminal needs to change its ↵Méven Car
currentWorkingDirectory when unmounting CCBUG: 467403
2023-04-20Restrict attaching instances to those on the same activity or same virtual ↵Méven Car
desktop CCBUG: 408919
2023-04-02Context menu: allow to show copy to/move to inactive split viewMéven Car
Prevent copying/moving to same folder as origin when copying/moving to inactive split view BUG: 356436
2023-03-04Port away from deprecated KNewFileMenu ctorNicolas Fella
2023-02-25Save a in-thread stat call each time the context menu is displayedMéven Car
2023-02-14Fix a disconnect warningMéven Car
NO_CHANGELOG
2023-02-14Fix 'Show Target' for non-local URLsNicolas Fella
Links are not always local files, e.g. 'remote:/zeroconf' links to 'zeroconf:/' The current code fails there Instead of using QFile API that does not work on non-local URLs use QUrl::resolved to resolve relative links Furthermore, QFile::exists doesn't work for non-local URLs. Instead do a KIO stat to check whether the target exists
2023-02-09Reveal the Backspace shortcut in the UIForest ix
Since the Back action already has two standard shortcuts, a third one appended to the list will be invisible in the UI, which shows only the first two. This leaves users unable to reassign it. We therefore make it the first shortcut in the list, so that the hidden third entry will be the dedicated Back button, which users are far less likely to want reassigned. BUG: 371130
2023-02-09Avoid crash on start when help actions are restricted through the Kiosk systemAlexander Volkov
This was first applied in 0ac57fbe90d580a514c3bac4cefaa9ed87f178f9, but then "reverted" in 3ccdcc2176bc5e4e03f733c21d05a5a4b0c1af25 by misunderstanding.
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2023-01-25Clear filter bar on clicking current folder in placesSerg Podtynnyi
Reset the filter bar when user clicks on the current folder in places list, also rename slot function to be more clear. BUG: 259382
2023-01-12Update split action when settings changeKai Uwe Broulik
In case "closing split view closes active view" setting is changed
2023-01-11Make space shortcut for selection mode view-local instead of globalFelix Ernst
Before this commit, the "Space" keyboard shortcut was bound to triggering selection mode by default. After this commit, pressing "Space" will only trigger selection mode when the file view area has keyboard focus. Pros: + Other buttons in the UI can be triggered with Space once again just like it is expected from an accessibility point of view. + "Type-ahead" searching works once more when typing the space char for file names containing such a space char. Cons: - "Space" can no longer be used to add the currently underlined item to the selection. Instead "Ctrl+Space" needs to be used. (However, this is the current status anyway unless a user has manually unbound "Space" as a shortcut from Selection Mode.) - The Selection Mode action will no longer show "Space" as its shortcut in menus. Overall, I see solutions to all of these problems, but they seem over-engineered for the issues they are trying to solve, so I believe this somewhat small commit is the best solution for now. BUG: 458282 BUG: 458281 CCBUG: 463048 FIXED-IN: 23.04
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-10-15Port away from deprecated KMessageBox Yes/NoFriedrich W. H. Kossebau
GIT_SILENT
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-10-11Fix item highlighting through DBusFelix Ernst
Before this commit, even items that are distant children of currently open views were considered selectable. This lead to the bug that items meant to be highlighted through DBus would not be highlighted if any ancestor of the item was open in any view. This was fixed by only considering items in view if they can be seen by scrolling. Main difficulty here was to make this also work for the details view mode which allows expanding. To implement this cleanly, some refactoring seemed necessary because the logic to determine if an item is already in view was previously intertwined with the logic to identify already open directories. This commit also contains the following refactorings aiming to make the code more readable: - A magic value (-1) is replaced using std::optional. - A boolean trap is removed. - A QPair is replaced by a struct with named variables. - More and improved documentation
2022-10-11port to KIO::createDefaultJobUiDelegateLaurent Montel
2022-10-02Remove superfluous setData callKai Uwe Broulik
It's done by urlNavigatorHistoryAction already
2022-09-15Improve selection action toggle codeFelix Ernst
@broulik noticed an issue in the code. This commit fixes it. ------------------- Before this commit there was a `QObject::disconnect` call that did nothing (because it had `nullptr` as the first parameter) and there was a `QObject::connect` call that created the same connections multiple times because of this. This had no effect on end users. However such code can lead to issues in the future e.g. if we ever had a situation in which the selection mode could be toggled for an inactive view container. This commit solves this by replacing the `QObject::disconnect` call with one that works. The `QObject::connect` call is moved so there won't be multiple connections of the same type.
2022-08-18Clean up code that became redundant through framework changesFelix Ernst
There were two changes in framework that triggered this commit: KHamburgerMenu and KToolTipHelper. When the Dolphin-specific hamburger menu was replaced by KHamburgerMenu, I didn't clean everything up correctly. Not anymore! Help texts also weren't updated accordingly. This commit replaces any mention of the old hamburger menu which was called "Control" with text that reflects the current application state. The other framework change "KToolTipHelper" takes responsibility for opening links in help texts. So we won't need code to do this in Dolphin anymore. This means we can also get rid of some duplicate help texts which only existed because links didn't work correctly in some places.
2022-08-14Improve naming consistency and leave mode on EscapeFelix Ernst
2022-08-14Improve code qualityFelix Ernst
2022-08-14Better separation of classesFelix Ernst
Make obvious when actions trigger selection mode.
2022-08-14Keep working towards a reviewable stateFelix Ernst
- Various code improvements - Smoother animations - The bottom bar in General Mode only becomes visible if items are currently selected - Removed the selection mode action from the default toolbar since it can already be toggled in various ways - More documentation - Some cleaning
2022-08-14Add Selection ModeFelix Ernst
The selection mode action is a checkable toggle action named "Select Files and Folders" which has "Space" as the default shortcut. In selection mode a bottom bar with contextual actions is shown. These should mostly mirror the actions which are available through the right-click context menu aka DolphinContextMenu. Resizing of the window might make a overflow button appear in the bottom selection mode bar. This commit makes press and hold in the view activate selection mode. This behaviour is not triggered if the press and hold is used to either start a rubberband selection or a drag operation within a short time. The length of the short timeframe is defined by a QStyleHint. This is currently not implemented in touch because I can't test it. Mix the selection mode bars' background colors using a nice combination of colors from the current color scheme BUG: 427202
2022-07-14Port from KNewFileMenu::setPopupFiles to KNewFileMenu::setWorkingDirectoryNicolas Fella
The former is deprecated
2022-07-13Add "Show statusbar" menu entry in "Settings"Kai Uwe Broulik
Makes this setting more accessible and makes it consistent with other KDE applications. Since Dolphin has a separate status bar on each view container and doesn't use kxmlgui's statusbar, we don't get this menu entry automatically.
2022-07-13Open >5 terminals dialog: use action terms instead of Yes/No buttonsFriedrich W. H. Kossebau
Yes/No buttons in dialogs are discouraged (not only) by KDE HIG in favour of actions terms.
2022-06-22do not open excessive tabAndrey Butirsky
even if directory of the file to be created is not the top-most opened in TreeView BUG: 440663
2022-06-21formattingAndrey Butirsky
2022-06-20Remove duplicate headers between cpp/hLaurent Montel
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-31Migrate old custom view font config entriesAhmad Samir
2022-05-29Allow OpenTerminalHere to work for recentlyused:/ and recentdocuments:/Méven Car
2022-05-13Drop KNS3 prefix for KMoreTools includesAlexander Lohnau
In KF6 KMoreTools should become it's own library and thus the KNS3 prefix should get removed. Considering that the classes are not in any namespace, having a namespaced include is not needed and only causes noise.
2022-05-02Re-add "Open Terminal Here" featureoioi 555
This is equivalent to the "Open Terminal Here" feature that existed until Version 20.12. If the user has selected folders, replace "Open Terminal" in the context menu with "Open Terminal Here". When more than 5 folders are selected, a modal window will ask the user if they are sure they want to open all 6 or more terminal windows. In Detail View, users can also select a file, which will open a terminal at the location of that file. BUG: 452637 FIXED-IN: 22.08
2022-04-02Refactor DolphinContextMenu so its actions are retrievableFelix Ernst
This mostly red MR should have no visible effect. It is part of my work towards !273. There are two calls necessary to open the DolphinContextMenu: One to construct it and one to execute/show it. Before this commit, the actual populating of the ContextMenu was done on execute. This meant that the actions of the ContextMenu couldn't be looked at or changed without first showing the Menu to the user. It also meant that the construction itself didn't actually do much constructing/populating at all which might seem a bit unintuitive. This commit changes this behaviour so the DolphinContextMenu is actually populated fully on construction. The executing/showing of the ContextMenu now does just that and nothing more. Previously, some actions in the context menu were actually not wired up to anything and instead the DolphinContextMenu or the DolphinMainWindow executed some code after the user had clicked such a dummy action from the ContextMenu. Now all the actions are properly constructed beforehand and no special handling is necessary when the ContextMenu hides itself. This commit removes the pos parameter from the DolphinContextMenu constructor. This parameter contained the position where the Menu would be shown later. This information isn't necessary to have on construction and was already part of the exec(pos) call in the first place. The variable m_pos that stored the value is removed. This commit also removes a "customActions" functionality that can supposedly be used to add further custom actions to the DolphinContextMenu but this functionality isn't ever used anywhere so its usefulness is questionable. It also wouldn't be difficult to re-add this functionality if it was ever required for something. This commit also addresses an old TODO in dolphinpart.cpp that asked for the calls for opening the DolphinContextMenu to actually contain the information for which items the DolphinContextMenu is supposed to be constructed. Before this, only the item that was directly clicked was transmitted and then DolphinContextMenu retrieved the currently selected set of items by itself. It makes more sense that DolphinContextMenu would be informed on construction which items it is supposed to show context actions for. Most of this is necessary so we are able to show the contextual actions anywhere else than in the ContextMenu in the future. I am targeting 22.08 with this MR because it makes no sense to merge a refactor for the upcoming release already.
2022-03-18Prettify labels in back/forward button menuKai Uwe Broulik
Adds a compact label based on the closes place similar to the address bar (e.g. instead of /home/user/Pictures/Holidays it will show Pictures/Holidays), unless "show full path in address bar" is enabled. Also, add the folder icon
2022-02-05Hide "Places" section header when panels are unlockedKai Uwe Broulik
Avoids showing "Places" twice.
2022-01-31Add "Unlock panels" to main window context menuKai Uwe Broulik
It's the Qt-provided one that shows on the menu bar and dock widget title bars.
2022-01-29Sync panel action icon to built-in toggleViewActionKai Uwe Broulik
Ensures the icon is used consistently also in Qt-provided UI
2022-01-25Expose konsolepart shortcuts in Dolphin's shortcuts viewStephan Sahm
Adapt some changes from Yakuake https://invent.kde.org/utilities/yakuake/-/commit/a0b08cb1f71ef18449bfbf5852c01e323604142f credit to Stephan Sahm @schlichtanders BUG: 428265
2022-01-15We depend against kf5.91Laurent Montel
2022-01-09Port back to KFilePlacesViewKai Uwe Broulik
This removes the custom-view engine version of the places panel and replaces it with the upstream `KFilePlacesView` from KIO.
2021-12-18Merge branch 'release/21.12'Kai Uwe Broulik