diff options
author | Matthias Clasen <mclasen@redhat.com> | 2007-06-07 04:23:10 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-06-07 04:23:10 +0000 |
commit | 232f30f1ba612073367e6abba518bd9f1a9ddbff (patch) | |
tree | a709c44cc0b2c7a6524fcbf8b14b7c957f359fe3 /gtk/gtkpathbar.c | |
parent | ba95b0598be5ffc039c356f4a0294ce88dc1e5bb (diff) | |
download | gtk+-232f30f1ba612073367e6abba518bd9f1a9ddbff.tar.gz |
Use g_get_user_special_dir() to obtain the path for the DESKTOP directory.
2007-06-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserbutton.c (model_add_special):
* gtk/gtkfilechooserdefault.c (shortcuts_append_desktop):
* gtk/gtkfilesystemunix.c (get_icon_name_for_directory):
* gtk/gtkpathbar.c (_gtk_path_bar_set_file_system):
Use g_get_user_special_dir() to obtain the path for the
DESKTOP directory.
svn path=/trunk/; revision=18070
Diffstat (limited to 'gtk/gtkpathbar.c')
-rw-r--r-- | gtk/gtkpathbar.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c index e63eeac9b9..55c36522b5 100644 --- a/gtk/gtkpathbar.c +++ b/gtk/gtkpathbar.c @@ -1675,13 +1675,17 @@ _gtk_path_bar_set_file_system (GtkPathBar *path_bar, home = g_get_home_dir (); if (home != NULL) { + gchar *freeme = NULL; + path_bar->home_path = gtk_file_system_filename_to_path (path_bar->file_system, home); /* FIXME: Need file system backend specific way of getting the * Desktop path. */ - desktop = g_build_filename (home, "Desktop", NULL); - path_bar->desktop_path = gtk_file_system_filename_to_path (path_bar->file_system, desktop); - g_free (desktop); + desktop = g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP); + if (desktop != NULL) + path_bar->desktop_path = gtk_file_system_filename_to_path (path_bar->file_system, desktop); + else + path_bar->desktop_path = NULL; } else { |