summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2009-01-23 06:00:44 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2009-01-23 06:00:44 +0000
commita220373a55bcd5ee15fa553770042e932dcaa382 (patch)
tree54b8c5defbbbbf3b049786d50aaaaafe4054a241
parent4569b49bedfc4f42188a6d16f053a343867ee7af (diff)
downloadgdk-pixbuf-a220373a55bcd5ee15fa553770042e932dcaa382.tar.gz
Skip Desktop if it equals the home folder
svn path=/trunk/; revision=22192
-rw-r--r--ChangeLog8
-rw-r--r--gtk/gtkfilechooserdefault.c9
2 files changed, 17 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 54422d1ad..cc317f603 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2009-01-23 Matthias Clasen <mclasen@redhat.com>
+ Skip Desktop if it equals the home folder
+ Patch by Christian Dywan
+
+ * gtk/gtkfilechooserdefault.c (shortcuts_append_desktop): Skip
+ Desktop if it equals the home folder.
+
+2009-01-23 Matthias Clasen <mclasen@redhat.com>
+
Bug 536965 – GtkPlug: crash on theme change
Keep GtkPlug in sync with the global list of toplevels.
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 6725e980f..49d7471af 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -1920,6 +1920,15 @@ shortcuts_append_desktop (GtkFileChooserDefault *impl)
profile_start ("start", NULL);
name = g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP);
+ /* "To disable a directory, point it to the homedir."
+ * See http://freedesktop.org/wiki/Software/xdg-user-dirs
+ **/
+ if (!g_strcmp0 (name, g_get_home_dir ()))
+ {
+ profile_end ("end", NULL);
+ return;
+ }
+
file = g_file_new_for_path (name);
shortcuts_insert_file (impl, -1, SHORTCUT_TYPE_FILE, NULL, file, _("Desktop"), FALSE, SHORTCUTS_DESKTOP);
impl->has_desktop = TRUE;