┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphincontextmenu.cpp
diff options
context:
space:
mode:
authorKai Uwe Broulik <[email protected]>2014-09-09 15:31:55 +0200
committerKai Uwe Broulik <[email protected]>2014-09-09 15:31:55 +0200
commit42153e55e64d25dd0a1df30ae13c746320c7774a (patch)
tree151d028efcc04c198d59de52c4166b6b2e8a3ef1 /src/dolphincontextmenu.cpp
parentdacded2afdfa85a16b99d8522284155cd5175ee5 (diff)
Add "Open Path" context menu action
This adds a third option to the "in new tab" and "in new window" which opens the parent folder in the same view BUG: 298704 FIXED-IN: 4.15 REVIEW: 110133
Diffstat (limited to 'src/dolphincontextmenu.cpp')
-rw-r--r--src/dolphincontextmenu.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp
index 22272fb74..e74adca55 100644
--- a/src/dolphincontextmenu.cpp
+++ b/src/dolphincontextmenu.cpp
@@ -200,6 +200,7 @@ void DolphinContextMenu::openItemContextMenu()
{
Q_ASSERT(!m_fileInfo.isNull());
+ QAction* openParentAction = 0;
QAction* openParentInNewWindowAction = 0;
QAction* openParentInNewTabAction = 0;
QAction* addToPlacesAction = 0;
@@ -235,7 +236,13 @@ void DolphinContextMenu::openItemContextMenu()
}
addSeparator();
- } else if (m_baseUrl.protocol().contains("search")) {
+ } else if (m_baseUrl.protocol().contains("search") || m_baseUrl.protocol().contains("timeline")) {
+ openParentAction = new QAction(QIcon::fromTheme("document-open-folder"),
+ i18nc("@action:inmenu",
+ "Open Path"),
+ this);
+ addAction(openParentAction);
+
openParentInNewWindowAction = new QAction(QIcon::fromTheme("window-new"),
i18nc("@action:inmenu",
"Open Path in New Window"),
@@ -306,6 +313,8 @@ void DolphinContextMenu::openItemContextMenu()
PlacesItem* item = model.createPlacesItem(text, selectedUrl);
model.appendItemToGroup(item);
}
+ } else if (activatedAction == openParentAction) {
+ m_command = OpenParentFolder;
} else if (activatedAction == openParentInNewWindowAction) {
m_command = OpenParentFolderInNewWindow;
} else if (activatedAction == openParentInNewTabAction) {