[gnome-main-menu] Use XDG user directory instead of hardcoding $HOME/Documents
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-main-menu] Use XDG user directory instead of hardcoding $HOME/Documents
- Date: Thu, 18 Feb 2010 00:01:17 +0000 (UTC)
commit 3c24fff3eb579fd8fb1451c9c871e295c4f2704a
Author: Julian Andres Klode <jak debian org>
Date: Sun Feb 7 16:41:46 2010 +0100
Use XDG user directory instead of hardcoding $HOME/Documents
https://bugzilla.gnome.org/show_bug.cgi?id=486548
main-menu/src/main-menu-ui.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/main-menu/src/main-menu-ui.c b/main-menu/src/main-menu-ui.c
index 9a603a9..3b7cd5a 100644
--- a/main-menu/src/main-menu-ui.c
+++ b/main-menu/src/main-menu-ui.c
@@ -2325,7 +2325,9 @@ more_buttons_clicked_cb (GtkButton *button, gpointer user_data)
if (GTK_WIDGET (button) == priv->more_buttons [APPS_PAGE])
ditem_id = libslab_get_gconf_value (APP_BROWSER_GCONF_KEY);
else if (GTK_WIDGET (button) == priv->more_buttons [DOCS_PAGE]) {
- dir = g_build_filename (g_get_home_dir (), "Documents", NULL);
+ dir = g_strdup (g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS));
+ if (! dir)
+ dir = g_build_filename (g_get_home_dir (), "Documents", NULL);
if (! g_file_test (dir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))
dir = g_strdup (g_get_home_dir ());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]