]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincontextmenu.cpp
Allow zooming in and zooming out in the icons view.
[dolphin.git] / src / dolphincontextmenu.cpp
index d27aa99cd23f0d0df4510f683af73fa58326c28c..346ee64013fc9bd327c1350609f11aaccceb3849 100644 (file)
@@ -151,13 +151,20 @@ void DolphinContextMenu::openItemContextMenu()
     QAction* renameAction = dolphin->actionCollection()->action("rename");
     popup->addAction(renameAction);
 
-    // insert 'Move to Trash' for local Urls, otherwise insert 'Delete'
+    // insert 'Move to Trash' and (optionally) 'Delete'
+    const KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::NoGlobals);
+    const KConfigGroup kdeConfig(globalConfig, "KDE");
+    bool showDeleteCommand = kdeConfig.readEntry("ShowDeleteCommand", false);
     const KUrl& url = dolphin->activeView()->url();
     if (url.isLocalFile()) {
         QAction* moveToTrashAction = dolphin->actionCollection()->action("move_to_trash");
         popup->addAction(moveToTrashAction);
     }
     else {
+        showDeleteCommand = true;
+    }
+
+    if (showDeleteCommand) {
         QAction* deleteAction = dolphin->actionCollection()->action("delete");
         popup->addAction(deleteAction);
     }