From c004b304e9f83349f87b845bb485de18a550615e Mon Sep 17 00:00:00 2001 From: "Nickolay V. Shmyrev" Date: Thu, 21 Dec 2006 00:53:20 +0000 Subject: Disconnect handlers on image destroy. Fixes bug #340165. 2006-12-21 Nickolay V. Shmyrev * mail/em-format-html-display.c: (efhd_image_unallocate), (efhd_attachment_image): Disconnect handlers on image destroy. Fixes bug #340165. svn path=/trunk/; revision=33084 --- mail/em-format-html-display.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mail/em-format-html-display.c') diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index 9d7a13d787..4564e8155f 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -182,6 +182,7 @@ struct _attach_puri { int fit_width; int fit_height; GtkImage *image; + GtkWidget *event_box; /* Optional Text Mem Stream */ CamelStreamMem *mstream; @@ -1695,6 +1696,11 @@ efhd_image_unallocate (struct _EMFormatPURI * puri) { struct _attach_puri *info = (struct _attach_puri *) puri; g_signal_handlers_disconnect_by_func(info->html, efhd_image_resized, info); + + g_signal_handlers_disconnect_by_func(info->event_box, efhd_image_popup, info); + g_signal_handlers_disconnect_by_func(info->event_box, efhd_image_change_cursor, info); + g_signal_handlers_disconnect_by_func(info->event_box, efhd_attachment_popup_menu, info); + g_signal_handlers_disconnect_by_func(info->event_box, efhd_image_fit_width, info); } static gboolean @@ -1727,6 +1733,7 @@ efhd_attachment_image(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObjec } box = gtk_event_box_new(); + info->event_box = box; gtk_container_add((GtkContainer *)box, (GtkWidget *)info->image); gtk_widget_show_all(box); gtk_container_add((GtkContainer *)eb, box); -- cgit v1.2.3