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/dolphinmainwindow.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/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 3b169a57d..73001bf54 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -525,8 +525,9 @@ void DolphinMainWindow::openInNewTab() openNewTab(m_activeViewContainer->url()); } else { foreach (const KFileItem& item, list) { - if (item.isDir()) { - openNewTab(item.url()); + const KUrl& url = DolphinView::openItemAsFolderUrl(item); + if (!url.isEmpty()) { + openNewTab(url); } } } @@ -539,8 +540,9 @@ void DolphinMainWindow::openInNewWindow() const KFileItemList list = m_activeViewContainer->view()->selectedItems(); if (list.isEmpty()) { newWindowUrl = m_activeViewContainer->url(); - } else if ((list.count() == 1) && list[0].isDir()) { - newWindowUrl = list[0].url(); + } else if (list.count() == 1) { + const KFileItem& item = list.first(); + newWindowUrl = DolphinView::openItemAsFolderUrl(item); } if (!newWindowUrl.isEmpty()) { |
