aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2009-07-24 07:45:59 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-07-30 06:13:20 +0800
commit45c7f5469ed08aeda3d54bf375d129cab5194cde (patch)
treec2d0e04d3954d78d261a24f5f59499c240f3913e /libempathy
parent113d262b56effb7927d310ca90db3da5840e2dc9 (diff)
downloadgsoc2013-empathy-45c7f5469ed08aeda3d54bf375d129cab5194cde.tar
gsoc2013-empathy-45c7f5469ed08aeda3d54bf375d129cab5194cde.tar.gz
gsoc2013-empathy-45c7f5469ed08aeda3d54bf375d129cab5194cde.tar.bz2
gsoc2013-empathy-45c7f5469ed08aeda3d54bf375d129cab5194cde.tar.lz
gsoc2013-empathy-45c7f5469ed08aeda3d54bf375d129cab5194cde.tar.xz
gsoc2013-empathy-45c7f5469ed08aeda3d54bf375d129cab5194cde.tar.zst
gsoc2013-empathy-45c7f5469ed08aeda3d54bf375d129cab5194cde.zip
When an account is enabled, always align it to the global presence.
Before, this was only done for newly created accounts, and not every time any account was enabled.
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-account-manager.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/libempathy/empathy-account-manager.c b/libempathy/empathy-account-manager.c
index 96e2e538f..55f9da837 100644
--- a/libempathy/empathy-account-manager.c
+++ b/libempathy/empathy-account-manager.c
@@ -104,8 +104,16 @@ emp_account_enabled_cb (EmpathyAccount *account,
GParamSpec *spec,
gpointer manager)
{
+ EmpathyAccountManagerPriv *priv = GET_PRIV (manager);
+
if (empathy_account_is_enabled (account))
- g_signal_emit (manager, signals[ACCOUNT_ENABLED], 0, account);
+ {
+ g_signal_emit (manager, signals[ACCOUNT_ENABLED], 0, account);
+
+ /* set the desired global presence on the account */
+ empathy_account_request_presence (account, priv->desired_presence,
+ priv->desired_status, priv->desired_status_message);
+ }
else
g_signal_emit (manager, signals[ACCOUNT_DISABLED], 0, account);
}
@@ -904,7 +912,6 @@ empathy_account_manager_create_account_finish (
EmpathyAccountManager *manager, GAsyncResult *result, GError **error)
{
EmpathyAccount *retval;
- EmpathyAccountManagerPriv *priv = GET_PRIV (manager);
if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result),
error))
@@ -916,12 +923,6 @@ empathy_account_manager_create_account_finish (
retval = EMPATHY_ACCOUNT (g_simple_async_result_get_op_res_gpointer (
G_SIMPLE_ASYNC_RESULT (result)));
- /* if we have an account, it's ready, as we waited for it.
- * request the global presence now.
- */
- empathy_account_request_presence (retval, priv->desired_presence,
- priv->desired_status, priv->desired_status_message);
-
return retval;
}