aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-04-30 23:48:00 +0800
committerDan Winship <danw@src.gnome.org>2001-04-30 23:48:00 +0800
commit155fcd81538ef9aa63e6e6d4b585d5dd528b4e47 (patch)
tree643eb5e2d9d829ac73349ec598d587ea7ef8c819 /mail
parent246388d822fec83b0ce78e460b9d2f5793f6d2f1 (diff)
downloadgsoc2013-evolution-155fcd81538ef9aa63e6e6d4b585d5dd528b4e47.tar
gsoc2013-evolution-155fcd81538ef9aa63e6e6d4b585d5dd528b4e47.tar.gz
gsoc2013-evolution-155fcd81538ef9aa63e6e6d4b585d5dd528b4e47.tar.bz2
gsoc2013-evolution-155fcd81538ef9aa63e6e6d4b585d5dd528b4e47.tar.lz
gsoc2013-evolution-155fcd81538ef9aa63e6e6d4b585d5dd528b4e47.tar.xz
gsoc2013-evolution-155fcd81538ef9aa63e6e6d4b585d5dd528b4e47.tar.zst
gsoc2013-evolution-155fcd81538ef9aa63e6e6d4b585d5dd528b4e47.zip
only remove event handlers if we set them up originally, to avoid
warnings from camel svn path=/trunk/; revision=9631
Diffstat (limited to 'mail')
-rw-r--r--mail/folder-browser.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index a1fb0b98ec..c2d224d6ad 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -81,11 +81,18 @@ folder_browser_destroy (GtkObject *object)
if (folder_browser->folder) {
CamelObject *folder = CAMEL_OBJECT (folder_browser->folder);
+ EvolutionStorage *storage;
+
+ if ((storage = mail_lookup_storage (folder_browser->folder->parent_store))) {
+ gtk_object_unref (GTK_OBJECT (storage));
+ camel_object_unhook_event (folder, "message_changed",
+ update_unread_count,
+ folder_browser);
+ camel_object_unhook_event (folder, "folder_changed",
+ update_unread_count,
+ folder_browser);
+ }
- 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 (folder);
}