]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincontextmenu.cpp
Implement restoring expanded folders in Details View
[dolphin.git] / src / dolphincontextmenu.cpp
index 79ffdaa2eca6451230224aa6be54af5b3624c5fc..617189715d0977db11a46a4ccf77446eee5b6ac8 100644 (file)
@@ -86,8 +86,8 @@ DolphinContextMenu::DolphinContextMenu(DolphinMainWindow* parent,
         if (m_keyInfo->isKeyPressed(Qt::Key_Shift) || m_keyInfo->isKeyLatched(Qt::Key_Shift)) {
             m_shiftPressed = true;
         }
-        connect(m_keyInfo, SIGNAL(keyPressed(Qt::Key, bool)),
-                this, SLOT(slotKeyModifierPressed(Qt::Key, bool)));
+        connect(m_keyInfo, SIGNAL(keyPressed(Qt::Key,bool)),
+                this, SLOT(slotKeyModifierPressed(Qt::Key,bool)));
     }
 
     m_removeAction = new QAction(this);
@@ -189,16 +189,7 @@ void DolphinContextMenu::openTrashContextMenu()
 
     QAction *action = m_popup->exec(QCursor::pos());
     if (action == emptyTrashAction) {
-        const QString text(i18nc("@info", "Do you really want to empty the Trash? All items will be deleted."));
-        const bool del = KMessageBox::warningContinueCancel(m_mainWindow,
-                                                            text,
-                                                            QString(),
-                                                            KGuiItem(i18nc("@action:button", "Empty Trash"),
-                                                                     KIcon("user-trash"))
-                                                           ) == KMessageBox::Continue;
-        if (del) {
-            KonqOperations::emptyTrash(m_mainWindow);
-        }
+        KonqOperations::emptyTrash(m_mainWindow);
     } else if (action == addToPlacesAction) {
         const KUrl& url = m_mainWindow->activeViewContainer()->url();
         if (url.isValid()) {
@@ -243,7 +234,7 @@ void DolphinContextMenu::openItemContextMenu()
             // setup 'Create New' menu
             DolphinNewFileMenu* newFileMenu = new DolphinNewFileMenu(m_mainWindow);
             const DolphinView* view = m_mainWindow->activeViewContainer()->view();
-            newFileMenu->setViewShowsHiddenFiles(view->showHiddenFiles());
+            newFileMenu->setViewShowsHiddenFiles(view->hiddenFilesShown());
             newFileMenu->checkUpToDate();
             newFileMenu->setPopupFiles(m_fileInfo.url());
             newFileMenu->setEnabled(selectedItemsProperties().supportsWriting());
@@ -329,7 +320,7 @@ void DolphinContextMenu::openViewportContextMenu()
     // setup 'Create New' menu
     KNewFileMenu* newFileMenu = m_mainWindow->newFileMenu();
     const DolphinView* view = m_mainWindow->activeViewContainer()->view();
-    newFileMenu->setViewShowsHiddenFiles(view->showHiddenFiles());
+    newFileMenu->setViewShowsHiddenFiles(view->hiddenFilesShown());
     newFileMenu->checkUpToDate();
     newFileMenu->setPopupFiles(m_baseUrl);
     m_popup->addMenu(newFileMenu->menu());