aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-mt.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-01-13 14:07:10 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-01-13 14:07:10 +0800
commitcf4448abf4112f6d2edb780fe6b1edf27ad7ea82 (patch)
tree4907d57e5377274167cf46c7bf9bc21f4fcd1a2a /mail/mail-mt.c
parent8bb08170165e1d6eb8b5c3605c85db249d81b1f1 (diff)
downloadgsoc2013-evolution-cf4448abf4112f6d2edb780fe6b1edf27ad7ea82.tar.gz
gsoc2013-evolution-cf4448abf4112f6d2edb780fe6b1edf27ad7ea82.tar.zst
gsoc2013-evolution-cf4448abf4112f6d2edb780fe6b1edf27ad7ea82.zip
hook onto destroy to remove dialogue from active table. (error_response):
2003-01-13 Not Zed <NotZed@Ximian.com> * mail-mt.c (mail_msg_check_error): hook onto destroy to remove dialogue from active table. (error_response): Just destroy on any response, dont unref either. svn path=/trunk/; revision=19423
Diffstat (limited to 'mail/mail-mt.c')
-rw-r--r--mail/mail-mt.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index adbdbb0828..189576d8d3 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -215,12 +215,14 @@ void mail_msg_free(void *msg)
/* hash table of ops->dialogue of active errors */
static GHashTable *active_errors = NULL;
-static void error_response(GtkObject *o, int button, void *data)
+static void error_destroy(GtkObject *o, void *data)
{
g_hash_table_remove(active_errors, data);
+}
+static void error_response(GtkObject *o, int button, void *data)
+{
gtk_widget_destroy((GtkWidget *)o);
- g_object_unref(o);
}
void mail_msg_check_error(void *msg)
@@ -268,6 +270,7 @@ void mail_msg_check_error(void *msg)
gd = (GtkDialog *)gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", text);
g_hash_table_insert(active_errors, m->ops, gd);
g_signal_connect(gd, "response", G_CALLBACK(error_response), m->ops);
+ g_signal_connect(gd, "destroy", G_CALLBACK(error_destroy), m->ops);
gtk_widget_show((GtkWidget *)gd);
}