diff options
| author | Emmanuel Pescosta <[email protected]> | 2013-05-28 17:31:14 +0200 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2013-06-04 15:27:45 +0200 |
| commit | 616294bc805242f29a5b9c8d44ddd1e7466505ec (patch) | |
| tree | 1eccdaf961247ad100efca29296ae0bc48ce405c /src/dolphincontextmenu.cpp | |
| parent | 780327f7d3652d4964933533ff6a856bb8aaea22 (diff) | |
Bug 196035 - middle clicking on archive files in dolphin does not open them in a new tab
When 'browse through archives' is enabled, open archive files
like folders on middle clicking, context menu -> new tab action
and context menu -> new window action.
BUG: 196035
REVIEW: 110487
Diffstat (limited to 'src/dolphincontextmenu.cpp')
| -rw-r--r-- | src/dolphincontextmenu.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 4371bcdfd..f66847334 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -236,11 +236,18 @@ void DolphinContextMenu::openItemContextMenu() addAction(openParentInNewTabAction); addSeparator(); + } else if (!DolphinView::openItemAsFolderUrl(m_fileInfo).isEmpty()) { + // insert 'Open in new window' and 'Open in new tab' entries + addAction(m_mainWindow->actionCollection()->action("open_in_new_window")); + addAction(m_mainWindow->actionCollection()->action("open_in_new_tab")); + + addSeparator(); } } else { bool selectionHasOnlyDirs = true; foreach (const KFileItem& item, m_selectedItems) { - if (!item.isDir()) { + const KUrl& url = DolphinView::openItemAsFolderUrl(item); + if (url.isEmpty()) { selectionHasOnlyDirs = false; break; } |
