┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphintabwidget.cpp
AgeCommit message (Collapse)Author
2020-04-05Dolphin: port to CommandLauncherJobDavid Faure
Summary: git master already requires 5.69 anyway, due to KBookmarkMenu API change Test Plan: Builds, Tools / Compare Files works. Reviewers: broulik, elvisangelaccio, meven Reviewed By: elvisangelaccio, meven Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D28589
2020-03-01Fix typo in commentAlexander Saoutkin
2020-03-01Fix files not being highlighted if directory of file is already openAlexander Saoutkin
Summary: In DolphinTabWidget::openFiles it assumes openDirectories will open new tabs, so it only marks the URL selection for the newly opened tabs. This assumption is incorrect as Dolphin might reuse tabs when the folder is already open. Even then, markUrlsAsSelected does nothing when the folder is already opened. The selection seems to only be used when the folder finishes loading, calls made after that only change a variable without updating the actual selection. A call to DolphinView::updateViewState() is required to restore the intended behaviour, so long as DolphinView::clearSelection() has been called on the relevant tab, otherwise updateViewState() is a no-op. BUG: 417230 FIXED-IN: 19.12.3 Test Plan: 1. In any application that has an "open containing folder" select that option 2. and then do the same for another file in the same folder Reviewers: broulik Reviewed By: broulik Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D27389
2019-10-21Disable keyboard accelerators for the tabs widgetAlex Miranda
Summary: Now that there are actions for switching to a specific tab with default Alt + <number> shortcuts, automatically assigned keyboard accelerators can result in ambiguous shortcuts when using specific tab names containing numbers. Not adding any accelerators for the tabs widget ensures the default shortcuts work reliably regardless of tab names. Test Plan: - Verify there are no ambiguous shortcuts when browsing folders with names containing only numbers - Verify other keyboard accelerators still work (menu bar, context menu and others) Reviewers: #vdg, #dolphin, ngraham Reviewed By: #vdg, ngraham Subscribers: ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D24794
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-02Merge branch 'Applications/19.08'Elvis Angelaccio
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-09-02[Tab Bar] Resolve tab icon only if visibleKai Uwe Broulik
Calling KIO::iconNameForUrl will determine mime type of the file potentially blocking. Don't needless do it when the tab bar isn't visible. Differential Revision: https://phabricator.kde.org/D23295
2019-07-28Fix an issue with a new tab focusAndrey Yashkin
Summary: When opening a new tab in the background and switching to that tab the focus is set on the location bar instead of the files view. If you switch back to the original tab and then to the new tab again focus will be set on the files view. The problem is caused by creation of //DolphinTabPage// in an active state which leads to skipping by //return// in //DolphinView::setActive(bool active)// without setting the focus on the view. This patch fixes this defect. BUG: 407604 FIXED-IN: 19.11.80 Test Plan: 1. Open a new tab in the background 2. Switch to the new tab 3. Check current focus widget by the up/down arrows on the keyboard with and without changes. Reviewers: #dolphin, ngraham, elvisangelaccio Reviewed By: ngraham Subscribers: anthonyfieroni, ngraham, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D22386
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-05-20Merge branch 'Applications/19.04'Nate Graham
2019-05-20Elide tab titles left so key information at the end of the string doesn't ↵Nate Graham
get cut off Summary: Tab Titles currently elide right. Generally the more useful information is at the right side of the string--even more so when full paths are being used. BUG: 406569 FIXED-IN: 19.04.2 Test Plan: - No change when tab titles don't get elided - When tabs show the full path and titles are elided, they're now useful: {F6782447} - When tabs don't show the full path and are elided, they're elided on the other side which seems maybe a tiny bit better, but at least no worse: {F6782448} Reviewers: #dolphin, #vdg, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: ndavis, elvisangelaccio, kneckermcknacksack, filipf, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D20689
2019-05-05Get rid of ugly static_cast usages in connect() callsElvis Angelaccio
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
2019-01-29After opening and switching to a new tab, always focus the viewNate Graham
Summary: When Dolphin opens a new tab and immediately switches to it, the URL navigator gets focus if it's editable. If it's not, the breadcrumbs bar gets keyboard focus, which is not very useful since it's not really intended for keyboard navigation. This patch changes that behavior so that the view always gets focus, which seems more useful and more consistent. BUG: 401899 FIXED-IN: 19.04.0 Test Plan: 1. Put the URL navigator into breadcrumbs mode 2. Open a new tab 3. Observe that the view gets keyboard focus 4. Put the URL navigator into editable mode 5. Open a new tab 6. Observe that the view still gets keyboard focus Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: emateli, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D17635
2018-10-27Close Dolphin if last tab closedAlexander Saoutkin
Summary: Allows closing of last tab via shortcut or menubar (File->Close Tab), which then results in closing dolphin. FEATURE: 397101 Test Plan: [Manual] Check closing tab closes dolphin via shortcut and menubar. Reviewers: #dolphin, ngraham, #vdg, elvisangelaccio Reviewed By: #dolphin, ngraham, #vdg, elvisangelaccio Subscribers: thsurrel, svenmauch, abetts, elvisangelaccio, ngraham, #dolphin, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D15278
2018-09-02Renames DolphinViewContainer::getCaption to captionDavid Hallas
Summary: This commit renames the DolphinViewContainer::getCaption to simply caption, this was a review comment that I failed to fix in a previous commit. Test Plan: None Reviewers: elvisangelaccio Reviewed By: elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D15114
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
2018-03-05Revert "Fix some compile warnings"Elvis Angelaccio
This reverts commit 533f050855a50212bba7be57a1590f9ce743e26d. D10995 has not been approved.
2018-03-04Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: bcooksley, markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2018-03-04Fix some compile warningsRoman Inflianskas
Reviewers: #dolphin, markg Reviewed By: markg Subscribers: elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10995
2017-07-27Fix drop menu position with urlnavigator dropsElvis Angelaccio
Commit 1e251d2f6a in kio broke drop menus when dropping on the URL navigator (menus show up in the DolphinView rather than the URL bar). This happens because in DolphinView::dropUrls() we set `this` as the widget passed to KJobWidgets::setWindow() (in DragAndDropHelper::dropUrls()). We need to replace `this` with the actual widget that received the QDropEvent and that can mapToGlobal() the relative pos of the drop event. Unfortunately this widget is not KUrlNavigator itself, but one of its KUrlNavigatorButton children (private class, not exported). So unfortunately we need a new API in KIO that exposes this child widget. Differential Revision: https://phabricator.kde.org/D6684
2017-05-22Correct searchbox, split view transitions between tabsAnthony Fieroni
Differential Revision: https://phabricator.kde.org/D5864 BUG: 379135 BUG: 380032 FIXED-IN: 17.04.2 Signed-off-by: Anthony Fieroni <[email protected]>
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
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771
2015-10-21Fix detach tab not working when path contains spaces.Emmanuel Pescosta
BUG: 352420 FIXED-IN: 15.08.3 REVIEW: 125587
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
2015-01-05Dolphin: port from KonqOperations::doDrop to the new KIO::DropJobDavid Faure
REVIEW: 121678
2014-12-01Fix KUrl -> QUrl porting errorArjun AK
Trailing slashes should be removed before calling QUrl::filename(), else it will return an empty string. BUG: 341411 REVIEW: 121293
2014-10-21address 2 more KUrl -> QUrl issues mentioned in rr#120688Lukáš Tinkl
2014-10-21port Dolphin from KUrl to QUrlLukáš Tinkl
REVIEW: 120688
2014-10-21port Konqueror from KUrl to QUrlLukáš Tinkl
REVIEW: 120650
2014-09-10Merge branch 'master' into frameworksLuca Beltrame
2014-09-10Set the focus to the active view if the current tab has been changed.Emmanuel Pescosta
BUG: 338892 FIXED-IN: 4.15.0 REVIEW: 120125
2014-08-22Merge branch 'master' into frameworksEmmanuel Pescosta
Conflicts: dolphin/src/dolphinmainwindow.cpp dolphin/src/dolphinmainwindow.h dolphin/src/dolphinrecenttabsmenu.cpp dolphin/src/dolphinviewcontainer.cpp kfind/CMakeLists.txt
2014-08-20Save the view states in addition to the view urls and splitter state in ↵Emmanuel Pescosta
DolphinTabPage. Also added version numbers to view and tab state. REVIEW: 119792
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