Commit cc57002f authored by Xavier Claessens's avatar Xavier Claessens

Initialize the connection numbers when creating the object.

svn path=/trunk/; revision=2083
parent 35f3ccfb
......@@ -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.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment