From cc57002f9ad20cc775b45dc8df66e30ff7f3018b Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 6 Jan 2009 16:49:05 +0000 Subject: Initialize the connection numbers when creating the object. svn path=/trunk/; revision=2083 --- libempathy/empathy-account-manager.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libempathy') diff --git a/libempathy/empathy-account-manager.c b/libempathy/empathy-account-manager.c index 94f6e9102..b42c82c9e 100644 --- a/libempathy/empathy-account-manager.c +++ b/libempathy/empathy-account-manager.c @@ -327,6 +327,7 @@ empathy_account_manager_init (EmpathyAccountManager *manager) G_TYPE_INSTANCE_GET_PRIVATE (manager, EMPATHY_TYPE_ACCOUNT_MANAGER, EmpathyAccountManagerPriv); GList *mc_accounts, *l; + guint initial_connection; AccountData *data; manager->priv = priv; @@ -346,6 +347,14 @@ empathy_account_manager_init (EmpathyAccountManager *manager) { data = account_data_new_default (priv->mc, l->data); + initial_connection = mission_control_get_connection_status (priv->mc, + l->data, NULL); + if (initial_connection == TP_CONNECTION_STATUS_CONNECTED) { + priv->connected++; + } else if (initial_connection == TP_CONNECTION_STATUS_CONNECTING) { + priv->connecting++; + } + /* no need to g_object_ref () the account here, as mc_accounts_list () * already increases the refcount. */ -- cgit v1.2.3