aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-08-16 05:36:43 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-08-16 07:07:13 +0800
commitf3648e1cb5f1a2537b557bce2ff9b0bc4f17c751 (patch)
tree24e6c4f74a75543d7491ab8027abf3c8d94fd10f /mail/em-folder-utils.c
parent4ba4bdd01266ce0c3642f92093f4ff2e09348fff (diff)
downloadgsoc2013-evolution-f3648e1cb5f1a2537b557bce2ff9b0bc4f17c751.tar.gz
gsoc2013-evolution-f3648e1cb5f1a2537b557bce2ff9b0bc4f17c751.tar.zst
gsoc2013-evolution-f3648e1cb5f1a2537b557bce2ff9b0bc4f17c751.zip
Adapt to new CamelSubscribable interface.
Diffstat (limited to 'mail/em-folder-utils.c')
-rw-r--r--mail/em-folder-utils.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index f43a929064..1ac8b33fd2 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -194,9 +194,10 @@ emft_copy_folders__exec (struct _EMCopyFolders *m,
goto exception;
/* this folder no longer exists, unsubscribe it */
- if (camel_store_supports_subscriptions (m->fromstore))
- camel_store_unsubscribe_folder_sync (
- m->fromstore, info->full_name, NULL, NULL);
+ if (CAMEL_IS_SUBSCRIBABLE (m->fromstore))
+ camel_subscribable_unsubscribe_folder_sync (
+ CAMEL_SUBSCRIBABLE (m->fromstore),
+ info->full_name, NULL, NULL);
deleted = 1;
} else {
@@ -238,10 +239,13 @@ emft_copy_folders__exec (struct _EMCopyFolders *m,
deleting = g_list_prepend (deleting, info);
/* subscribe to the new folder if appropriate */
- if (camel_store_supports_subscriptions (m->tostore)
- && !camel_store_folder_is_subscribed (m->tostore, toname->str))
- camel_store_subscribe_folder_sync (
- m->tostore, toname->str, NULL, NULL);
+ if (CAMEL_IS_SUBSCRIBABLE (m->tostore)
+ && !camel_subscribable_folder_is_subscribed (
+ CAMEL_SUBSCRIBABLE (m->tostore),
+ toname->str))
+ camel_subscribable_subscribe_folder_sync (
+ CAMEL_SUBSCRIBABLE (m->tostore),
+ toname->str, NULL, NULL);
info = info->next;
}
@@ -258,9 +262,10 @@ emft_copy_folders__exec (struct _EMCopyFolders *m,
/* FIXME: we need to do something with the exception
since otherwise the users sees a failed operation
with no error message or even any warnings */
- if (camel_store_supports_subscriptions (m->fromstore))
- camel_store_unsubscribe_folder_sync (
- m->fromstore, info->full_name, NULL, NULL);
+ if (CAMEL_IS_SUBSCRIBABLE (m->fromstore))
+ camel_subscribable_unsubscribe_folder_sync (
+ CAMEL_SUBSCRIBABLE (m->fromstore),
+ info->full_name, NULL, NULL);
camel_store_delete_folder_sync (
m->fromstore, info->full_name, NULL, NULL);