[evolution-ews] Bug 691937 - Remove resources with e_source_remove_sync().



commit 79b5c0e7ede29211f6de4d592eb594177f0be1f8
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Apr 15 08:48:59 2013 -0400

    Bug 691937 - Remove resources with e_source_remove_sync().
    
    No doubt this could be made clearer in the API documentation, but a
    collection backend should remove a server-side ESource the same way
    as from a client process: e_source_remove().
    
    EServerSideSource overrides ESource's remove() method.  Instead of
    invoking a D-Bus method it removes itself and its children from the
    registry server, then deletes the corresponding key files.
    
    The EWS backend was calling e_source_registry_server_remove_source()
    directly from its delete_resource_sync() method, so the key file was
    never deleted.

 src/collection/e-ews-backend.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/src/collection/e-ews-backend.c b/src/collection/e-ews-backend.c
index 1e35f5d..c70fc37 100644
--- a/src/collection/e-ews-backend.c
+++ b/src/collection/e-ews-backend.c
@@ -923,13 +923,8 @@ ews_backend_delete_resource_sync (ECollectionBackend *backend,
                g_free (folder_id);
        }
 
-       if (success) {
-               ESourceRegistryServer *server;
-
-               server = e_collection_backend_ref_server (backend);
-               e_source_registry_server_remove_source (server, source);
-               g_object_unref (server);
-       }
+       if (success)
+               success = e_source_remove_sync (source, cancellable, error);
 
 exit:
        g_object_unref (connection);


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