┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinview.h
AgeCommit message (Collapse)Author
2026-01-22clang-tidy: modernize-use-usingMéven Car
2026-01-22clang-tidy: fix unecessary-value-paramMé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.
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-21DolphinView: open the property dialog on Alt+activatedMéven Car
Similarly to Microsoft explorer. FEATURE: 512383
2025-09-11dolphinview: add preferred sort order for rolesNathan Williams
BUG: 425457 This commit ensures that both the menu and column headers in table view will have the same default sorting (ascending/descending) for each role. It also saves the user's preferences for each role throughout the session. Previously, sorting by "Modified" would always sort by "Oldest First." If the user then changed to "Newest First" and sorted again by "Name," files would be sorted in reverse alphabetical order (Z-A). Now, sorting by "Modified" defaults to "Newest First." If a user switches between multiple roles, the default for each role will be used unless the user changes to a non-default sort order. In that case, the user's preference will be applied. Defaults: **Descending Order:** Time-based roles - modificationtime - creationtime - accesstime - deletiontime - imageDateTime - releaseYear Size/dimension roles - size - width - height - pageCount - wordCount - lineCount Quality/Quantity roles - rating - duration - bitrate - frameRate **Ascending order:** - Text based roles (A-Z) - All other roles
2025-05-28dolphinview: Add a dynamic view optionVictor Blanchard
Added a 'dynamic view' option, which allows to switch from a 'compact' or 'details' view to an 'icons' view if most of the files in the directory are images or videos. It reverts to the previous view mode when we switch to a directory which doesn't meet that criteria. The view mode is only changed once so users don't have to undo that for specific folders when they don't want icon view. A setting is added in the "Display style" section of the general view setting page. BUG: 491139
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
2024-12-29Mirror details view mode for right-to-left languagesFelix Ernst
This commit implements mirroring of the details view mode for right-to- left languages. This is the last of the Dolphin view modes which did not adapt to right-to-left languages correctly. Implementation-wise this is mostly about adapting the math so all the information is placed correctly no matter the view mode or layout direction. While most of the view actually changes the painting code for right-to-left languages, for the column header I decided to keep the logic left-to-right and instead reverse the order of the role columns. To implement this mirroring I needed to rework quite a bit of logic, so I used the opportunity to fix some bugs/behaviur quirks: - Left and right padding is now saved and restored separately instead of only saving the left padding - Changing the right padding no longer disables "automatic column resizing". - The grip handles for column resizing can now be grabbed when near the grip handle instead of only allowing grabbing when slightly to the left of the grip. - Role column headers now only show a hover highlight effect when the mouse cursor is actually above that role and not above the grip handle or the padding. - There is now a soft-boarder when shrinking the right padding so shrinking the padding "below zero width" will no longer immediately clear automatic resize behaviour. So now it is possible to simply remove the right padding by resizing it to zero width. BUG: 449211 BUG: 495942 # Acknowledgement This work is part of a my 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.
2024-10-12dolphinview: when rename dialog finishes, immediately update the model and ↵Jin Liu
the selection On sucessful return of the rename dialog, we update the model and the selection immediately to reflect the new name. This is to avoid the short duration after the rename during which the selection is lost. Currently, after the rename dialog finishes, the selection is briefly lost for about 1 second until the view automatically refreshes. This patch updates the model and selection immediately after the dialog finishes, so the renamed file is still selected. BUG: 481717
2024-07-22Notify users if authorization is required to proceedFelix Ernst
Previous to this commit entering a folder without read access would show the non-descriptive error message "Could not enter folder". If the user actually is not allowed to view the contents of the folder, this is indeed true and this commit will preserve this message as is. However, if an admin protocol is installed, users can actually view the contents of most folders after authorizing themselves as administrators. So this commit changes the error message in those specific circumstances to instead read "Authorization required to enter this folder." and provide a button to authorize themselves. This button is the "Act as Administrator" action. If no admin protocol is installed, this commit has no effect. The idea for this change came from Harald Sitter. I receive funding for changes like this by the Next Generation Internet Initiative, which (as I understand it) will no longer provide funds for future projects like this if the current EU draft budget goes through as it is.
2024-05-08view: Add setting to trigger user set action with double clickGeorge Florea Bănuș
Default action is select-all.
2024-01-13Always automatically choose a new file name while duplicatingEugene Popov
Since now when duplicating items we automatically generate a name for the new item, we can do the same if an item with that name already exists. BUG: 475410
2024-01-06DolphinView: merge update functions into set functionsMéven Car
NO_CHANGELOG
2023-12-26Do not rely on KIO source-code compat codeAlexander Lohnau
2023-12-18DolphinView: Ensure to update the whole viewState after a job created filesMéven Car
BUG: 476670
2023-10-12DolphinView: get rid of writeStateChanged signal in setActive()Amol Godbole
The signal writeStateChanged() was not working because it is not connected to slotWriteStateChanged() slots when the active view changes. Replace the signal with direct calls to the slots. Also, do not delay openRequest signal in DolphinSearchBox::slotSearchTextChanged. It's no longer required. BUG: 440366
2023-08-29Fix a bunch of clazy warningsMéven Car
2023-08-23On middle-click, open file with the second application for the file mimeMéven Car
FEATURE: 390631
2023-06-13Settings Add ViewModes > Content displayMéven Car
This does not move the settings location in files though. baby step for https://invent.kde.org/system/dolphin/-/issues/36
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-20DolphinView: allow selectUrls to be considered for selection in more casesMéven Car
* when there is some selection already (some files were created previously) * when the model has not yet insert all the selectedUrls Also * Rename DolphinView::slotCopyingDone to slotItemCreatedFromJob BUG: 407161
2023-02-23Fix header index are colIndex and not roleIndexMéven Car
2023-02-21Fix typo in m_hoveredColumnHearderRoleIndexAleix Pol
2023-02-21Fix uninitialised valueAleix Pol
Do not read m_hoveredColumnHearderRoleIndex before it has been initialised. .6 0x00007fe00632182c in QList<KFileItemModel::RoleInfo>::Node::t (this=<optimized out>, this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:153 .7 QList<KFileItemModel::RoleInfo>::at (i=3080252, this=0x7ffdf2e9bba8) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:572 .8 DolphinView::eventFilter (this=0x5584bef25160, watched=0x5584bef8a300, event=0x7ffdf2e9bd30) at ./src/views/dolphinview.cpp:978 .9 0x00007fe003ebbdda in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 .10 0x00007fe004b6c782 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 .11 0x00007fe004b75411 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 .12 0x00007fe003ebc07a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 .13 0x00007fe004b72269 in QApplication::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 .14 0x00007fe004b6c793 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 .15 0x00007fe003ebc07a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 .16 0x00007fe003f14e0b in QTimerInfoList::activateTimers() () from /lib/x86_64-linux-gnu/libQt5Core.so.5 .17 0x00007fe003f15754 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5 .18 0x00007fe001d20d3b in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 .19 0x00007fe001d756c8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 .20 0x00007fe001d1e3e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 .21 0x00007fe003f15ad8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 .22 0x00007fe003eba99b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 .23 0x00007fe003ec2f34 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5 .24 0x00005584bd2a9aad in main (argc=<optimized out>, argv=<optimized out>) at ./src/main.cpp:249 BUG: 466110
2023-02-18DolphinView: Allow to have tootips on columns headersMéven Car
Add events columnHovered/columnUnHovered to KItemListview and KItemListHeaderWidget.
2023-02-09Fix zooming for high resolution scroll wheelsFriso Smit
BUG: 432671
2023-02-06Selects next item in list after delete/trash actionsSerg Podtynnyi
BUG: 419914 BUG: 181214
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2022-11-29Exit the deleted directory when it is removedMéven Car
If current directory is a local file, try to find nearest dir ancestor and open it. Display warning to the user.
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-08-14Improve naming consistency and leave mode on EscapeFelix Ernst
2022-08-14Improve code qualityFelix Ernst
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-07Add two autotestsFelix Ernst
- The first test makes sure that the width of the places panel doesn't change no matter what other panels are shown or hidden. There used to be bugs about this. - The second test is kind of an integration test. It makes sure that the go actions work correctly. On two occasions we had the regression here that after going "Up" in the file system hierarchy the folder one emerged from didn't have keyboard focus which makes peeking into multiple folders tiresome. The test also makes sure that going back and forward works as expected and there are some sanity checks about which go actions are enabled, which items are selected and that using tabs doesn't interfere with any of that.
2022-07-07Show "Loading canceled" placeholder when loading was canceledKai Uwe Broulik
Rather than "Folder empty", which is misleading as we didn't actually load anything.
2022-07-06Don't reinterpret_cast QEventKai Uwe Broulik
We know that we'll be a `QHelpEvent` from `QEvent::ToolTip`, so do a static_cast from the event handler (where it's obvious from context), and then pass it along to `tryShowNameToolTip`.
2022-06-15Cleanup config-dolphin.h includesAhmad Samir
2022-06-15Use one config-dolphin.h.cmake configuration fileAhmad Samir
2022-05-26Change wording "Leading Column Padding" to "Side Padding"Jin Liu
Since it actually adds padding on both left and right sides, "Side Padding" might be more accurate. This change is also propagated to variable and method names. BUG: 453172
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-01-16Full row highlight implementationTom Lin
This commit implements full-row selection and hover highlights for the details view mode. This commit also contains fixes for 444680, 444753, both uncovered during this change. BUG: 181438 BUG: 444680 BUG: 444753 FIXED-IN: 22.04
2021-12-28Add name-only tooltip and make logicalHeightHints a pair of qreal and boolLeo Treloar
2021-12-17Enable Ctrl/Shift-Click to open folder in a new tab/windowAlessio Bonfiglio
and more
2021-12-06Fix various typosluz paz
Found via `codespell -q 3 -S *.desktop,*.xml`
2021-08-29Revert "Revert "Configurable Show hidden files and folders last toggle""Elvis Angelaccio
This reverts commit bb67def173f31819bb9a696627f9af71c7037dcd.
2021-08-06Revert "Configurable Show hidden files and folders last toggle"Heiko Becker
This reverts commit 50149d6abb8a0a978db3c6afb5238bc42a4a89c8. It breaks the string freeze and I don't think it can count as a bug fix, so it breaks the feature freeze, too. CCMAIL: [email protected]
2021-08-05Configurable Show hidden files and folders last toggleGaston Haro
CCBUG: 241227 Revision: https://phabricator.kde.org/D29115
2021-06-29Show a "Loading..." placeholder textMufeed Ali
Since a placeholder text is being used when the folder is empty, it also makes sense to show a similar placeholder text when the view is still loading, especially now that the status bar which previously contained a loading indicator now disappears when a folder is loading.
2021-04-24InformationPanel: Allow to refresh the panel when its displayed content changesMéven Car
BUG: 430095 BUG: 412902 FIXED-IN: 21.08