]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincontextmenu.cpp
Added the "Open in new Tabs" action to the Dolphin Context menu.
[dolphin.git] / src / dolphincontextmenu.cpp
index af8b61384938c6dd8d2a0d7b37c838dd9aa9c16d..cddcc8936c68a745758a286787aa1d72086e7779 100644 (file)
@@ -235,6 +235,20 @@ void DolphinContextMenu::openItemContextMenu()
                                                    this);
             addAction(openParentInNewTabAction);
 
+            addSeparator();
+        }
+    } else {
+        bool selectionHasOnlyDirs = true;
+        foreach (const KFileItem& item, m_selectedItems) {
+            if (!item.isDir()) {
+                selectionHasOnlyDirs = false;
+                break;
+            }
+        }
+
+        if (selectionHasOnlyDirs) {
+            // insert 'Open in new tab' entry
+            addAction(m_mainWindow->actionCollection()->action("open_in_new_tabs"));
             addSeparator();
         }
     }