]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincontextmenu.cpp
when changing the view mode if the preview is turned on, the directory must get reloa...
[dolphin.git] / src / dolphincontextmenu.cpp
index 55b83c552ca9130c5aa8f89257b2bf10e839a14b..6409ba0fa4146914af583b1cd59f4f9ce1ef2852 100644 (file)
@@ -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);
 
@@ -322,10 +327,6 @@ void DolphinContextMenu::addShowMenubarAction(KMenu* menu)
 {
     KAction* showMenuBar = m_mainWindow->showMenuBarAction();
     if (!m_mainWindow->menuBar()->isVisible()) {
-        // TODO: it should not be necessary to uncheck the menu
-        // bar action, but currently the action states don't get
-        // updated if the menu is disabled
-        showMenuBar->setChecked(false);
         menu->addAction(showMenuBar);
         menu->addSeparator();
     }