aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/folder-browser.c9
2 files changed, 15 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 593afac972..73f6b34ca7 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2001-04-30 Dan Winship <danw@ximian.com>
+
+ * folder-browser.c (folder_browser_destroy): Unhook event handlers
+ before syncing the folder, since the folder browser will have been
+ destroyed by the time the sync thread completes and calls the
+ signal handlers.
+
2001-04-29 Dan Winship <danw@ximian.com>
* mail-format.c (handle_text_plain_flowed): Mojo this a bit so
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 6bbb672ea5..a1fb0b98ec 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -49,6 +49,7 @@
#define PARENT_TYPE (gtk_table_get_type ())
static void fb_resize_cb (GtkWidget *w, GtkAllocation *a);
+static void update_unread_count (CamelObject *, gpointer, gpointer);
static GtkObjectClass *folder_browser_parent_class;
@@ -79,8 +80,14 @@ folder_browser_destroy (GtkObject *object)
g_free (folder_browser->uri);
if (folder_browser->folder) {
+ CamelObject *folder = CAMEL_OBJECT (folder_browser->folder);
+
+ camel_object_unhook_event (folder, "message_changed",
+ update_unread_count, folder_browser);
+ camel_object_unhook_event (folder, "folder_changed",
+ update_unread_count, folder_browser);
mail_sync_folder (folder_browser->folder, NULL, NULL);
- camel_object_unref (CAMEL_OBJECT (folder_browser->folder));
+ camel_object_unref (folder);
}
if (folder_browser->message_list)