[PATCH] Don't setup clipboard handling twice for the same widget



Renaming a file while another rename is in progress causes breakage due
to twice setting up the same editing widget. The attached patch prevents
Nautilus from setting up clipboard handling for the same editing widget
twice.
We silently assume that the widget always stays in the same window. The
UI manager is not changed on reparenting.

-- 
Christian Neumair <chris gnome-de org>
Index: libnautilus-private/nautilus-clipboard.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-clipboard.c,v
retrieving revision 1.6
diff -u -p -r1.6 nautilus-clipboard.c
--- libnautilus-private/nautilus-clipboard.c	26 May 2005 20:06:18 -0000	1.6
+++ libnautilus-private/nautilus-clipboard.c	1 Jun 2005 17:55:42 -0000
@@ -404,6 +404,10 @@ nautilus_clipboard_real_set_up (gpointer
 {
 	TargetCallbackData *target_data;
 
+	if (g_object_get_data (G_OBJECT (target), "Nautilus:clipboard_target_data") != NULL) {
+		return;
+	}
+
 	target_data = initialize_clipboard_component_with_callback_data
 		(target, 
 		 ui_manager,


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