changeset 12904:12643ca39d59

[gaim-migrate @ 15257] Part of SF Patch #1406437 from Sadrul This disconnects the signal handlers on the imhtml and its text buffer that have the toolbar as the data parameter. As Sadrul put it, "It makes sure that when an imhtml-attached toolbar is destroyed and the imhtml still exists, the signal-callbacks don't get triggered." committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Tue, 17 Jan 2006 03:00:54 +0000
parents 2bb4dc533a31
children ee0c8c446eef
files src/gtkimhtmltoolbar.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkimhtmltoolbar.c	Tue Jan 17 02:49:32 2006 +0000
+++ b/src/gtkimhtmltoolbar.c	Tue Jan 17 03:00:54 2006 +0000
@@ -869,6 +869,14 @@
 	destroy_toolbar_bgcolor(NULL, NULL, toolbar);
 	destroy_toolbar_fgcolor(NULL, NULL, toolbar);
 	close_link_dialog(toolbar);
+	if (toolbar->imhtml) {
+		g_signal_handlers_disconnect_matched(toolbar->imhtml,
+				G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL,
+				toolbar);
+		g_signal_handlers_disconnect_matched(GTK_IMHTML(toolbar->imhtml)->text_buffer,
+				G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL,
+				toolbar);
+	}
 
 	if (toolbar->sml)
 		free(toolbar->sml);