diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-12-11 20:21:27 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-12-11 20:21:27 +0000 |
commit | 10e41144596fc9ced40fc349d9ecd099b1c2ea19 (patch) | |
tree | 88ab04e475ff5a4cd889cb082f5760b6e0bf5e4e /kcontrol/konq | |
parent | 4aed2c8219774f5d797760606b8489a92ddc5163 (diff) | |
download | tdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.tar.gz tdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.zip |
Initial import of Trinity 3.5.11 to kdebase
Extends krandrtray, adds iccconfig kcontrol module, adds run dialog autocomplete and lots of bugfixes
Will need to check for commit warnings and repair as encountered
Also needs full compile test
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1061475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/konq')
-rw-r--r-- | kcontrol/konq/rootopts.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/kcontrol/konq/rootopts.cpp b/kcontrol/konq/rootopts.cpp index c546aa3ee..1a14c68e3 100644 --- a/kcontrol/konq/rootopts.cpp +++ b/kcontrol/konq/rootopts.cpp @@ -129,14 +129,16 @@ void DesktopPathConfig::load( bool useDefaults ) { KConfig config("kdeglobals", true, false); // Desktop Paths - config.setReadDefaults( useDefaults ); - - config.setGroup("Paths"); - urDesktop->setURL( config.readPathEntry( "Desktop" , KGlobalSettings::desktopPath() )); + config.setReadDefaults( useDefaults ); + config.setGroup("Paths"); urAutostart->setURL( config.readPathEntry( "Autostart" , KGlobalSettings::autostartPath() )); - urDocument->setURL( config.readPathEntry( "Documents", KGlobalSettings::documentPath() )); - emit changed( useDefaults ); + KConfig xdguserconfig( QDir::homeDirPath()+"/.config/user-dirs.dirs" ); + + urDesktop->setURL( xdguserconfig.readPathEntry( "XDG_DESKTOP_DIR" , QDir::homeDirPath() + "/Desktop" ).remove( "\"" )); + urDocument->setURL( xdguserconfig.readPathEntry( "XDG_DOCUMENTS_DIR", QDir::homeDirPath()).remove( "\"" )); + + emit changed( useDefaults ); } void DesktopPathConfig::defaults() @@ -147,6 +149,7 @@ void DesktopPathConfig::defaults() void DesktopPathConfig::save() { KConfig *config = KGlobal::config(); + KConfig *xdgconfig = new KConfig( QDir::homeDirPath()+"/.config/user-dirs.dirs" ); KConfigGroupSaver cgs( config, "Paths" ); bool pathChanged = false; @@ -205,8 +208,7 @@ void DesktopPathConfig::save() if ( moveDir( KURL( KGlobalSettings::desktopPath() ), KURL( urlDesktop ), i18n("Desktop") ) ) { -// config->writeEntry( "Desktop", urDesktop->url()); - config->writePathEntry( "Desktop", urlDesktop, true, true ); + xdgconfig->writePathEntry( "XDG_DESKTOP_DIR", '"'+ urlDesktop + '"', true, false ); pathChanged = true; } } @@ -217,7 +219,6 @@ void DesktopPathConfig::save() autostartMoved = moveDir( KURL( KGlobalSettings::autostartPath() ), KURL( urAutostart->url() ), i18n("Autostart") ); if (autostartMoved) { -// config->writeEntry( "Autostart", Autostart->url()); config->writePathEntry( "Autostart", urAutostart->url(), true, true ); pathChanged = true; } @@ -239,12 +240,13 @@ void DesktopPathConfig::save() if (pathOk) { - config->writePathEntry( "Documents", path, true, true ); + xdgconfig->writePathEntry( "XDG_DOCUMENTS_DIR", '"' + path + '"', true, false ); pathChanged = true; } } config->sync(); + xdgconfig->sync(); if (pathChanged) { |