diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-08-21 00:58:48 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-08-21 00:58:48 +0800 |
commit | dcb2ab438c8b9d02e6eef6a53d93242836db2ae7 (patch) | |
tree | 1e803911c91ed6e85f542e4cdb872753da963452 | |
parent | 6a6c9006908cb43e0cacca34cc22862582aadba6 (diff) | |
download | gsoc2013-empathy-dcb2ab438c8b9d02e6eef6a53d93242836db2ae7.tar gsoc2013-empathy-dcb2ab438c8b9d02e6eef6a53d93242836db2ae7.tar.gz gsoc2013-empathy-dcb2ab438c8b9d02e6eef6a53d93242836db2ae7.tar.bz2 gsoc2013-empathy-dcb2ab438c8b9d02e6eef6a53d93242836db2ae7.tar.lz gsoc2013-empathy-dcb2ab438c8b9d02e6eef6a53d93242836db2ae7.tar.xz gsoc2013-empathy-dcb2ab438c8b9d02e6eef6a53d93242836db2ae7.tar.zst gsoc2013-empathy-dcb2ab438c8b9d02e6eef6a53d93242836db2ae7.zip |
Only set the current global requested on the initial set of accounts
Stop setting the presence automagically when an account gets enabled or becomes
ready, in both cases this account might be created or be enabled by some other
UI and that UI should make the decisions about it's requested presence.
-rw-r--r-- | libempathy/empathy-account-manager.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/libempathy/empathy-account-manager.c b/libempathy/empathy-account-manager.c index 7624122d8..bd27fae54 100644 --- a/libempathy/empathy-account-manager.c +++ b/libempathy/empathy-account-manager.c @@ -106,16 +106,8 @@ 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); - - /* set the requested global presence on the account */ - empathy_account_request_presence (account, priv->requested_presence, - priv->requested_status, priv->requested_status_message); - } + g_signal_emit (manager, signals[ACCOUNT_ENABLED], 0, account); else g_signal_emit (manager, signals[ACCOUNT_DISABLED], 0, account); } @@ -279,6 +271,14 @@ empathy_account_manager_check_ready (EmpathyAccountManager *manager) return; } + /* Rerequest global presence on the initial set of accounts for cases where a + * global presence was requested before the manager was ready */ + if (priv->requested_presence != TP_CONNECTION_PRESENCE_TYPE_UNSET) + empathy_account_manager_request_global_presence (manager, + priv->requested_presence, + priv->requested_status, + priv->requested_status_message); + priv->ready = TRUE; g_object_notify (G_OBJECT (manager), "ready"); } @@ -330,10 +330,6 @@ account_manager_account_ready_cb (GObject *obj, G_CALLBACK (emp_account_removed_cb), manager); empathy_account_manager_check_ready (manager); - - /* update the account to the requested global presence */ - empathy_account_request_presence (account, priv->requested_presence, - priv->requested_status, priv->requested_status_message); } static EmpathyAccount * |