]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Swap "Open in New Window" and "Open in New Tab" in context menus
authorIlya Bizyaev <bizyaev@zoho.com>
Tue, 11 Feb 2020 11:36:19 +0000 (14:36 +0300)
committerIlya Bizyaev <bizyaev@zoho.com>
Wed, 12 Feb 2020 15:58:47 +0000 (18:58 +0300)
Summary:
Since Dolphin's default behaviour became opening in new tabs rather than in new windows
(a very positive change, in my opinion), I always find myself accidentally opening folders
in new windows from the context menu. This is because in most browsers with tab workflow
(e.g. Firefox, Chromium, Falkon) the top context menu action is opening in a new tab, and
my muscle memory plays a bad trick :) I'm aware of middle-clicking, but I find it
inconvenient with my touchpad.

I suspect I'm probably not alone in that, so I think it makes sense to swap these actions
in Dolphin to match widely used apps.

Test Plan:
Open Dolphin, right click folders in the main view and in the Places panel, ensure the
actions are indeed swapped

Reviewers: #vdg, ndavis, #dolphin, ngraham

Reviewed By: #vdg, ndavis, #dolphin, ngraham

Subscribers: ngraham, ndavis, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D27318

src/dolphincontextmenu.cpp
src/panels/places/placespanel.cpp

index ca0f5e32f5e5cdbc462e022639b8fda2d2445dbf..79143d400aac68924f8e09dbd4edc542ee33e59c 100644 (file)
@@ -194,8 +194,8 @@ void DolphinContextMenu::addDirectoryItemContextMenu(KFileItemActions &fileItemA
 
     const KFileItemListProperties& selectedItemsProps = selectedItemsProperties();
 
-    addAction(m_mainWindow->actionCollection()->action(QStringLiteral("open_in_new_window")));
     addAction(m_mainWindow->actionCollection()->action(QStringLiteral("open_in_new_tab")));
+    addAction(m_mainWindow->actionCollection()->action(QStringLiteral("open_in_new_window")));
 
     // Insert 'Open With' entries
     addOpenWithActions(fileItemActions);
index 34361a5a708ce83a306c4beaf229e9aff5eb98b3..d90a20fa6cfdc275f91361370d4173227e977893 100644 (file)
@@ -181,8 +181,8 @@ void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos)
         menu.addSeparator();
     }
 
-    QAction* openInNewWindowAction = menu.addAction(QIcon::fromTheme(QStringLiteral("window-new")), i18nc("@item:inmenu", "Open in New Window"));
     QAction* openInNewTabAction = menu.addAction(QIcon::fromTheme(QStringLiteral("tab-new")), i18nc("@item:inmenu", "Open in New Tab"));
+    QAction* openInNewWindowAction = menu.addAction(QIcon::fromTheme(QStringLiteral("window-new")), i18nc("@item:inmenu", "Open in New Window"));
     QAction* propertiesAction = nullptr;
     if (item->url().isLocalFile()) {
         propertiesAction = menu.addAction(QIcon::fromTheme(QStringLiteral("document-properties")), i18nc("@action:inmenu", "Properties"));