diff options
| author | Peter Penz <[email protected]> | 2008-10-25 10:32:55 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-10-25 10:32:55 +0000 |
| commit | b1aadb8cce40ac4bc2f33729cd80ef270de72163 (patch) | |
| tree | 516732a286ff079a1e8f35e183d0d8677478f307 /src/dolphincontextmenu.cpp | |
| parent | 0ff69a11b8695a451256c6bd1662242aa3711879 (diff) | |
If the context menu is opened above a directory, add the actions "Open in New Window" and "Open in New Tab" to the context menu.
Thanks to Mathias Soeken for the patch!
CCMAIL: [email protected]
svn path=/trunk/KDE/kdebase/apps/; revision=875711
Diffstat (limited to 'src/dolphincontextmenu.cpp')
| -rw-r--r-- | src/dolphincontextmenu.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 7edfdb285..6409ba0fa 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -172,6 +172,11 @@ void DolphinContextMenu::openItemContextMenu() Q_ASSERT(!m_fileInfo.isNull()); KMenu* popup = new KMenu(m_mainWindow); + if (m_fileInfo.isDir() && (m_selectedUrls.count() == 1)) { + popup->addAction(m_mainWindow->actionCollection()->action("open_in_new_window")); + popup->addAction(m_mainWindow->actionCollection()->action("open_in_new_tab")); + popup->addSeparator(); + } addShowMenubarAction(popup); insertDefaultItemActions(popup); |
