aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-04-30 21:55:29 +0800
committerDan Winship <danw@src.gnome.org>2001-04-30 21:55:29 +0800
commit246388d822fec83b0ce78e460b9d2f5793f6d2f1 (patch)
tree504665f942e55036ede566c7aa011a82f3b2ac22 /mail
parentc4ff4d8239386bd6d88ace67e4ab7bf88ff49586 (diff)
downloadgsoc2013-evolution-246388d822fec83b0ce78e460b9d2f5793f6d2f1.tar
gsoc2013-evolution-246388d822fec83b0ce78e460b9d2f5793f6d2f1.tar.gz
gsoc2013-evolution-246388d822fec83b0ce78e460b9d2f5793f6d2f1.tar.bz2
gsoc2013-evolution-246388d822fec83b0ce78e460b9d2f5793f6d2f1.tar.lz
gsoc2013-evolution-246388d822fec83b0ce78e460b9d2f5793f6d2f1.tar.xz
gsoc2013-evolution-246388d822fec83b0ce78e460b9d2f5793f6d2f1.tar.zst
gsoc2013-evolution-246388d822fec83b0ce78e460b9d2f5793f6d2f1.zip
Unhook event handlers before syncing the folder, since the folder browser
* 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. svn path=/trunk/; revision=9630
Diffstat (limited to 'mail')
-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)