┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2010-09-22 20:24:49 +0000
committerPeter Penz <[email protected]>2010-09-22 20:24:49 +0000
commit7f7bea872b58b78813d99e5ef170c376ab1cc2c7 (patch)
treef86f740fd99600d90012f829f17c716e3a88f9e1 /src/dolphinmainwindow.cpp
parent5bb2a0f3c9f2d07dcb0739b88e37b203b451ecf3 (diff)
If the context-menu is opened for a file shown as search result, offer the actions "Open Parent Folder in New Window" and "Open Parent Folder in New Tab"
svn path=/trunk/KDE/kdebase/apps/; revision=1178362
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 9a5e5e3a8..1c1343976 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -1184,7 +1184,24 @@ void DolphinMainWindow::openContextMenu(const KFileItem& item,
{
DolphinContextMenu contextMenu(this, item, url);
contextMenu.setCustomActions(customActions);
- contextMenu.open();
+ const DolphinContextMenu::Command command = contextMenu.open();
+
+ switch (command) {
+ case DolphinContextMenu::OpenParentFolderInNewWindow: {
+ DolphinMainWindow* window = DolphinApplication::app()->createMainWindow();
+ window->changeUrl(item.url().upUrl());
+ window->show();
+ break;
+ }
+
+ case DolphinContextMenu::OpenParentFolderInNewTab:
+ openNewTab(item.url().upUrl());
+ break;
+
+ case DolphinContextMenu::None:
+ default:
+ break;
+ }
}
void DolphinMainWindow::init()