diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-09-13 18:17:50 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-09-14 16:00:00 +0800 |
commit | 9219415733151bc6d48d88bacf19cdad647a6c69 (patch) | |
tree | 2a2a4358e96130bfd83ffbad7af544c6b7d5c18d /goa-mc-plugin/mcp-account-manager-goa.c | |
parent | b981b3d1a13e22c80c21b61131c4f07053840149 (diff) | |
download | gsoc2013-empathy-9219415733151bc6d48d88bacf19cdad647a6c69.tar gsoc2013-empathy-9219415733151bc6d48d88bacf19cdad647a6c69.tar.gz gsoc2013-empathy-9219415733151bc6d48d88bacf19cdad647a6c69.tar.bz2 gsoc2013-empathy-9219415733151bc6d48d88bacf19cdad647a6c69.tar.lz gsoc2013-empathy-9219415733151bc6d48d88bacf19cdad647a6c69.tar.xz gsoc2013-empathy-9219415733151bc6d48d88bacf19cdad647a6c69.tar.zst gsoc2013-empathy-9219415733151bc6d48d88bacf19cdad647a6c69.zip |
GOA plugin: only save parameters from GOA accounts
We should let MC deal with normal accounts.
https://bugzilla.gnome.org/show_bug.cgi?id=658895
Diffstat (limited to 'goa-mc-plugin/mcp-account-manager-goa.c')
-rw-r--r-- | goa-mc-plugin/mcp-account-manager-goa.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/goa-mc-plugin/mcp-account-manager-goa.c b/goa-mc-plugin/mcp-account-manager-goa.c index a1fe9f8e1..5c6cd3896 100644 --- a/goa-mc-plugin/mcp-account-manager-goa.c +++ b/goa-mc-plugin/mcp-account-manager-goa.c @@ -427,6 +427,14 @@ mcp_account_manager_goa_get (const McpAccountStorage *self, return TRUE; } +static gboolean +account_is_in_goa (const McpAccountStorage *self, + const gchar *account) +{ + McpAccountManagerGoaPrivate *priv = GET_PRIVATE (self); + + return (g_hash_table_lookup (priv->accounts, acct) != NULL); +} static gboolean mcp_account_manager_goa_set (const McpAccountStorage *self, @@ -438,6 +446,9 @@ mcp_account_manager_goa_set (const McpAccountStorage *self, McpAccountManagerGoaPrivate *priv = GET_PRIVATE (self); GError *error = NULL; + if (!account_is_in_goa (self, account)) + return FALSE; + /* No need to save Enabled, it's up to the GOA configuration if the account * is configured or not. */ if (!tp_strdiff (key, "Enabled")) @@ -463,6 +474,9 @@ mcp_account_manager_goa_delete (const McpAccountStorage *self, { McpAccountManagerGoaPrivate *priv = GET_PRIVATE (self); + if (!account_is_in_goa (self, account)) + return FALSE; + DEBUG ("%s: (%s, %s)", G_STRFUNC, account, key); if (key == NULL) |