diff options
| author | Emmanuel Pescosta <[email protected]> | 2013-05-22 21:47:14 +0200 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2013-05-22 21:47:14 +0200 |
| commit | 45c659b440a3c8058fff1d4d7f64a3cc4d45e237 (patch) | |
| tree | 8a0168def78ae7f8c6f36c3891cdedeb007ed304 /src/dolphincontextmenu.cpp | |
| parent | 7c9808ef5d14139de13b86b7dca8f45ccac1373f (diff) | |
Added the "Open in new Tabs" action to the Dolphin Context menu.
BUG: 312296
REVIEW: 110371
FIXED-IN: 4.11.0
Diffstat (limited to 'src/dolphincontextmenu.cpp')
| -rw-r--r-- | src/dolphincontextmenu.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index af8b61384..cddcc8936 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -237,6 +237,20 @@ void DolphinContextMenu::openItemContextMenu() 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(); + } } insertDefaultItemActions(); |
