diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-08-31 20:22:36 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-09-06 13:37:07 +0800 |
commit | 5d17340353b68177ec1332e564a13f18fb00105a (patch) | |
tree | 0c9b9b304a805c46923cee44e0c8ffdec07e95e2 | |
parent | 79df4629d7890f5d3a70e2d66afea1ded744e9d6 (diff) | |
download | gsoc2013-empathy-5d17340353b68177ec1332e564a13f18fb00105a.tar gsoc2013-empathy-5d17340353b68177ec1332e564a13f18fb00105a.tar.gz gsoc2013-empathy-5d17340353b68177ec1332e564a13f18fb00105a.tar.bz2 gsoc2013-empathy-5d17340353b68177ec1332e564a13f18fb00105a.tar.lz gsoc2013-empathy-5d17340353b68177ec1332e564a13f18fb00105a.tar.xz gsoc2013-empathy-5d17340353b68177ec1332e564a13f18fb00105a.tar.zst gsoc2013-empathy-5d17340353b68177ec1332e564a13f18fb00105a.zip |
Enable TP account only if Chat has been turned on in GOA
-rw-r--r-- | goa-mc-plugin/mcp-account-manager-goa.c | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/goa-mc-plugin/mcp-account-manager-goa.c b/goa-mc-plugin/mcp-account-manager-goa.c index 4c84a7950..e83e12ce5 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 { |