aboutsummaryrefslogtreecommitdiffstats
path: root/libemail-engine
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-05-31 00:46:49 +0800
committerMilan Crha <mcrha@redhat.com>2012-05-31 00:46:49 +0800
commitc88d3170304e1892b221d0581a3cd3c767de4281 (patch)
treebe7750049e7dca9b187bea5347556d2007ba5509 /libemail-engine
parentb9d8defa321ea315ca15e59c9df33845563d5042 (diff)
downloadgsoc2013-evolution-c88d3170304e1892b221d0581a3cd3c767de4281.tar
gsoc2013-evolution-c88d3170304e1892b221d0581a3cd3c767de4281.tar.gz
gsoc2013-evolution-c88d3170304e1892b221d0581a3cd3c767de4281.tar.bz2
gsoc2013-evolution-c88d3170304e1892b221d0581a3cd3c767de4281.tar.lz
gsoc2013-evolution-c88d3170304e1892b221d0581a3cd3c767de4281.tar.xz
gsoc2013-evolution-c88d3170304e1892b221d0581a3cd3c767de4281.tar.zst
gsoc2013-evolution-c88d3170304e1892b221d0581a3cd3c767de4281.zip
Adapt to vFolder changes from evolution-data-server
Diffstat (limited to 'libemail-engine')
-rw-r--r--libemail-engine/mail-vfolder.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/libemail-engine/mail-vfolder.c b/libemail-engine/mail-vfolder.c
index aed9668c4c..dd083fafb8 100644
--- a/libemail-engine/mail-vfolder.c
+++ b/libemail-engine/mail-vfolder.c
@@ -108,7 +108,7 @@ vfolder_setup_exec (struct _setup_msg *m,
}
if (!vfolder_shutdown)
- camel_vee_folder_set_folders ((CamelVeeFolder *) m->folder, list);
+ camel_vee_folder_set_folders ((CamelVeeFolder *) m->folder, list, cancellable);
l = list;
while (l) {
@@ -128,6 +128,8 @@ vfolder_setup_free (struct _setup_msg *m)
{
GList *l;
+ camel_folder_thaw (m->folder);
+
g_object_unref (m->session);
g_object_unref (m->folder);
g_free (m->query);
@@ -173,6 +175,8 @@ vfolder_setup (EMailSession *session,
m->sources_uri = sources_uri;
m->sources_folder = sources_folder;
+ camel_folder_freeze (m->folder);
+
id = m->base.seq;
mail_msg_slow_ordered_push (m);
@@ -254,9 +258,9 @@ vfolder_adduri_exec (struct _adduri_msg *m,
while (l && !vfolder_shutdown) {
if (m->remove)
camel_vee_folder_remove_folder (
- CAMEL_VEE_FOLDER (l->data), folder);
+ CAMEL_VEE_FOLDER (l->data), folder, cancellable);
else
- camel_vee_folder_add_folder ((CamelVeeFolder *) l->data, folder);
+ camel_vee_folder_add_folder ((CamelVeeFolder *) l->data, folder, cancellable);
l = l->next;
}
g_object_unref (folder);
@@ -272,8 +276,8 @@ static void
vfolder_adduri_free (struct _adduri_msg *m)
{
g_object_unref (m->session);
- g_list_foreach (m->folders, (GFunc) g_object_unref, NULL);
- g_list_free (m->folders);
+ g_list_foreach (m->folders, (GFunc) camel_folder_thaw, NULL);
+ g_list_free_full (m->folders, g_object_unref);
g_free (m->uri);
}
@@ -301,6 +305,8 @@ vfolder_adduri (EMailSession *session,
m->uri = g_strdup (uri);
m->remove = remove;
+ g_list_foreach (m->folders, (GFunc) camel_folder_freeze, NULL);
+
id = m->base.seq;
mail_msg_slow_ordered_push (m);
@@ -877,10 +883,12 @@ store_folder_deleted_cb (CamelStore *store,
gchar *user;
d(printf("Folder deleted: %s\n", info->name));
- store = store;
- /* Warning not thread safe, but might be enough */
+ /* Unmatched folder doesn't have any rule */
+ if (g_strcmp0 (CAMEL_UNMATCHED_NAME, info->full_name) == 0)
+ return;
+ /* Warning not thread safe, but might be enough */
G_LOCK (vfolder);
/* delete it from our list */