From: Ilya Bizyaev Date: Tue, 11 Feb 2020 11:36:19 +0000 (+0300) Subject: Swap "Open in New Window" and "Open in New Tab" in context menus X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/402f7f3041d45d8c5969f3bc202fe9156891cd2e Swap "Open in New Window" and "Open in New Tab" in context menus 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 --- diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index ca0f5e32f..79143d400 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -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); diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index 34361a5a7..d90a20fa6 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -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"));