[evolution] Bug 672474 - Flaw in GOA synchronization logic
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 672474 - Flaw in GOA synchronization logic
- Date: Tue, 20 Mar 2012 15:45:29 +0000 (UTC)
commit 83f7de0aed96d64229580f540cd56b56e8656c80
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Mar 20 11:41:22 2012 -0400
Bug 672474 - Flaw in GOA synchronization logic
Changes to EAccountList and ESourceList must be explicitly synchronized
back to GConf. I forgot. Fix it throughout the online-accounts module.
modules/online-accounts/e-online-accounts-google.c | 10 +++++++++-
.../online-accounts/evolution-online-accounts.c | 10 +++++++++-
2 files changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/modules/online-accounts/e-online-accounts-google.c b/modules/online-accounts/e-online-accounts-google.c
index 709eb3b..2c64218 100644
--- a/modules/online-accounts/e-online-accounts-google.c
+++ b/modules/online-accounts/e-online-accounts-google.c
@@ -335,6 +335,8 @@ online_accounts_google_sync_calendar (GoaObject *goa_object,
g_object_unref (source);
}
+ e_source_list_sync (source_list, NULL);
+
g_object_unref (source_group);
g_object_unref (source_list);
g_object_unref (goa_account);
@@ -396,6 +398,8 @@ online_accounts_google_sync_contacts (GoaObject *goa_object,
g_object_unref (source);
}
+ e_source_list_sync (source_list, NULL);
+
g_object_unref (source_group);
g_object_unref (source_list);
g_object_unref (goa_account);
@@ -425,8 +429,10 @@ e_online_accounts_google_sync (GoaObject *goa_object,
account_list = e_get_account_list ();
account = e_get_account_by_uid (evo_id);
- if (account != NULL)
+ if (account != NULL) {
e_account_list_remove (account_list, account);
+ e_account_list_save (account_list);
+ }
}
/*** Google Calendar ***/
@@ -444,6 +450,7 @@ e_online_accounts_google_sync (GoaObject *goa_object,
if (e_cal_get_sources (&source_list, source_type, &error)) {
e_source_list_remove_source_by_uid (
source_list, evo_id);
+ e_source_list_sync (source_list, NULL);
g_object_unref (source_list);
} else {
g_warn_if_fail (source_list == NULL);
@@ -468,6 +475,7 @@ e_online_accounts_google_sync (GoaObject *goa_object,
if (e_book_get_addressbooks (&source_list, &error)) {
e_source_list_remove_source_by_uid (
source_list, evo_id);
+ e_source_list_sync (source_list, NULL);
g_object_unref (source_list);
} else {
g_warn_if_fail (source_list == NULL);
diff --git a/modules/online-accounts/evolution-online-accounts.c b/modules/online-accounts/evolution-online-accounts.c
index 6efeaba..8abe522 100644
--- a/modules/online-accounts/evolution-online-accounts.c
+++ b/modules/online-accounts/evolution-online-accounts.c
@@ -156,13 +156,16 @@ online_accounts_account_removed_cb (GoaClient *goa_client,
account_list = e_get_account_list ();
account = e_get_account_by_uid (evo_id);
- if (account != NULL)
+ if (account != NULL) {
e_account_list_remove (account_list, account);
+ e_account_list_save (account_list);
+ }
/* Remove the address book. */
if (e_book_get_addressbooks (&source_list, NULL)) {
e_source_list_remove_source_by_uid (source_list, evo_id);
+ e_source_list_sync (source_list, NULL);
g_object_unref (source_list);
}
@@ -172,6 +175,7 @@ online_accounts_account_removed_cb (GoaClient *goa_client,
if (e_cal_get_sources (&source_list, type, NULL)) {
e_source_list_remove_source_by_uid (
source_list, evo_id);
+ e_source_list_sync (source_list, NULL);
g_object_unref (source_list);
}
}
@@ -268,6 +272,8 @@ online_accounts_search_source_list (EOnlineAccounts *extension,
e_source_group_remove_source (source_group, source);
}
}
+
+ e_source_list_sync (source_list, NULL);
}
static void
@@ -338,6 +344,8 @@ online_accounts_populate_accounts_table (EOnlineAccounts *extension,
e_account_list_remove (account_list, account);
}
+ e_account_list_save (account_list);
+
/* Search address book sources. */
if (e_book_get_addressbooks (&source_list, NULL)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]