┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphintabwidget.cpp
AgeCommit message (Collapse)Author
2025-02-06Removed conditional in renameTab to allow unsetting custom labelsambar chakravartty
co-authored by: Felix Ernst
2025-02-06changed all calls to "title(), setTitle()" to "customLabel(), setCustomLabel()"ambar chakravartty
2025-02-06changes saveState() and restoreState() to restore renamed tabs (if any)ambar chakravartty
2025-02-06refactored renameTabambar chakravartty
2025-02-06Removed unused imports to QUuid,quuidambar chakravartty
BUG: 197009
2025-02-06Added code for a "Rename Tab" feature.ambar chakravartty
BUG: 197009
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-10-28Overhaul main view accessibilityFelix Ernst
This commit brings the main view of Dolphin into a usable state accessibility-wise. Users of screen readers should have a way better experience while browsing files and folders and navigating along the file system hierarchy. This commit fixes most of the remaining already-identified accessibility issues listed in https://invent.kde.org/teams/accessibility/collaboration/-/issues/28, but not all. Namely, these should now be fixed: 1. Orca should read the element type in dolphin (file, folder, device, link to folder, link to file) 2. Orca should read complete label in icon and compact view mode, currently it only speaks the name, but there could be additional information like the number of elements or the file size. 3. Orca is not able to announce Selecting / Unselecting files in Dolphin. It also never announces how many items are selected in total. (Announcing the total selection can be done by reading out the view element or by pressing the Tab key to get to the status bar with the relevant information.) 4. Dolphin opens on the home directory, but Orca doesn't tell you so. Consider enclosing the area in a frame/panel which updates its accessible name each time you modify the current path by entering or leaving a directory. 5. I don't know what the folder presentation widget is, but it should be presented as a grid view. Currently, we have a terrible experience because the entire row of folders is read at once, with no indication that we can move left and right with the arrows to go between the elements of a row. When I found that out, however, I discovered that when you're on the last icon of the first row and press right arrow, you get to the first icon of the next row, but that's not announced, instead, the whole row is announced at once 6. Orca should announce the current elements instead of "layered pane" when the Folder / File view gets the focus in dolphin 7. Orca reads only name in Table View only of Dolphin 8. Items are sometimes confusingly announced as "collapsed" in contexts in which there is no concept of collapsing/expanding e.g. in icon view mode. A lot of code was moved around and renamed. The three accessibility classes, which all used to be in the same file, are moved into separate files. *Acknowledgement* Thanks to Christian Hempfling and bgt lover for testing as well as originally identifying a lot of the pain points being addressed here. 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. https://kde.org/announcements/2024_ngi_openletter/
2024-07-01Revert "DragAndDropHelper::updateDropAction: use StatJob for remote URLs"Felix Ernst
This reverts commit dc149ec5e52f52c514cf362603d05ba8eea506b8. This prevents a crash. One issue identified is that the commit that I am reverting here accesses a QDropEvent at a moment in time in which it might have already been deleted. We cannot check if it exists by that time because we do not control its lifetime and it is not a QObject.
2024-03-09Handle deprecation of QGuiApplication::paletteChangedMéven Car
NO_CHANGELOG
2024-02-29DragAndDropHelper::updateDropAction: use StatJob for remote URLsJin Liu
When dragging onto tabs/Places from a remote URL, we don't process the QDropEvent immediately, but start a StatJob and process the event when it finishes. Also, the result of the StatJob is cached for 30 seconds, to avoid starting duplicate jobs.
2024-02-17Improve DnD handling in read-only dirsJin Liu
1. Places panel and tabbar update drag status in read-only dir 2. Don't create drop job in readonly directories
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
2024-01-13Fix: closing split view doesn't update tab nameJin Liu
BUG: 469316
2023-11-12DolphinTabWidget: Use tabBarAutoHide propertyAmol Godbole
The tab bar was being hidden manually. Instead, set the tabBarAutoHide property to true. BUG: 476742
2023-08-23Merge branch 'master' into kf6Méven Car
2023-08-17Set Maximum Tab Width for folders to Tab barK. Cottonears
There is no limit to the width of tabs with the tab bar of the main window. If the directory name is too long, tabs can take up a lot of space and can lead to inconsistent tab widths. To alleviate this, set a maximum tab bar text width of 40 characters for each folder. BUG: 420870
2023-07-05Merge branch 'master' into kf6Nicolas Fella
2023-07-05Add explicit moc includes to sources for moc-covered headersFriedrich W. H. Kossebau
* speeds up incremental builds as changes to a header will not always need the full mocs_compilation.cpp for all the target's headers rebuild, while having a moc file sourced into a source file only adds minor extra costs, due to small own code and the used headers usually already covered by the source file, being for the same class/struct * seems to not slow down clean builds, due to empty mocs_compilation.cpp resulting in those quickly processed, while the minor extra cost of the sourced moc files does not outweigh that in summary. Measured times actually improved by some percent points. (ideally CMake would just skip empty mocs_compilation.cpp & its object file one day) * enables compiler to see all methods of a class in same compilation unit to do some sanity checks * potentially more inlining in general, due to more in the compilation unit * allows to keep using more forward declarations in the header, as with the moc code being sourced into the cpp file there definitions can be ensured and often are already for the needs of the normal class methods
2023-05-09Fix a bunch of Qt6/Kf6 warningsMéven Car
2023-04-23Add DolphinTabPage::inactiveViewContainer()Eugene Popov
2023-04-23Improve copying and moving items between panelsEugene Popov
Currently, copying the selected items between panels is performed by the active panel, which is wrong, because the inactive panel cannot select the copied items after the operation is completed (as it happens when drag'n'dropping or copying using keyboard shortcuts).
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2023-01-19Use both split view names in tab namesOliver Beard
When the tab is a split view, use the name of both views rather than only the active view.
2022-10-11Rename variableFelix Ernst
Based on code review feedback by Andrey Butirsky.
2022-10-11Add helper methods to tab widget for view containersFelix Ernst
This commit introduces the private getter DolphinTabWidget::viewContainerAt(ViewIndex) and another private method DolphinTabWidget::activateViewContainerAt(ViewIndex). Both methods return nullptr if there is no valid DolphinViewContainer at the specified ViewIndex.
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-06DolphinTabBar: Open folder in new tab when dropped onto tab barKai Uwe Broulik
2022-10-06DolphinTabWidget: Allow specifying new tab position in openNewTabKai Uwe Broulik
2022-07-09dolphintabwidget.cpp piority of boolean operatorsMarius P
Fix PVS-Studio issue "warning: V648 Priority of the '&&' operation is higher than that of the '||' operation.". Fix clangd issue.
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-05-24prevent excessive tab openingAndrey Butirsky
Without this, KIO::highlightInFileManager() will open additional tab even if file to be highlighted is already present in current view
2021-11-13Fix updating window and tab titlesEugene Popov
This MR fixes an issue where the window and tab titles don't properly handle creating/deleting/renaming items in the places bar, as well as switching to the Search mode.
2021-08-30Tabs: ensure to have folder icons for remote foldersMéven Car
KIO::iconForUrl relies on filename to find the icon for remote files. Appending / at the end of the filename allows it to interpret it as a folder. This causes inconsistent tab icons. To reproduce: Open in a tab a url on a smb or sftp folder, i.e sftp:/my-server/photos Before: Icon is a cloud. After: Icon is a folder Previously a folder icon could be presented if the tab was first opened with a url with a trailing /
2021-04-24Remove code for dolphin < 4.14 tab restoreAlexander Lohnau
The old config keys haven't been written for since KDE 4 times and has been internally marked as deprecated.
2021-03-31Fix crash calling openDirectories() in various casesNate Graham
This can cause a crash when called with a single url and split view, or when the last URL is not shown, because the iterator gets mutated in the loop, so we need to make sure it hasn't gone out of bounds. This check was erroneously removed in 175538020824355115cd98637ce83ecc53badd44 and needs to be brought back.
2021-03-26Don't re-open already-open URLs when using session-restore featureNate Graham
If Dolphin would be asked to open a location that is already open, don't open it again in a new tab; instead switch to that view. Supports tabs and split view. BUG: 434911 FIXED-IN: 21.04
2021-01-10Open new tab placement optionAnthony Fieroni
Signed-off-by: Anthony Fieroni <[email protected]>
2020-11-09Adress the third round of Angelaccio's review commentsFelix Ernst
Additionally remove some redundant code concerning UrlNavigator visuals.
2020-11-09Adress most of the second round of Angelaccio's review commentsFelix Ernst
This commit applies most suggestions which were made on the MR. Most notably the DolphinUrlNavigator class is split up which leads to the creation of a DolphinUrlNavigatorsController class. Additionally some minor coding style and const correctness changes are included. The error value of cached integers is changed from -1 to INT_MIN because situations could come up in which -1 would be a valid value.
2020-11-09Fix a crash and extract unrelated changesFelix Ernst
The secondary UrlNavigator is now created when and only when: - split view mode is activated for the active tab OR - switching to a tab that has split view already enabled. This fixes a crash that occurs when the setting to always start in split view mode is enabled. An animation for activating split view is also removed from this and moved into a separate MR. Another unrelated name change left over from a previous commit (viewContainers() -> activeViewContainers()) is dropped.
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-09Add an option to use an UrlNavigator in the toolbar insteadFelix Ernst
This commit adds a locationInToolbar KToggleAction to switch between using a location bar to navigate or using a new custom QWidgetAction in the toolbar. A big portion of this MR is refactoring because until now the UrlNavigator was tightly intertwined with the DolphinViewContainer. With this MR an UrlNavigator for controlling a View can be freely connected or disconnected with a single method call. A DolphinUrlNavigator class is created in the process which contains all Dolphin-specific UrlNavigator code which did previously reside in the DolphinViewContainer class. Other application parts that belong to UrlNavigator-management are also moved here.
2020-10-23Compile with QT_NO_KEYWORDSAlexander Lohnau
2020-10-23Compile without foreachAlexander Lohnau
2020-10-23DolphinTabWidget: prefer QUrl::toDisplayString() for tooltipsElvis Angelaccio
This is better for remote urls. !35
2020-10-13Add tooltip to tabbartolu schr
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-05-19DolphinView: rename new methods to copy/move urlsElvis Angelaccio
DolphinView doesn't know anything about split views and it shouldn't. Rename these new methods to what they actually do (just copy or move to a given QUrl).
2020-05-14Allow to copy or move selection to the other split viewAntonio Prcela
Summary: FEATURE: 276167 Default keyboard shortcuts set to `SHIFT+F5` for `copy`, `SHIFT+F6` for `move` Reviewers: #dolphin, elvisangelaccio, ngraham, meven, dfaure Reviewed By: #dolphin, elvisangelaccio, ngraham, meven, dfaure Subscribers: yurchor, kde-doc-english, dfaure, meven, kfm-devel Tags: #dolphin, #documentation Differential Revision: https://phabricator.kde.org/D29006