diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-01-28 23:12:32 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-01-28 23:12:32 +0900 |
commit | 394c9f5c0e1b464aa8bc22bd65c5268acd43994d (patch) | |
tree | 39db9b6670e6ffce93a53f790593e15c0394997d /tdecore/tdeglobalsettings.h | |
parent | ecd1e4bd401a00be11f4d8bbaff01718f29f9118 (diff) | |
download | tdelibs-394c9f5c0e1b464aa8bc22bd65c5268acd43994d.tar.gz tdelibs-394c9f5c0e1b464aa8bc22bd65c5268acd43994d.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 'tdecore/tdeglobalsettings.h')
-rw-r--r-- | tdecore/tdeglobalsettings.h | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/tdecore/tdeglobalsettings.h b/tdecore/tdeglobalsettings.h index 18b59fc12..a6208d0ec 100644 --- a/tdecore/tdeglobalsettings.h +++ b/tdecore/tdeglobalsettings.h @@ -227,67 +227,67 @@ class TDECORE_EXPORT TDEGlobalSettings static KMouseSettings & mouseSettings(); /** - * The path to the desktop directory of the current user. - * @return the user's desktop directory - */ - static TQString desktopPath() { initStatic(); return *s_desktopPath; } - - /** * The path to the autostart directory of the current user. * @return the path of the autostart directory */ - static TQString autostartPath() { initStatic(); return *s_autostartPath; } + static TQString autostartPath() { initPaths(); return *s_autostartPath; } /** * DEPRECATED (starting from kde-3.4). * This isn't where the trash contents is, anymore. * Use TDEIO::trash() to trash files, "trash:/" to list the trash contents. */ - static TQString trashPath() { initStatic(); return *s_trashPath; } + static TQString trashPath() { initPaths(); return *s_trashPath; } // KDE4: if you want to remove the above, move it to kdesktop/init.cc, which needs // to know the old location of the trash /** + * The path to the desktop directory of the current user. + * @return the user's desktop directory + */ + static TQString desktopPath() { initPaths(); return *s_desktopPath; } + + /** * The path where documents are stored of the current user. * @return the path of the document directory */ - static TQString documentPath() { initStatic(); return *s_documentPath; } + static TQString documentPath() { initPaths(); return *s_documentPath; } /** * The path where documents are stored of the current user. - * @return the path of the videos directory + * @return the path of the downloads directory */ - static TQString videosPath() { initStatic(); return *s_videosPath; } + static TQString downloadPath() { initPaths(); return *s_downloadPath; } /** * The path where documents are stored of the current user. * @return the path of the music directory */ - static TQString musicPath() { initStatic(); return *s_musicPath; } + static TQString musicPath() { initPaths(); return *s_musicPath; } /** * The path where documents are stored of the current user. - * @return the path of the downloads directory + * @return the path of the pictures directory */ - static TQString downloadPath() { initStatic(); return *s_downloadPath; } + static TQString picturesPath() { initPaths(); return *s_picturesPath; } /** - * The path where documents are stored of the current user. - * @return the path of the pictures directory + * The path of the public share of the current user. + * @return the path of the public share directory */ - static TQString picturesPath() { initStatic(); return *s_picturesPath; } + static TQString publicSharePath() { initPaths(); return *s_publicSharePath; } /** * The path where templates are stored of the current user. * @return the path of the templates directory */ - static TQString templatesPath() { initStatic(); return *s_templatesPath; } + static TQString templatesPath() { initPaths(); return *s_templatesPath; } /** - * The path of the public share of the current user. - * @return the path of the public share directory + * The path where documents are stored of the current user. + * @return the path of the videos directory */ - static TQString publicSharePath() { initStatic(); return *s_publicSharePath; } + static TQString videosPath() { initPaths(); return *s_videosPath; } /** * The default color to use when highlighting toolbar buttons. @@ -572,7 +572,7 @@ private: /** * reads in all paths from kdeglobals */ - static void initStatic(); + static void initPaths(); /** * initialize colors */ @@ -591,16 +591,16 @@ private: static void rereadMouseSettings(); - static TQString* s_desktopPath; - static TQString* s_autostartPath; - static TQString* s_trashPath; - static TQString* s_documentPath; - static TQString* s_picturesPath; - static TQString* s_templatesPath; - static TQString* s_publicSharePath; - static TQString* s_downloadPath; - static TQString* s_musicPath; - static TQString* s_videosPath; + static TQString *s_desktopPath; + static TQString *s_autostartPath; + static TQString *s_trashPath; + static TQString *s_documentPath; + static TQString *s_picturesPath; + static TQString *s_templatesPath; + static TQString *s_publicSharePath; + static TQString *s_downloadPath; + static TQString *s_musicPath; + static TQString *s_videosPath; static TQFont *_generalFont; static TQFont *_fixedFont; static TQFont *_toolBarFont; @@ -608,15 +608,15 @@ private: static TQFont *_windowTitleFont; static TQFont *_taskbarFont; static TQFont *_largeFont; - static TQColor * _trinity4Blue; - static TQColor * _inactiveBackground; - static TQColor * _inactiveForeground; - static TQColor * _activeBackground; - static TQColor * _buttonBackground; - static TQColor * _selectBackground; - static TQColor * _linkColor; - static TQColor * _visitedLinkColor; - static TQColor * alternateColor; + static TQColor *_trinity4Blue; + static TQColor *_inactiveBackground; + static TQColor *_inactiveForeground; + static TQColor *_activeBackground; + static TQColor *_buttonBackground; + static TQColor *_selectBackground; + static TQColor *_linkColor; + static TQColor *_visitedLinkColor; + static TQColor *alternateColor; static KMouseSettings *s_mouseSettings; friend class TDEApplication; |