]> Pileus Git - ~andy/gtk/commitdiff
Only show Desktop in file chooser button if there is one
authorChristian Dywan <christian@twotoasts.de>
Fri, 22 Oct 2010 14:07:25 +0000 (16:07 +0200)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Fri, 5 Nov 2010 13:19:50 +0000 (22:19 +0900)
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=632894
gtk/gtkfilechooserbutton.c

index 471be29800a1bc6ba22975ba2a90b9ba80ca08b7..d0b0268d10a11c852a92dc2687494321d44818d2 100644 (file)
@@ -1685,7 +1685,10 @@ model_add_special (GtkFileChooserButton *button)
 
   desktopdir = g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP);
 
-  if (desktopdir)
+  /* "To disable a directory, point it to the homedir."
+   * See http://freedesktop.org/wiki/Software/xdg-user-dirs
+   **/
+  if (g_strcmp0 (desktopdir, g_get_home_dir ()) != 0)
     {
       GtkTreePath *tree_path;
       GCancellable *cancellable;