]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincontextmenu.cpp
Fixed icon-names so that they match to the new Oxygen naming scheme (erase all Dolphi...
[dolphin.git] / src / dolphincontextmenu.cpp
index 14f71f44953898aab65c0dba917ffe70a3125357..14760658128d3477ab2361eb7b95e6086a28e502 100644 (file)
@@ -25,8 +25,6 @@
 #include "dolphinview.h"
 #include "editbookmarkdialog.h"
 
-#include "dolphin_generalsettings.h"
-
 #include <assert.h>
 
 #include <kactioncollection.h>
@@ -99,7 +97,7 @@ void DolphinContextMenu::openViewportContextMenu()
     popup->addMenu(viewModeMenu);
     popup->addSeparator();
 
-    QAction* bookmarkAction = popup->addAction(i18n("Bookmark this folder"));
+    QAction* bookmarkAction = popup->addAction(KIcon("bookmark-folder"), i18n("Bookmark this folder"));
     popup->addSeparator();
 
     QAction* propertiesAction = popup->addAction(i18n("Properties..."));
@@ -154,7 +152,9 @@ void DolphinContextMenu::openItemContextMenu()
     popup->addAction(renameAction);
 
     // insert 'Move to Trash' and (optionally) 'Delete'
-    bool showDeleteCommand = DolphinSettings::instance().generalSettings()->showDeleteCommand();
+    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");
@@ -174,7 +174,7 @@ void DolphinContextMenu::openItemContextMenu()
     // urls contains only one item, i.e. no multiple selection made
     QAction* bookmarkAction = 0;
     if (m_fileInfo->isDir() && (urls.count() == 1)) {
-        bookmarkAction = popup->addAction(i18n("Bookmark this folder"));
+        bookmarkAction = popup->addAction(KIcon("bookmark-folder"), i18n("Bookmark this folder"));
     }
 
     // Insert 'Open With...' sub menu