[PATCH] Disconnect possible registered destroy callback on eel cancellation dialog



The attached not seriously tested patch is meant to fix bug 302735 [1].

[1] http://bugzilla.gnome.org/show_bug.cgi?id=302735

-- 
Christian Neumair <chris gnome-de org>
Index: eel/eel-stock-dialogs.c
===================================================================
RCS file: /cvs/gnome/eel/eel/eel-stock-dialogs.c,v
retrieving revision 1.30
diff -u -p -r1.30 eel-stock-dialogs.c
--- eel/eel-stock-dialogs.c	9 Dec 2005 12:05:08 -0000	1.30
+++ eel/eel-stock-dialogs.c	11 Jan 2006 20:35:44 -0000
@@ -140,6 +141,15 @@ timed_wait_free (TimedWait *wait)
 						      G_CALLBACK (timed_wait_dialog_destroy_callback),
 						      wait);
 
+		delayed_close_handler_id = GPOINTER_TO_UINT
+			(g_object_get_data (G_OBJECT (wait->dialog),
+					    "eel-stock-dialogs/delayed_close_handler_timeout_id"));
+		if (delayed_close_handler_id != 0) {
+			g_signal_handlers_disconnect_by_func (G_OBJECT (wait->dialog),
+							      G_CALLBACK (timed_wait_delayed_close_destroy_dialog_callback),
+							      GUINT_TO_POINTER (delayed_close_handler_id));
+		}
+
 		/* compute time up in milliseconds */
 		time_up = (eel_get_system_time () - wait->dialog_creation_time) / 1000;
 		

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil



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