]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincontextmenu.cpp
Simplify DolphinController: don't remember the show-preview state in the controller...
[dolphin.git] / src / dolphincontextmenu.cpp
index cbc1893c9819ca526164b85db3b51719201f7648..60af9923f6b7c59a8cfc6c18eaaeda1132c2034e 100644 (file)
@@ -101,8 +101,8 @@ void DolphinContextMenu::openTrashContextMenu()
 
     KMenu* popup = new KMenu(m_mainWindow);
 
-    QAction* emptyTrashAction = new QAction(KIcon("emptytrash"), i18nc("@action:inmenu", "Empty Trash"), popup);
-    KConfig trashConfig("trashrc", KConfig::OnlyLocal);
+    QAction* emptyTrashAction = new QAction(KIcon("trash-empty"), i18nc("@action:inmenu", "Empty Trash"), popup);
+    KConfig trashConfig("trashrc", KConfig::SimpleConfig);
     emptyTrashAction->setEnabled(!trashConfig.group("Status").readEntry("Empty", true));
     popup->addAction(emptyTrashAction);
 
@@ -277,8 +277,7 @@ void DolphinContextMenu::insertDefaultItemActions(KMenu* popup)
     popup->addAction(renameAction);
 
     // insert 'Move to Trash' and (optionally) 'Delete'
-    const KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals");
-    const KConfigGroup kdeConfig(globalConfig, "KDE");
+    KConfigGroup kdeConfig(KGlobal::config(), "KDE");
     bool showDeleteCommand = kdeConfig.readEntry("ShowDeleteCommand", false);
     const KUrl& url = m_mainWindow->activeViewContainer()->url();
     if (url.isLocalFile()) {