summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-25 00:53:44 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-25 00:53:44 +0000
commitd4f5cccaaa91490e6a733c4f26deba6941157b57 (patch)
treec332c439d6abb97c1763b2396063a30780496bdd
parentc1b82e65f92ab3fc89c46d91c2d7503f4d58cf9f (diff)
downloadtdebase-d4f5cccaaa91490e6a733c4f26deba6941157b57.tar.gz
tdebase-d4f5cccaaa91490e6a733c4f26deba6941157b57.zip
Fix desktop icon autoalign setting reset problem
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1179277 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--kcontrol/konq/desktopbehavior_impl.cpp2
-rw-r--r--kdesktop/krootwm.cc14
2 files changed, 15 insertions, 1 deletions
diff --git a/kcontrol/konq/desktopbehavior_impl.cpp b/kcontrol/konq/desktopbehavior_impl.cpp
index 9b2da7cf7..6b4aaadb0 100644
--- a/kcontrol/konq/desktopbehavior_impl.cpp
+++ b/kcontrol/konq/desktopbehavior_impl.cpp
@@ -300,7 +300,7 @@ void DesktopBehavior::load()
void DesktopBehavior::load( bool useDefaults )
{
- g_pConfig->setReadDefaults( useDefaults );
+ g_pConfig->setReadDefaults( useDefaults );
g_pConfig->setGroup( "Desktop Icons" );
bool bShowHidden = g_pConfig->readBoolEntry("ShowHidden", DEFAULT_SHOW_HIDDEN_ROOT_ICONS);
showHiddenBox->setChecked(bShowHidden);
diff --git a/kdesktop/krootwm.cc b/kdesktop/krootwm.cc
index 8769de363..95b0a3cb7 100644
--- a/kdesktop/krootwm.cc
+++ b/kdesktop/krootwm.cc
@@ -522,6 +522,20 @@ void KRootWm::slotToggleAutoAlign( bool b )
KDesktopSettings::setAutoLineUpIcons( b );
KDesktopSettings::writeConfig();
+ // Also save it globally...
+ int desktop = KApplication::desktop()->primaryScreen();
+ TQCString cfilename;
+ if (desktop == 0)
+ cfilename = "kdesktoprc";
+ else
+ cfilename.sprintf("kdesktop-screen-%drc", desktop);
+
+ KConfig *kdg_config = new KConfig(cfilename, false, false);
+ kdg_config->setGroup( "General" );
+ kdg_config->writeEntry( "AutoLineUpIcons", autoLineupIconsBox->isChecked() );
+ kdg_config->sync();
+ delete kdg_config;
+
// Auto line-up icons
m_pDesktop->iconView()->setAutoAlign( b );
}