diff options
Diffstat (limited to 'libempathy/empathy-account-manager.c')
-rw-r--r-- | libempathy/empathy-account-manager.c | 17 |
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; } |