]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/settings/general/behaviorsettingspage.cpp
Port Dolphin away from KApplication, KCmdLineArgs and K4AboutData
[dolphin.git] / src / settings / general / behaviorsettingspage.cpp
index f311b1a3cd0a61a8557d0be8a5202e151a5d934d..093a1f4e160a1c84f7d2104df7b360e809f66b3d 100644 (file)
@@ -97,8 +97,9 @@ void BehaviorSettingsPage::applySettings()
 
     settings->setShowToolTips(m_showToolTips->isChecked());
     settings->setShowSelectionToggle(m_showSelectionToggle->isChecked());
+    settings->setNaturalSorting(m_naturalSorting->isChecked());
     settings->setRenameInline(m_renameInline->isChecked());
-    settings->writeConfig();
+    settings->save();
 
     if (useGlobalViewProps) {
         // Remember the global view properties by applying the current view properties.
@@ -108,13 +109,6 @@ void BehaviorSettingsPage::applySettings()
         ViewProperties globalProps(m_url);
         globalProps.setDirProperties(props);
     }
-
-    const bool naturalSorting = m_naturalSorting->isChecked();
-    if (KGlobalSettings::naturalSorting() != naturalSorting) {
-        KConfigGroup group(KSharedConfig::openConfig(), "KDE");
-        group.writeEntry("NaturalSorting", naturalSorting, KConfig::Persistent | KConfig::Global);
-        KGlobalSettings::emitChange(KGlobalSettings::NaturalSortingChanged);
-    }
 }
 
 void BehaviorSettingsPage::restoreDefaults()
@@ -133,7 +127,7 @@ void BehaviorSettingsPage::loadSettings()
 
     m_showToolTips->setChecked(GeneralSettings::showToolTips());
     m_showSelectionToggle->setChecked(GeneralSettings::showSelectionToggle());
-    m_naturalSorting->setChecked(KGlobalSettings::naturalSorting());
+    m_naturalSorting->setChecked(GeneralSettings::naturalSorting());
     m_renameInline->setChecked(GeneralSettings::renameInline());
 }