┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinview.cpp
AgeCommit message (Collapse)Author
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
2023-02-01dolphinview: Fix right click broken on placeholderLabelDavide Garberi
* This commit fixes the right click context menu not being shown whenever the click is made right on the placeholderLabel text Signed-off-by: Davide Garberi <[email protected]>
2022-11-30DolphinView: Add placeholder label for AFC kioKai Uwe Broulik
Similar to how it's special-cased for MTP
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-11-25Fixed build-time deprecation warning about KStandardGuiItem::yes()Shivodit Gill
While building dolphin, a warning comes up about KStandardGuiItem::yes() being deprecated, and that another action verb should be using instead. This commit fixes the warning by replacing KStandardGuiItem::yes() with a KGuiItem constructor in the file src/views/dolphinview.cpp. The icon for the "Rename and Hide" button has also been changed from a check mark (dialog-ok) to an eye with a cross (view-hidden) to make the button look more unique and grab the attention of the user.
2022-10-16Port away from deprecated KIO APIAhmad Samir
2022-10-15Port away from deprecated KMessageBox Yes/NoFriedrich W. H. Kossebau
GIT_SILENT
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-09-26Remove unused includesLaurent Montel
2022-09-15[dolphinview] Disconnect modelChanged when destructingFelix Ernst
Deleting DolphinView deletes KItemListContainer, which deletes KItemListController, which emits modelChanged, which causes a signal delivery to the already destroyed DolphinView This is never good, and in Qt6 causes an assert (https://codereview.qt-project.org/c/qt/qtbase/+/381860). Co-authored-by: Nicolas Fella <[email protected]>
2022-08-24Don't show error message on ERR_USER_CANCELEDKai Uwe Broulik
There's no point telling the user what they just did. After https://invent.kde.org/frameworks/kio/-/commit/f192c133eb01bc8448d5ddd97fe20f8e6dbc467d this error has a text associated with it, so it might show up in the UI.
2022-08-14Don't show selection toggle areas on files while in selection modeFelix Ernst
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-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-13Open >5 items 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-07-11portalize drag urlsHarald Sitter
this enables sandboxed application to receive drop events
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-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-15Fix rare ToolTipManager crash on exitDāvis Mosāns
If tooltips are enabled and you hover over item while immediately closing Dolphin sometimes it would crash because native parent might have been destroyed before DolphinView
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-05-24fix: Dolphin right click and compress doesn't scrollAndrey Butirsky
For newly created items being selected, we had updateViewState() called twice, and the first call blocked work execution needed in the other one
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-31Improve placeholder message for unassigned tagNicolas Fella
When opening tags:/ we show 'No tags' when there are no tags found. When opening a tag that exists but doesn't have any files associated we show the same message, which isnt't appropriate. Instead show "No files tagged with 'foo'", which makes more sense
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-28kitemlistview: Port KItemListView::itemAt to std::optionalFushan Wen
Use `value_or(-1)` for those functions that don't use `std::optional`.
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-11-03Port ViewModeSettings from macros to std::variantFelix Ernst
Macros should be avoided if possible. Instead this commit replaces the usage of macros with an std::variant of the ViewModeSettings. As part of this cleanup, code that belongs to the VideModeSettings class is moved there. Some parameters are also renamed to be more in line with typical naming conventions.
2021-11-02Remove duplicate include from .h/.cppLaurent Montel
2021-08-29Revert "Revert "Configurable Show hidden files and folders last toggle""Elvis Angelaccio
This reverts commit bb67def173f31819bb9a696627f9af71c7037dcd.
2021-08-29Merge branch 'release/21.08'Elvis Angelaccio
2021-08-26Use default icon size when resetting zoom levelEugene Popov
BUG: 437349
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-07-16Fix placeholder label text within an empty folder in TrashJordan Bucklin
An empty folder within the Trash bin previously had the placeholder label "Trash is empty". This label should only appear in top-most Trash/ url, and "Folder is empty" otherwise. BUG: 439952
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
2021-04-19When renaming files, move to next file using tab key or up/downMéven Car
To rename previous file: Up or Shift-Tab To rename next file: Down or Tab Credit goes to msciubidlo FEATURE: 403931 FEATURE: 269987 BUG: 334533 FIXED-IN: 21.08
2021-02-09Add missing includesNicolas Fella
2021-02-08Avoid KJob::exec() in DolphinViewFelix Ernst
This commit replaces an error-prone usage of KIO::StatJob::exec() in DolphinView with the recommended KIO::StatJob::start(). The containing method DolphinView::statusBarText() is changed to be a method without return value: requestStatusBarText() The new status bar text is instead returned through a new setStatusBarText() signal that will be emitted asynchronously if necessary. The calling code that deals with status bar text is refactored to correctly work despite the new asynchronicity. The helper method calculateItemCount() is moved into requestStatusBarText() and some other code from requestStatusBarText() is moved into a new helper method emitStatusBarText(). The documentation of KIO::KJob::exec() explains why it should be avoided. A reproducible crash is the reason for this commit.
2021-01-17[DolphinView] Fix "Folder is empty" label showing prematurelyKai Uwe Broulik
Don't show the label while still loading. Since there is no property in `KDirLister` a dedicated `m_loading` is added for this purpose. Also, I removed the explicit update on `urlChanged` as the view probably won't change until the lister starts loading. BUG: 430085
2021-01-10Open new tab placement optionAnthony Fieroni
Signed-off-by: Anthony Fieroni <[email protected]>
2020-12-03DolphinView: set the parent of layout in the ctorAhmad Samir
This silences a runtime warning: QLayout: Attempting to add QLayout "" to DolphinView "", which already has a layout Remove redudant setLayout() calls, passing a parent widget to the Q*BoxLayout ctor sets that layout as the top-level layout for that widget.
2020-11-28Add placeholder text for empty viewsNate Graham
Throughout our QML-based software, we now display placeholder text for empty views so that the user knows that the view is actually empty, and it's not that the software is just broken. This commit introduces the same thing for Dolphin's main view. BUG: 429248 BUG: 426354 FIXED-IN: 21.04
2020-11-01Port away from deprecated QWheelEvent::delta()Elvis Angelaccio
QWheelEvent::angleDelta() returns a QPoint instead of int, so we need to use its y() value to get the number of steps.