┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphintabwidget.h
AgeCommit message (Collapse)Author
2025-02-06Made style and context enhancements ambar chakravartty
Co-authored by: Felix Ernst
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-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-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-08-29Fix a bunch of clazy warningsMéven Car
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
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-06DolphinTabWidget: Allow specifying new tab position in openNewTabKai Uwe Broulik
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
2021-02-09Build with QT_NO_KEYWORDSNicolas Fella
2021-01-10Open new tab placement optionAnthony Fieroni
Signed-off-by: Anthony Fieroni <[email protected]>
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-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-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-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
2019-10-13Add actions for switching to a specific tabAlex Miranda
Summary: Add actions to switch to each of the first 9 tabs and another action to switch to the last tab. This feature makes it much easier to quickly switch between tabs just like you normally would be able to when using a web browser or other applications. Reviewers: #vdg, #dolphin, ngraham, elvisangelaccio Reviewed By: #vdg, #dolphin, ngraham Subscribers: meven, ngraham, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D24353
2019-09-14DolphinTabWidget: cleanup index-by-URL API usageElvis Angelaccio
Summary: Follow-up of D23655 where we didn't have time to polish the code: - add a couple of variables to make the code more clear. - remove the `get` prefix which we usually don't use in Qt code. - make the function private since it's very tied to implementation. - add a new isUrlOpen public method as wrapper. Reviewers: feverfew Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D23860
2019-09-02Fixing bugs in new folders in tabs featureAlexander Saoutkin
Summary: Fixing bug where urls in secondary view containers would not be considered for the open new folders in tabs feature. Test Plan: Manual testing. Testing for no regressions. Testing that URL is found if in secondary view container Reviewers: elvisangelaccio Reviewed By: elvisangelaccio Subscribers: kfm-devel, ngraham Tags: #dolphin Differential Revision: https://phabricator.kde.org/D23655
2019-05-30Open externally called files/directories in new tabsAlexander Saoutkin
Summary: FEATURE: 183429 FIXED-IN: 19.08.0 GUI: new cli argument --new-window Externally called files/directories are opened in a a new tab of an instance of Dolphin that already exists. If any of the given URIs are already open in a tab, then those tabs are activated instead of a new tab being opened. If there is no instance then the files/directories are opened in a new window. The newly opened file/directory has its tab activated, and consequently, the window is also activated. When the user clicks "Open In New Window" or "Detach Tab", the files/directories are opened in a new window. Test Plan: [Manual] Before testing, set the default file manager in system settings as the newly built Dolphin executable. One must also include the new dolphin executable in the $PATH, otherwise some functions will attempt to open the system dolphin instead of the new one. Furthermore, running two different versions of Dolphin (in particular, where one does not have this patch included) can result in bugs appearing, in particular, new tabs not opening as old instances will not recognise the DBus commands sent to it. However, I see no reason why a user will have two different versions of Dolphin (apart from people like us :D). Open directories with the help of auxillary programs (i.e. a browser). The files/directories should appear in a new window if an instance does not exist. If an existence already exists, then a new tab should be opened and activated in that instance and the window activated. Use QDBusViewer to open folders/items by calling the ShowFolders/ShowItems methods in org.freedesktop.FileManager1 of the Dolphin instance. When a user chooses to "Open In New Window"/"Detach Tab" then the files/directories should be opened in a new window. Reviewers: #dolphin, elvisangelaccio Subscribers: zzag, dfaure, fvogt, fikrim, magar, fbg13, davidedmundson, kwin, ngraham, elvisangelaccio, anthonyfieroni, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D16648
2019-03-10Fix clazy-fully-qualified-moc-types warningElvis Angelaccio
Slot arguments should be fully-qualified.
2019-02-16New tab should be placed after the current tabDavid Hallas
Summary: When opening a new using the context menu the new tab should be placed after the currently open tab, not at the end of the tab list. BUG: 403690 Test Plan: Open multiple tabs and select a different tab than the last one. Open a new tab using the context menu and see that it opens after the currently selected tab. Open a tab using Ctrl+T and see that it opens at the end. Reviewers: #dolphin, ngraham, elvisangelaccio Reviewed By: #dolphin, ngraham, elvisangelaccio Subscribers: elvisangelaccio, ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D18945
2018-09-02Changes the tabName function to return the name of a specific tabDavid Hallas
Summary: Changes the tabName function to return the name of the passed in DolphinTabPage. Previously it would return the name of the active tab, which causes in-active tabs to get the wrong name. Test Plan: Open Dolphin Right click a folder and select 'Open in new tab' Notice that the new tab has the wrong title BUG: 397910 Reviewers: #dolphin, ngraham, elvisangelaccio Reviewed By: #dolphin, ngraham, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D15112
2018-08-24Unify window and tab titleDavid Hallas
Summary: Previously the title of tabs was a prettyfied version of the URL. This is inconsistent with the title of the Window and in some cases for specials URLs kind of misleading. This commit generalizes the code from DolphinMainWindow so that both the DolphinMainWindow title and the tab title uses the same function for the title. This also means that the 'Show Full Path in Title Bar' also applies to the tab title, and also that searches changes the tab title. FEATURE: 387851 Test Plan: Open a new tab from the places panel and navigate around. Reviewers: #dolphin, ngraham, elvisangelaccio, markg Reviewed By: #dolphin, ngraham, markg Subscribers: markg, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D14442
2018-04-09Add more tab access functionsNathaniel Graham
Summary: These new functions to access the next and previous tabs are not used by anything yet, but it is envisioned that they would be useful for a variety of purposes--such as the "open path in new tab" feature from D11703 Test Plan: Dolphin still compiled and runs; new code is not actually used anywhere Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Differential Revision: https://phabricator.kde.org/D12039
2017-11-20Modernize: Use override where possibleKevin Funk
Also use override instead of Q_DECL_OVERRIDE
2016-12-28Fix updating of new item menu when changing tabsMartin T. H. Sandsmark
Correctly set the active status of views when changing tabs. Before: Right click in home folder, see create new enabled, open tab, go to /usr, right click and see it is disabled, switch back to first tab and right click, and it is still disabled. After: It is enabled and disabled as appropriate when switching tab. REVIEW: 129664
2015-04-27Simplify startup split view handlingEmmanuel Pescosta
* Instead of setting and resetting GeneralSettings's split view option, just pass it on to openFiles/openDirectories. * Require at least one url in openFiles/openDirectories REVIEW: 123395
2014-11-03Q_DECL_OVERRIDELukáš Tinkl
2014-10-21port Dolphin from KUrl to QUrlLukáš Tinkl
REVIEW: 120688
2014-10-21port Konqueror from KUrl to QUrlLukáš Tinkl
REVIEW: 120650
2014-08-13React on the redirection signal from DolphinView to properly update the tab ↵Emmanuel Pescosta
and window titles. REVIEW: 119697 BUG: 305721
2014-08-13Use DolphinTabPage saveState/restoreState to remember and re-open closed tabs.Emmanuel Pescosta
REVIEW: 118968
2014-08-10Implemented DolphinTabWidget class to encapsulate the tab handling from ↵Emmanuel Pescosta
DolphinMainWindow. REVIEW: 119115