diff src/gtknotify.c @ 6104:29ddc42ff402

[gaim-migrate @ 6565] Make gaim not crash when signing off an account that has had a message notify window closed for it. Previously Gaim was freeing the widget but not removing it from the linked list, so gaim attempted to free it again at sign off. "There's been a lot of talk, about this next song. Maybe a little too much talk. This song is not a rebel song. This song is Sunday, Bloody Sunday." committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 13 Jul 2003 07:58:32 +0000
parents 059d95c67cda
children 99f4bbeb27bc
line wrap: on
line diff
--- a/src/gtknotify.c	Sun Jul 13 01:19:49 2003 +0000
+++ b/src/gtknotify.c	Sun Jul 13 07:58:32 2003 +0000
@@ -46,6 +46,12 @@
 									void *user_data);
 
 static void
+message_response_cb(GtkDialog *dialog, gint id, GaimNotifyMailData *data)
+{
+	gaim_notify_close(GAIM_NOTIFY_MESSAGE, data);
+}
+
+static void
 email_response_cb(GtkDialog *dialog, gint id, GaimNotifyMailData *data)
 {
 	if (id == 0)
@@ -93,7 +99,7 @@
 										 GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
 										 NULL);
 	g_signal_connect(G_OBJECT(dialog), "response",
-					 G_CALLBACK(gtk_widget_destroy), NULL);
+					 G_CALLBACK(message_response_cb), dialog);
 
 	gtk_container_set_border_width(GTK_CONTAINER(dialog), 6);
 	gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);