]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
Fix issue that tooltip-labels might get clipped (this regression has been introduced...
[dolphin.git] / src / dolphinmainwindow.cpp
index 9a5e5e3a8610c9b16688757880febfb8ba38547a..1c1343976750a4af1983c05df9d96a0aff4d5389 100644 (file)
@@ -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()