[empathy] Enable TP account only if Chat has been turned on in GOA
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Enable TP account only if Chat has been turned on in GOA
- Date: Tue, 6 Sep 2011 05:38:16 +0000 (UTC)
commit 5d17340353b68177ec1332e564a13f18fb00105a
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed Aug 31 14:22:36 2011 +0200
Enable TP account only if Chat has been turned on in GOA
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 4c84a79..e83e12c 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
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]