diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-01-28 00:48:26 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-01-30 11:40:13 +0900 |
commit | 6df720574451308f4d24ec494999ab2fe19e4efd (patch) | |
tree | 30b9dcdbfff219bf0118d75f66c9260d626f277d | |
parent | 062d81f2fca55d3731d3b3ff6f323f69afbcc469 (diff) | |
download | tdebase-6df720574451308f4d24ec494999ab2fe19e4efd.tar.gz tdebase-6df720574451308f4d24ec494999ab2fe19e4efd.zip |
Improved support for XDG folders without requiring xdg-user-dirs to be installed.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit fddff79d21edd8c97d25ea9439fa2218ed35f3d4)
-rw-r--r-- | kcontrol/konq/rootopts.cpp | 20 | ||||
-rw-r--r-- | kdesktop/kdiconview.cc | 2 |
2 files changed, 11 insertions, 11 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 ); } diff --git a/kdesktop/kdiconview.cc b/kdesktop/kdiconview.cc index c7f56c188..86737ce3c 100644 --- a/kdesktop/kdiconview.cc +++ b/kdesktop/kdiconview.cc @@ -851,7 +851,7 @@ bool KDIconView::deleteGlobalDesktopFiles() // Ignore these special files // Name URL Type OnlyShowIn - // My Documents xdg-user-dirs DOCUMENTS Application TDE; + // My Documents XDG_DOCUMENTS_DIR Application TDE; // My Computer media:/ Link TDE; // My Network Places remote:/ Link TDE; // Printers [exec] kjobviewer --all --show %i %m Application TDE; |