diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-08-16 05:36:43 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-08-16 07:07:13 +0800 |
commit | f3648e1cb5f1a2537b557bce2ff9b0bc4f17c751 (patch) | |
tree | 24e6c4f74a75543d7491ab8027abf3c8d94fd10f /mail/em-subscription-editor.c | |
parent | 4ba4bdd01266ce0c3642f92093f4ff2e09348fff (diff) | |
download | gsoc2013-evolution-f3648e1cb5f1a2537b557bce2ff9b0bc4f17c751.tar.gz gsoc2013-evolution-f3648e1cb5f1a2537b557bce2ff9b0bc4f17c751.tar.zst gsoc2013-evolution-f3648e1cb5f1a2537b557bce2ff9b0bc4f17c751.zip |
Adapt to new CamelSubscribable interface.
Diffstat (limited to 'mail/em-subscription-editor.c')
-rw-r--r-- | mail/em-subscription-editor.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/mail/em-subscription-editor.c b/mail/em-subscription-editor.c index 1c4d1ff70c..6c24e841c3 100644 --- a/mail/em-subscription-editor.c +++ b/mail/em-subscription-editor.c @@ -267,7 +267,7 @@ exit: } static void -subscription_editor_subscribe_folder_done (CamelStore *store, +subscription_editor_subscribe_folder_done (CamelSubscribable *subscribable, GAsyncResult *result, AsyncContext *context) { @@ -279,7 +279,8 @@ subscription_editor_subscribe_folder_done (CamelStore *store, GdkWindow *window; GError *error = NULL; - camel_store_subscribe_folder_finish (store, result, &error); + camel_subscribable_subscribe_folder_finish ( + subscribable, result, &error); /* Just return quietly if we were cancelled. */ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { @@ -319,7 +320,7 @@ exit: } static void -subscription_editor_unsubscribe_folder_done (CamelStore *store, +subscription_editor_unsubscribe_folder_done (CamelSubscribable *subscribable, GAsyncResult *result, AsyncContext *context) { @@ -331,7 +332,8 @@ subscription_editor_unsubscribe_folder_done (CamelStore *store, GdkWindow *window; GError *error = NULL; - camel_store_unsubscribe_folder_finish (store, result, &error); + camel_subscribable_unsubscribe_folder_finish ( + subscribable, result, &error); /* Just return quietly if we were cancelled. */ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { @@ -373,6 +375,7 @@ exit: static void subscription_editor_subscribe (EMSubscriptionEditor *editor) { + CamelStore *active_store; CamelFolderInfo *folder_info; GtkTreeRowReference *reference; GtkTreeSelection *selection; @@ -421,8 +424,10 @@ subscription_editor_subscribe (EMSubscriptionEditor *editor) context->folder_info = folder_info; context->reference = reference; - camel_store_subscribe_folder ( - editor->priv->active->store, + active_store = editor->priv->active->store; + + camel_subscribable_subscribe_folder ( + CAMEL_SUBSCRIBABLE (active_store), folder_info->full_name, G_PRIORITY_DEFAULT, editor->priv->active->cancellable, (GAsyncReadyCallback) subscription_editor_subscribe_folder_done, context); @@ -431,6 +436,7 @@ subscription_editor_subscribe (EMSubscriptionEditor *editor) static void subscription_editor_unsubscribe (EMSubscriptionEditor *editor) { + CamelStore *active_store; CamelFolderInfo *folder_info; GtkTreeRowReference *reference; GtkTreeSelection *selection; @@ -479,8 +485,10 @@ subscription_editor_unsubscribe (EMSubscriptionEditor *editor) context->folder_info = folder_info; context->reference = reference; - camel_store_unsubscribe_folder ( - editor->priv->active->store, + active_store = editor->priv->active->store; + + camel_subscribable_unsubscribe_folder ( + CAMEL_SUBSCRIBABLE (active_store), folder_info->full_name, G_PRIORITY_DEFAULT, editor->priv->active->cancellable, (GAsyncReadyCallback) subscription_editor_unsubscribe_folder_done, context); @@ -908,7 +916,7 @@ subscription_editor_set_store (EMSubscriptionEditor *editor, { g_return_if_fail (editor->priv->initial_store == NULL); - if (CAMEL_IS_STORE (store)) + if (CAMEL_IS_SUBSCRIBABLE (store)) editor->priv->initial_store = g_object_ref (store); } @@ -1029,7 +1037,7 @@ subscription_editor_constructed (GObject *object) session = em_subscription_editor_get_session (editor); service = camel_session_get_service (session, account->uid); - if (CAMEL_IS_STORE (service)) + if (CAMEL_IS_SUBSCRIBABLE (service)) editor->priv->initial_store = g_object_ref (service); } @@ -1059,7 +1067,7 @@ subscription_editor_realize (GtkWidget *widget) for (link = list; link != NULL; link = g_list_next (link)) { CamelStore *store = CAMEL_STORE (link->data); - if (!camel_store_supports_subscriptions (store)) + if (!CAMEL_IS_SUBSCRIBABLE (store)) continue; if (store == editor->priv->initial_store) |