aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorPeter Williams <peterw@ximian.com>2001-07-13 23:50:32 +0800
committerPeter Williams <peterw@src.gnome.org>2001-07-13 23:50:32 +0800
commit10d8453c53e43a31551af39857a508c5c9101811 (patch)
tree492e805db52ff4aaa3a6eb78b5e5d4de86ab5788 /mail
parent65b35b58c7e0c0f7aed2c4512d9652540da3694b (diff)
downloadgsoc2013-evolution-10d8453c53e43a31551af39857a508c5c9101811.tar
gsoc2013-evolution-10d8453c53e43a31551af39857a508c5c9101811.tar.gz
gsoc2013-evolution-10d8453c53e43a31551af39857a508c5c9101811.tar.bz2
gsoc2013-evolution-10d8453c53e43a31551af39857a508c5c9101811.tar.lz
gsoc2013-evolution-10d8453c53e43a31551af39857a508c5c9101811.tar.xz
gsoc2013-evolution-10d8453c53e43a31551af39857a508c5c9101811.tar.zst
gsoc2013-evolution-10d8453c53e43a31551af39857a508c5c9101811.zip
New function. If a vfolder in our list gets finalized, NULL out
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. svn path=/trunk/; revision=11087
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-vfolder.c21
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);