[PATCH] Don't bookmark "x-nautilus-desktop:///"



Accidentally pressing ctrl-d on the desktop bookmarks
x-nautilus-desktop:///, cf. bug 334860 [1].
Proposed patch attached.

[1] http://bugzilla.gnome.org/show_bug.cgi?id=334860
Index: src/nautilus-spatial-window.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-spatial-window.c,v
retrieving revision 1.457
diff -u -p -r1.457 nautilus-spatial-window.c
--- src/nautilus-spatial-window.c	27 Feb 2006 15:51:47 -0000	1.457
+++ src/nautilus-spatial-window.c	17 Mar 2006 11:23:17 -0000
@@ -808,7 +827,13 @@ static void
 action_add_bookmark_callback (GtkAction *action,
 			      gpointer user_data)
 {
-        nautilus_window_add_bookmark_for_current_location (NAUTILUS_WINDOW (user_data));
+	NautilusWindow *window;
+
+	window = NAUTILUS_WINDOW (user_data);
+
+	if (!NAUTILUS_IS_DESKTOP_WINDOW (window)) { /* don't bookmark x-nautilus-desktop:/// */
+		nautilus_window_add_bookmark_for_current_location (window);
+	}
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]