diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-03-20 23:41:22 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-03-20 23:41:22 +0800 |
commit | 83f7de0aed96d64229580f540cd56b56e8656c80 (patch) | |
tree | 10f911129317994034f324b1e4d9ca4ad1015608 | |
parent | 241aa1c1e9f0da4a115fedb929a37522b09fc989 (diff) | |
download | gsoc2013-evolution-83f7de0aed96d64229580f540cd56b56e8656c80.tar.gz gsoc2013-evolution-83f7de0aed96d64229580f540cd56b56e8656c80.tar.zst gsoc2013-evolution-83f7de0aed96d64229580f540cd56b56e8656c80.zip |
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.
-rw-r--r-- | modules/online-accounts/e-online-accounts-google.c | 10 | ||||
-rw-r--r-- | modules/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 709eb3bb8e..2c64218d57 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 6efeaba33e..8abe52203b 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)) { |