diff options
-rw-r--r-- | mail/ChangeLog | 9 | ||||
-rw-r--r-- | mail/folder-browser.c | 6 | ||||
-rw-r--r-- | mail/message-list.c | 12 |
3 files changed, 26 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 3ccb9933bf..9539b16548 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,12 @@ +2002-09-10 Not Zed <NotZed@Ximian.com> + + * folder-browser.c (got_folder): If we already have a folder, make + sure we unref/unhook from it. Fixes a crash on exit. + + * message-list.c (message_list_hide_clear): clear thread tree + cache if set. + (message_list_set_search): Same. For bug #28834. + 2002-09-09 Jeffrey Stedfast <fejj@ximian.com> * folder-browser-ui.c (folder_browser_ui_scan_selection): Make diff --git a/mail/folder-browser.c b/mail/folder-browser.c index ebc91cdda9..0d31cb479a 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -845,6 +845,12 @@ got_folder (char *uri, CamelFolder *folder, void *data) if (fb->message_list == NULL) goto done; + + if (fb->folder) { + camel_object_unhook_event(fb->folder, "folder_changed", folder_changed, fb); + camel_object_unhook_event(fb->folder, "message_changed", folder_changed, fb); + camel_object_unref(fb->folder); + } fb->folder = folder; if (folder == NULL) diff --git a/mail/message-list.c b/mail/message-list.c index a719983588..f19b0cc5dd 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -2322,6 +2322,11 @@ message_list_set_search (MessageList *ml, const char *search) if (search != NULL && ml->search != NULL && strcmp (search, ml->search) == 0) return; + + if (ml->thread_tree) { + camel_folder_thread_messages_unref(ml->thread_tree); + ml->thread_tree = NULL; + } mail_regen_list (ml, search, NULL, NULL); } @@ -2443,7 +2448,12 @@ message_list_hide_clear (MessageList *ml) ml->hide_before = ML_HIDE_NONE_START; ml->hide_after = ML_HIDE_NONE_END; MESSAGE_LIST_UNLOCK (ml, hide_lock); - + + if (ml->thread_tree) { + camel_folder_thread_messages_unref(ml->thread_tree); + ml->thread_tree = NULL; + } + mail_regen_list (ml, ml->search, NULL, NULL); } |