aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2009-01-07 00:49:05 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2009-01-07 00:49:05 +0800
commit6ba9a02a92e348cd8460710de4b78df9603e1b3e (patch)
treead15f31df68f1ee578c664c6e63fcce5f5e8b951 /libempathy
parent9175f6f4ddfb667d27e6a4d6b6b8dc7b91c45855 (diff)
downloadgsoc2013-empathy-6ba9a02a92e348cd8460710de4b78df9603e1b3e.tar
gsoc2013-empathy-6ba9a02a92e348cd8460710de4b78df9603e1b3e.tar.gz
gsoc2013-empathy-6ba9a02a92e348cd8460710de4b78df9603e1b3e.tar.bz2
gsoc2013-empathy-6ba9a02a92e348cd8460710de4b78df9603e1b3e.tar.lz
gsoc2013-empathy-6ba9a02a92e348cd8460710de4b78df9603e1b3e.tar.xz
gsoc2013-empathy-6ba9a02a92e348cd8460710de4b78df9603e1b3e.tar.zst
gsoc2013-empathy-6ba9a02a92e348cd8460710de4b78df9603e1b3e.zip
Initialize the connection numbers when creating the object.
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@2083 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-account-manager.c9
1 files changed, 9 insertions, 0 deletions
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.
*/