[evolution] "Disco is dead!", says Camel.



commit edf8ad6eff6d41b052e48a9a02f07351dc5d4ca8
Author: Matthew Barnes <mbarnes redhat com>
Date:   Wed Nov 13 18:15:50 2013 -0500

    "Disco is dead!", says Camel.
    
    All offline-capable Camel providers use CamelOfflineStore now.

 libemail-engine/e-mail-store-utils.c     |   28 ++--------------------------
 libemail-engine/mail-folder-cache.c      |   17 ++---------------
 modules/mail/e-mail-shell-view-private.c |    3 +--
 3 files changed, 5 insertions(+), 43 deletions(-)
---
diff --git a/libemail-engine/e-mail-store-utils.c b/libemail-engine/e-mail-store-utils.c
index 9a9828e..1d9c5f3 100644
--- a/libemail-engine/e-mail-store-utils.c
+++ b/libemail-engine/e-mail-store-utils.c
@@ -189,20 +189,7 @@ e_mail_store_go_offline_sync (CamelStore *store,
        camel_operation_push_message (
                cancellable, _("Disconnecting from '%s'"), display_name);
 
-       if (CAMEL_IS_DISCO_STORE (store)) {
-               CamelDiscoStore *disco_store;
-
-               disco_store = CAMEL_DISCO_STORE (store);
-
-               if (camel_disco_store_can_work_offline (disco_store))
-                       success = camel_disco_store_set_status (
-                               disco_store, CAMEL_DISCO_STORE_OFFLINE,
-                               cancellable, error);
-               else
-                       success = camel_service_disconnect_sync (
-                               service, TRUE, cancellable, error);
-
-       } else if (CAMEL_IS_OFFLINE_STORE (store)) {
+       if (CAMEL_IS_OFFLINE_STORE (store)) {
                success = camel_offline_store_set_online_sync (
                        CAMEL_OFFLINE_STORE (store),
                        FALSE, cancellable, error);
@@ -278,12 +265,6 @@ e_mail_store_go_online_sync (CamelStore *store,
        camel_operation_push_message (
                cancellable, _("Reconnecting to '%s'"), display_name);
 
-       if (CAMEL_IS_DISCO_STORE (store))
-               success = camel_disco_store_set_status (
-                       CAMEL_DISCO_STORE (store),
-                       CAMEL_DISCO_STORE_ONLINE,
-                       cancellable, error);
-
        if (CAMEL_IS_OFFLINE_STORE (store))
                success = camel_offline_store_set_online_sync (
                        CAMEL_OFFLINE_STORE (store),
@@ -370,12 +351,7 @@ mail_store_prepare_for_offline_thread (GSimpleAsyncResult *simple,
                cancellable, _("Preparing account '%s' for offline"),
                display_name);
 
-       if (CAMEL_IS_DISCO_STORE (service))
-               camel_disco_store_prepare_for_offline (
-                       CAMEL_DISCO_STORE (service),
-                       cancellable, &local_error);
-
-       else if (CAMEL_IS_OFFLINE_STORE (service))
+       if (CAMEL_IS_OFFLINE_STORE (service))
                camel_offline_store_prepare_for_offline_sync (
                        CAMEL_OFFLINE_STORE (service),
                        cancellable, &local_error);
diff --git a/libemail-engine/mail-folder-cache.c b/libemail-engine/mail-folder-cache.c
index af5d2b9..e54cdbb 100644
--- a/libemail-engine/mail-folder-cache.c
+++ b/libemail-engine/mail-folder-cache.c
@@ -1256,11 +1256,7 @@ ping_store_exec (struct _ping_store_msg *m,
        status = camel_service_get_connection_status (service);
 
        if (status == CAMEL_SERVICE_CONNECTED) {
-               if (CAMEL_IS_DISCO_STORE (m->store) &&
-                       camel_disco_store_status (
-                       CAMEL_DISCO_STORE (m->store)) !=CAMEL_DISCO_STORE_OFFLINE)
-                       online = TRUE;
-               else if (CAMEL_IS_OFFLINE_STORE (m->store) &&
+               if (CAMEL_IS_OFFLINE_STORE (m->store) &&
                        camel_offline_store_get_online (
                        CAMEL_OFFLINE_STORE (m->store)))
                        online = TRUE;
@@ -1827,20 +1823,11 @@ mail_folder_cache_note_store_thread (GSimpleAsyncResult *simple,
         * catches and fixes it up when the shell opens us.
         *
         * XXX This is a Bonobo-era artifact.  Do we really still need
-        *     to do this?  Also, CamelDiscoStore needs to die already!
+        *     to do this?
         */
        if (camel_session_get_online (session)) {
                gboolean store_online = TRUE;
 
-               if (CAMEL_IS_DISCO_STORE (service)) {
-                       CamelDiscoStore *disco_store;
-                       CamelDiscoStoreStatus status;
-
-                       disco_store = CAMEL_DISCO_STORE (service);
-                       status = camel_disco_store_status (disco_store);
-                       store_online = (status != CAMEL_DISCO_STORE_OFFLINE);
-               }
-
                if (CAMEL_IS_OFFLINE_STORE (service)) {
                        store_online = camel_offline_store_get_online (
                                CAMEL_OFFLINE_STORE (service));
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index dd980e7..bb97910 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -1215,8 +1215,7 @@ send_receive_add_to_menu (SendReceiveData *data,
        if (provider && (provider->flags & CAMEL_PROVIDER_IS_REMOTE) != 0) {
                gpointer object;
 
-               if (CAMEL_IS_OFFLINE_STORE (service) ||
-                   CAMEL_IS_DISCO_STORE (service))
+               if (CAMEL_IS_OFFLINE_STORE (service))
                        object = g_object_ref (service);
                else
                        object = camel_service_ref_session (service);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]