[evolution-kolab] Collection: remove successfully deleted sources from registry service
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab] Collection: remove successfully deleted sources from registry service
- Date: Thu, 20 Sep 2012 18:14:49 +0000 (UTC)
commit e0301ed44ff3abf803c91dc64aee54a76f7605f3
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Thu Sep 20 17:45:52 2012 +0200
Collection: remove successfully deleted sources from registry service
* this ensures that if a source (i.e., Kolab folder) was
successfully deleted from the server, its sidebar entry
is also removed
src/collection/e-kolab-backend.c | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/src/collection/e-kolab-backend.c b/src/collection/e-kolab-backend.c
index 603aff1..88304b9 100644
--- a/src/collection/e-kolab-backend.c
+++ b/src/collection/e-kolab-backend.c
@@ -273,10 +273,11 @@ kolab_backend_delete_resource_sync (ECollectionBackend *backend,
GCancellable *cancellable,
GError **error)
{
- KolabMailAccess *koma;
- ESourceResource *extension;
- const gchar *extension_name;
- gchar *folder_path;
+ KolabMailAccess *koma = NULL;
+ ESourceRegistryServer *server = NULL;
+ ESourceResource *extension = NULL;
+ const gchar *extension_name = NULL;
+ gchar *folder_path = NULL;
gboolean success = FALSE;
koma = e_kolab_backend_ref_mail_access_sync (
@@ -306,7 +307,14 @@ kolab_backend_delete_resource_sync (ECollectionBackend *backend,
g_free (folder_path);
-exit:
+ if (! success)
+ goto exit;
+
+ server = e_collection_backend_ref_server (backend);
+ e_source_registry_server_remove_source (server, source);
+ g_object_unref (server);
+
+ exit:
if (koma != NULL)
g_object_unref (koma);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]