From: Guillaume Desmottes Date: Wed, 31 Aug 2011 12:22:36 +0000 (+0200) Subject: Enable TP account only if Chat has been turned on in GOA X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=5d17340353b68177ec1332e564a13f18fb00105a Enable TP account only if Chat has been turned on in GOA --- diff --git a/goa-mc-plugin/mcp-account-manager-goa.c b/goa-mc-plugin/mcp-account-manager-goa.c index 4c84a795..e83e12ce 100644 --- a/goa-mc-plugin/mcp-account-manager-goa.c +++ b/goa-mc-plugin/mcp-account-manager-goa.c @@ -301,27 +301,11 @@ mcp_account_manager_goa_list (const McpAccountStorage *self, static void get_enabled (const McpAccountStorage *self, const McpAccountManager *am, - const gchar *acct) + const gchar *acct, + GoaObject *object) { - // McpAccountManagerGoaPrivate *priv = GET_PRIVATE (self); - // GError *error = NULL; - // gboolean enabled; - // const char *value; - - // enabled = gconf_client_get_bool (priv->gconf, - // BISHO_FB_GCONF_ENABLE_CHAT_KEY, &error); - // if (error != NULL) - // { - // g_warning ("Unabled to get value for %s/Enabled from GConf: %s", - // acct, error->message); - // g_clear_error (&error); - // } - - // value = enabled ? "true" : "false"; - - // DEBUG ("Facebook Chat enabled = %s", value); - - mcp_account_manager_set_value (am, acct, "Enabled", "true"); + mcp_account_manager_set_value (am, acct, "Enabled", + goa_object_peek_chat (object) != NULL ? "true" : "false"); } @@ -360,11 +344,11 @@ mcp_account_manager_goa_get (const McpAccountStorage *self, g_hash_table_destroy (params); - get_enabled (self, am, acct); + get_enabled (self, am, acct, object); } else if (!tp_strdiff (key, "Enabled")) { - get_enabled (self, am, acct); + get_enabled (self, am, acct, object); } else {