aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-mt.c7
2 files changed, 11 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 30feef968c..c7955613a4 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2003-01-11 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (mail_format_data_wrapper_write_to_stream):
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);
}