changeset 7007:da1430478acf

[gaim-migrate @ 7564] Closing a formatted info dialog now removes the dialog handle from the list, so it doesn't try to get removed again after the prpl unloads. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 29 Sep 2003 03:54:08 +0000
parents 1dbafcde861f
children ecce6b23ea25
files src/gtknotify.c
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtknotify.c	Mon Sep 29 03:18:57 2003 +0000
+++ b/src/gtknotify.c	Mon Sep 29 03:54:08 2003 +0000
@@ -64,6 +64,12 @@
 	gaim_notify_close(GAIM_NOTIFY_EMAILS, data);
 }
 
+static void
+formatted_close_cb(GtkWidget *win, GdkEvent *event, void *user_data)
+{
+	gaim_notify_close(GAIM_NOTIFY_FORMATTED, win);
+}
+
 static void *
 gaim_gtk_notify_message(GaimNotifyMsgType type, const char *title,
 						const char *primary, const char *secondary,
@@ -271,6 +277,9 @@
 	gtk_window_set_type_hint(GTK_WINDOW(window), GDK_WINDOW_TYPE_HINT_DIALOG);
 	gtk_container_set_border_width(GTK_CONTAINER(window), 12);
 
+	g_signal_connect(G_OBJECT(window), "delete_event",
+					 G_CALLBACK(formatted_close_cb), NULL);
+
 	/* Setup the main vbox */
 	vbox = gtk_vbox_new(FALSE, 12);
 	gtk_container_add(GTK_CONTAINER(window), vbox);
@@ -312,7 +321,7 @@
 	gtk_widget_show(button);
 
 	g_signal_connect_swapped(G_OBJECT(button), "clicked",
-					 G_CALLBACK(gtk_widget_destroy), window);
+					 G_CALLBACK(formatted_close_cb), window);
 
 	/* Add the text to the gtkimhtml */
 	if (gaim_prefs_get_bool("/gaim/gtk/conversations/ignore_colors"))