]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/generalsettingspage.cpp
Fix for show_filter_bar action of tools-menu, which is not correctly set (when the...
[dolphin.git] / src / generalsettingspage.cpp
index 4a8230bb797c5119cf365f202251db28651fed98..5dc66cbdcf7bc437d0a27faf6e4221094ddaac74 100644 (file)
@@ -100,15 +100,16 @@ void GeneralSettingsPage::applySettings()
 {
     GeneralSettings* settings = DolphinSettings::instance().generalSettings();
 
-    KSharedConfig::Ptr konqConfig = KSharedConfig::openConfig("konquerorrc", KConfig::IncludeGlobals);
-    KConfigGroup trashConfig(konqConfig, "Trash");
-    trashConfig.writeEntry("ConfirmTrash", m_confirmMoveToTrash->isChecked());
-    trashConfig.writeEntry("ConfirmDelete", m_confirmDelete->isChecked());
-    trashConfig.sync();
+    KSharedConfig::Ptr kioConfig = KSharedConfig::openConfig("kiorc", KConfig::NoGlobals);
+    KConfigGroup confirmationGroup(kioConfig, "Confirmations");
+    confirmationGroup.writeEntry("ConfirmTrash", m_confirmMoveToTrash->isChecked());
+    confirmationGroup.writeEntry("ConfirmDelete", m_confirmDelete->isChecked());
+    confirmationGroup.sync();
 
-    KConfigGroup kdeConfig(KGlobal::config(), "KDE");
-    kdeConfig.writeEntry("ShowDeleteCommand", m_showDeleteCommand->isChecked());
-    kdeConfig.sync();
+    KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::NoGlobals);
+    KConfigGroup configGroup(globalConfig, "KDE");
+    configGroup.writeEntry("ShowDeleteCommand", m_showDeleteCommand->isChecked());
+    configGroup.sync();
 
     settings->setShowCopyMoveMenu(m_showCopyMoveMenu->isChecked());
     settings->setBrowseThroughArchives(m_browseThroughArchives->isChecked());
@@ -127,14 +128,15 @@ void GeneralSettingsPage::restoreDefaults()
 
 void GeneralSettingsPage::loadSettings()
 {
-    KSharedConfig::Ptr konqConfig = KSharedConfig::openConfig("konquerorrc", KConfig::IncludeGlobals);
-    const KConfigGroup trashConfig(konqConfig, "Trash");
-    m_confirmMoveToTrash->setChecked(trashConfig.readEntry("ConfirmTrash", false));
-    m_confirmDelete->setChecked(trashConfig.readEntry("ConfirmDelete", true));
-
-    const KConfigGroup kdeConfig(KGlobal::config(), "KDE");
-    m_showDeleteCommand->setChecked(kdeConfig.readEntry("ShowDeleteCommand", false));
-
+    KSharedConfig::Ptr kioConfig = KSharedConfig::openConfig("kiorc", KConfig::IncludeGlobals);
+    const KConfigGroup confirmationGroup(kioConfig, "Confirmations");
+    m_confirmMoveToTrash->setChecked(confirmationGroup.readEntry("ConfirmTrash", false));
+    m_confirmDelete->setChecked(confirmationGroup.readEntry("ConfirmDelete", true));
+
+    KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::IncludeGlobals);
+    KConfigGroup configGroup(globalConfig, "KDE");
+    m_showDeleteCommand->setChecked(configGroup.readEntry("ShowDeleteCommand", false));
+    
     GeneralSettings* settings = DolphinSettings::instance().generalSettings();
     m_showCopyMoveMenu->setChecked(settings->showCopyMoveMenu());
     m_browseThroughArchives->setChecked(settings->browseThroughArchives());