[easytag] Use the XDG music directory as the default path
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Use the XDG music directory as the default path
- Date: Sun, 20 Jan 2013 22:34:29 +0000 (UTC)
commit ca3683126030cf8e71805ca9e6660e74fd4a4277
Author: David King <amigadave amigadave com>
Date: Sun Jan 20 22:32:16 2013 +0000
Use the XDG music directory as the default path
If no music directory is set, use the home directory as before.
src/setting.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/setting.c b/src/setting.c
index e2ccf7a..e67d856 100644
--- a/src/setting.c
+++ b/src/setting.c
@@ -351,12 +351,12 @@ tConfigVariable Config_Variables[] =
*/
void Init_Config_Variables (void)
{
+ const gchar *music_dir;
/*
* Common
*/
LOAD_ON_STARTUP = 0;
- DEFAULT_PATH_TO_MP3 = g_strdup(g_get_home_dir ());
BROWSE_SUBDIR = 1;
#ifdef G_OS_WIN32
BROWSE_HIDDEN_DIR = 1;
@@ -365,6 +365,10 @@ void Init_Config_Variables (void)
#endif /* !G_OS_WIN32 */
OPEN_SELECTED_BROWSER_NODE = 1;
+ music_dir = g_get_user_special_dir (G_USER_DIRECTORY_MUSIC);
+ DEFAULT_PATH_TO_MP3 = music_dir ? g_strdup (music_dir)
+ : g_strdup (g_get_home_dir ());
+
/*
* Misc
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]