diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-04-02 17:08:17 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-04-02 17:08:17 +0800 |
commit | 02ff77d1d5f3545dae75e91fe776930b941e7b08 (patch) | |
tree | 765b4b1452f73760f5f741092ede73c1c97b5013 | |
parent | 7e7a112250b3b22190f8e50f5e34d2cafb60da49 (diff) | |
parent | 0d03cd1f3b1d50824db84490ce6fe80e49e5f6b9 (diff) | |
download | gsoc2013-empathy-02ff77d1d5f3545dae75e91fe776930b941e7b08.tar gsoc2013-empathy-02ff77d1d5f3545dae75e91fe776930b941e7b08.tar.gz gsoc2013-empathy-02ff77d1d5f3545dae75e91fe776930b941e7b08.tar.bz2 gsoc2013-empathy-02ff77d1d5f3545dae75e91fe776930b941e7b08.tar.lz gsoc2013-empathy-02ff77d1d5f3545dae75e91fe776930b941e7b08.tar.xz gsoc2013-empathy-02ff77d1d5f3545dae75e91fe776930b941e7b08.tar.zst gsoc2013-empathy-02ff77d1d5f3545dae75e91fe776930b941e7b08.zip |
Merge branch 'gnome-3-4'
-rw-r--r-- | goa-mc-plugin/Makefile.am | 3 | ||||
-rw-r--r-- | goa-mc-plugin/mcp-account-manager-goa.c | 42 |
2 files changed, 21 insertions, 24 deletions
diff --git a/goa-mc-plugin/Makefile.am b/goa-mc-plugin/Makefile.am index 18fc9eae6..a273b72de 100644 --- a/goa-mc-plugin/Makefile.am +++ b/goa-mc-plugin/Makefile.am @@ -1,5 +1,6 @@ AM_CPPFLAGS = \ - $(GOA_CFLAGS) + $(GOA_CFLAGS) \ + $(ERROR_CFLAGS) pluginsdir = $(MISSION_CONTROL_PLUGINS_DIR) plugins_LTLIBRARIES = \ diff --git a/goa-mc-plugin/mcp-account-manager-goa.c b/goa-mc-plugin/mcp-account-manager-goa.c index af82e4727..911b2d6ca 100644 --- a/goa-mc-plugin/mcp-account-manager-goa.c +++ b/goa-mc-plugin/mcp-account-manager-goa.c @@ -255,8 +255,6 @@ load_store (McpAccountManagerGoa *self) static void mcp_account_manager_goa_init (McpAccountManagerGoa *self) { - gchar *path; - DEBUG ("GOA MC plugin initialised"); self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, @@ -307,7 +305,6 @@ _goa_client_new_cb (GObject *obj, gpointer user_data) { McpAccountManagerGoa *self = user_data; - GoaClient *client; GList *accounts, *ptr; GError *error = NULL; @@ -357,10 +354,10 @@ mcp_account_manager_goa_list (const McpAccountStorage *self, static void get_enabled (const McpAccountStorage *self, const McpAccountManager *am, - const gchar *acct, + const gchar *acc, GoaObject *object) { - mcp_account_manager_set_value (am, acct, "Enabled", + mcp_account_manager_set_value (am, acc, "Enabled", goa_object_peek_chat (object) != NULL ? "true" : "false"); } @@ -368,16 +365,16 @@ get_enabled (const McpAccountStorage *self, static gboolean mcp_account_manager_goa_get (const McpAccountStorage *self, const McpAccountManager *am, - const gchar *acct, + const gchar *acc, const gchar *key) { McpAccountManagerGoaPrivate *priv = GET_PRIVATE (self); GoaObject *object; GoaAccount *account; - DEBUG ("%s: %s, %s", G_STRFUNC, acct, key); + DEBUG ("%s: %s, %s", G_STRFUNC, acc, key); - object = g_hash_table_lookup (priv->accounts, acct); + object = g_hash_table_lookup (priv->accounts, acc); if (object == NULL) return FALSE; @@ -392,28 +389,28 @@ mcp_account_manager_goa_get (const McpAccountStorage *self, /* load all keys */ GHashTable *params = get_tp_parameters (account); GHashTableIter iter; - gpointer key, value; + gpointer k, value; GStrv keys; guint i; - gssize nkeys = 0; + gsize nkeys = 0; /* Properties from GOA */ g_hash_table_iter_init (&iter, params); - while (g_hash_table_iter_next (&iter, &key, &value)) - mcp_account_manager_set_value (am, acct, key, value); + while (g_hash_table_iter_next (&iter, &k, &value)) + mcp_account_manager_set_value (am, acc, k, value); g_hash_table_unref (params); /* Stored properties */ - keys = g_key_file_get_keys (priv->store, acct, &nkeys, NULL); + keys = g_key_file_get_keys (priv->store, acc, &nkeys, NULL); for (i = 0; i < nkeys; i++) { - gchar *v = g_key_file_get_value (priv->store, acct, keys[i], NULL); + gchar *v = g_key_file_get_value (priv->store, acc, keys[i], NULL); if (v != NULL) { - mcp_account_manager_set_value (am, acct, keys[i], v); + mcp_account_manager_set_value (am, acc, keys[i], v); g_free (v); } } @@ -421,11 +418,11 @@ mcp_account_manager_goa_get (const McpAccountStorage *self, g_strfreev (keys); /* Enabled */ - get_enabled (self, am, acct, object); + get_enabled (self, am, acc, object); } else if (!tp_strdiff (key, "Enabled")) { - get_enabled (self, am, acct, object); + get_enabled (self, am, acc, object); } else { @@ -436,11 +433,11 @@ mcp_account_manager_goa_get (const McpAccountStorage *self, value = g_hash_table_lookup (params, key); if (value == NULL) - value = g_key_file_get_value (priv->store, acct, key, NULL); + value = g_key_file_get_value (priv->store, acc, key, NULL); else value = g_strdup (value); - mcp_account_manager_set_value (am, acct, key, value); + mcp_account_manager_set_value (am, acc, key, value); g_hash_table_unref (params); g_free (value); @@ -455,7 +452,7 @@ account_is_in_goa (const McpAccountStorage *self, { McpAccountManagerGoaPrivate *priv = GET_PRIVATE (self); - return (g_hash_table_lookup (priv->accounts, acct) != NULL); + return (g_hash_table_lookup (priv->accounts, account) != NULL); } static gboolean @@ -466,7 +463,6 @@ mcp_account_manager_goa_set (const McpAccountStorage *self, const gchar *val) { McpAccountManagerGoaPrivate *priv = GET_PRIVATE (self); - GError *error = NULL; if (!account_is_in_goa (self, account)) return FALSE; @@ -572,14 +568,14 @@ mcp_account_manager_goa_get_restrictions (const McpAccountStorage *self, static void mcp_account_manager_goa_get_identifier (const McpAccountStorage *self, - const gchar *acct, + const gchar *acc, GValue *identifier) { McpAccountManagerGoaPrivate *priv = GET_PRIVATE (self); GoaObject *object; GoaAccount *account; - object = g_hash_table_lookup (priv->accounts, acct); + object = g_hash_table_lookup (priv->accounts, acc); g_return_if_fail (object != NULL); account = goa_object_peek_account (object); |