[gtk+/gtk-2-24] Only show Desktop in file chooser button if there is one
- From: Christian Dywan <cdywan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] Only show Desktop in file chooser button if there is one
- Date: Wed, 3 Nov 2010 18:23:49 +0000 (UTC)
commit 6a80d40154b3a45d4360a09267094a71972cf14b
Author: Christian Dywan <christian twotoasts de>
Date: Fri Oct 22 16:07:25 2010 +0200
Only show Desktop in file chooser button if there is one
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=632894
gtk/gtkfilechooserbutton.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index b7227a0..c6a5512 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -1709,7 +1709,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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]