diff options
-rw-r--r-- | mail/folder-browser.c | 15 |
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); } |