diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/mail-vfolder.c | 21 |
2 files changed, 28 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 8d1bb0a264..13e4833c93 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2001-07-13 Peter Williams <peterw@ximian.com> + + * mail-vfolder.c (unlist_vfolder): New function. If a vfolder in our list + gets finalized, NULL out info->folder (Is it wrong if this happens?) Also, + locking issues? + (vfolder_uri_to_folder): Hook up to the finalize event here. + 2001-07-13 Jeffrey Stedfast <fejj@ximian.com> * mail-ops.c (filter_folder_filter): Updated to reflect changes in diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c index 591b91da44..1ac18f7c63 100644 --- a/mail/mail-vfolder.c +++ b/mail/mail-vfolder.c @@ -230,6 +230,26 @@ vfolder_refresh(void) g_string_free(expr, TRUE); } +static void +unlist_vfolder (CamelObject *folder, gpointer event_data, gpointer user_data) +{ + GList *l; + + l = available_vfolders; + while (l) { + struct _vfolder_info *info = l->data; + + if ((CamelObject *)info->folder == folder) { + info->folder = NULL; + return; + } + + l = l->next; + } + + g_message ("Whoa, unlisting vfolder %p but can't find it", folder); +} + void vfolder_create_storage(EvolutionShellComponent *shell_component) { @@ -303,6 +323,7 @@ vfolder_uri_to_folder(const char *uri, CamelException *ex) /* we dont have indexing on vfolders */ folder = mail_tool_get_folder_from_urlname (storeuri, foldername, CAMEL_STORE_FOLDER_CREATE, ex); info->folder = (CamelVeeFolder *)folder; + camel_object_hook_event ((CamelObject *) info->folder, "finalize", unlist_vfolder, NULL); mail_folder_cache_set_update_estorage (uri, vfolder_storage); mail_folder_cache_note_folder (uri, info->folder); |