diff options
author | Not Zed <NotZed@Ximian.com> | 2002-09-10 14:52:21 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-09-10 14:52:21 +0800 |
commit | 26136b35b7ba15d85be19097a677cc48c76ac3d5 (patch) | |
tree | 03a307738b48f3d61fadafcf2c788a9cc3fdb972 /mail | |
parent | b89fe0eff06b6266599dbd44110b4719ec964c89 (diff) | |
download | gsoc2013-evolution-26136b35b7ba15d85be19097a677cc48c76ac3d5.tar gsoc2013-evolution-26136b35b7ba15d85be19097a677cc48c76ac3d5.tar.gz gsoc2013-evolution-26136b35b7ba15d85be19097a677cc48c76ac3d5.tar.bz2 gsoc2013-evolution-26136b35b7ba15d85be19097a677cc48c76ac3d5.tar.lz gsoc2013-evolution-26136b35b7ba15d85be19097a677cc48c76ac3d5.tar.xz gsoc2013-evolution-26136b35b7ba15d85be19097a677cc48c76ac3d5.tar.zst gsoc2013-evolution-26136b35b7ba15d85be19097a677cc48c76ac3d5.zip |
If we already have a folder, make sure we unref/unhook from it. Fixes a
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.
svn path=/trunk/; revision=18029
Diffstat (limited to 'mail')
-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); } |