summaryrefslogtreecommitdiffstats
path: root/kcontrol/konq
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-01-28 00:48:26 +0900
committerTDE Gitea <gitea@mirror.git.trinitydesktop.org>2020-01-30 01:59:59 +0000
commitfddff79d21edd8c97d25ea9439fa2218ed35f3d4 (patch)
tree2c31ce30531f21bd6f44d26d7e66f65feb72ddc9 /kcontrol/konq
parentf8a93efe769e5002d3e3f80fb301b2464f379343 (diff)
downloadtdebase-fddff79d21edd8c97d25ea9439fa2218ed35f3d4.tar.gz
tdebase-fddff79d21edd8c97d25ea9439fa2218ed35f3d4.zip
Improved support for XDG folders without requiring xdg-user-dirs to be installed.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kcontrol/konq')
-rw-r--r--kcontrol/konq/rootopts.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/kcontrol/konq/rootopts.cpp b/kcontrol/konq/rootopts.cpp
index 6677bc80a..6694e8573 100644
--- a/kcontrol/konq/rootopts.cpp
+++ b/kcontrol/konq/rootopts.cpp
@@ -204,16 +204,16 @@ void DesktopPathConfig::load( bool useDefaults )
config.setGroup("Paths");
urAutostart->setURL( config.readPathEntry( "Autostart" , TDEGlobalSettings::autostartPath() ));
- TDEConfig xdguserconfig( TQDir::homeDirPath()+"/.config/user-dirs.dirs" );
-
- urDesktop->setURL( xdguserconfig.readPathEntry( "XDG_DESKTOP_DIR" , TQDir::homeDirPath() + "/Desktop" ).remove( "\"" ));
- urDocument->setURL( xdguserconfig.readPathEntry( "XDG_DOCUMENTS_DIR", TQDir::homeDirPath() + "/Documents").remove( "\"" ));
- urDownload->setURL( xdguserconfig.readPathEntry( "XDG_DOWNLOAD_DIR" , TQDir::homeDirPath() + "/Downloads" ).remove( "\"" ));
- urMusic->setURL( xdguserconfig.readPathEntry( "XDG_MUSIC_DIR" , TQDir::homeDirPath() + "/Music" ).remove( "\"" ));
- urPictures->setURL( xdguserconfig.readPathEntry( "XDG_PICTURES_DIR" , TQDir::homeDirPath() + "/Pictures" ).remove( "\"" ));
- urPublicShare->setURL( xdguserconfig.readPathEntry( "XDG_PUBLICSHARE_DIR" , TQDir::homeDirPath() + "/Public" ).remove( "\"" ));
- urTemplates->setURL( xdguserconfig.readPathEntry( "XDG_TEMPLATES_DIR" , TQDir::homeDirPath() + "/Templates" ).remove( "\"" ));
- urVideos->setURL( xdguserconfig.readPathEntry( "XDG_VIDEOS_DIR" , TQDir::homeDirPath() + "/Videos" ).remove( "\"" ));
+ TDEConfig xdguserconfig(TQDir::homeDirPath() + "/.config/user-dirs.dirs");
+
+ urDesktop->setURL(xdguserconfig.readPathEntry("XDG_DESKTOP_DIR", TDEGlobalSettings::desktopPath()).remove("\""));
+ urDocument->setURL(xdguserconfig.readPathEntry("XDG_DOCUMENTS_DIR", TDEGlobalSettings::documentPath()).remove("\""));
+ urDownload->setURL(xdguserconfig.readPathEntry("XDG_DOWNLOAD_DIR" , TDEGlobalSettings::downloadPath()).remove("\""));
+ urMusic->setURL(xdguserconfig.readPathEntry("XDG_MUSIC_DIR" , TDEGlobalSettings::musicPath()).remove("\""));
+ urPictures->setURL(xdguserconfig.readPathEntry("XDG_PICTURES_DIR" , TDEGlobalSettings::picturesPath()).remove("\""));
+ urPublicShare->setURL(xdguserconfig.readPathEntry("XDG_PUBLICSHARE_DIR" , TDEGlobalSettings::publicSharePath()).remove("\""));
+ urTemplates->setURL(xdguserconfig.readPathEntry("XDG_TEMPLATES_DIR" , TDEGlobalSettings::templatesPath()).remove("\""));
+ urVideos->setURL(xdguserconfig.readPathEntry("XDG_VIDEOS_DIR" , TDEGlobalSettings::videosPath()).remove("\""));
emit changed( useDefaults );
}