[empathy] UOA: Changing enable state of MC account should not modify per-service state



commit 793497ef17da9a0d9b6c5d95fb62826787e46a14
Author: Xavier Claessens <xavier claessens collabora co uk>
Date:   Wed Aug 22 15:02:12 2012 +0200

    UOA: Changing enable state of MC account should not modify per-service state
    
    ag_account_set_enabled() is not global enable state, we have to ensure that
    selected service is NULL before that.

 .../mc-plugin/mcp-account-manager-uoa.c            |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/ubuntu-online-accounts/mc-plugin/mcp-account-manager-uoa.c b/ubuntu-online-accounts/mc-plugin/mcp-account-manager-uoa.c
index 20b8f09..c0ff400 100644
--- a/ubuntu-online-accounts/mc-plugin/mcp-account-manager-uoa.c
+++ b/ubuntu-online-accounts/mc-plugin/mcp-account-manager-uoa.c
@@ -542,6 +542,9 @@ account_manager_uoa_set (const McpAccountStorage *storage,
 
   if (!tp_strdiff (key, "Enabled"))
     {
+      /* Enabled is a global setting on the account, not per-services,
+       * unfortunately */
+      ag_account_select_service (account, NULL);
       ag_account_set_enabled (account, !tp_strdiff (val, "true"));
     }
   else if (!tp_strdiff (key, "DisplayName"))



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