aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Kaser <f.kaser@gmx.net>2009-12-28 21:39:57 +0800
committerFelix Kaser <f.kaser@gmx.net>2010-01-11 22:03:26 +0800
commit7a8efe86d8f47d911b15a9ad3f56c52ba66de41f (patch)
tree73bd390cc8cd1c9375dabfccafd37d17625266f6
parent32f691f2a35bce50b8167b7de32ba357f3e40343 (diff)
downloadgsoc2013-empathy-7a8efe86d8f47d911b15a9ad3f56c52ba66de41f.tar
gsoc2013-empathy-7a8efe86d8f47d911b15a9ad3f56c52ba66de41f.tar.gz
gsoc2013-empathy-7a8efe86d8f47d911b15a9ad3f56c52ba66de41f.tar.bz2
gsoc2013-empathy-7a8efe86d8f47d911b15a9ad3f56c52ba66de41f.tar.lz
gsoc2013-empathy-7a8efe86d8f47d911b15a9ad3f56c52ba66de41f.tar.xz
gsoc2013-empathy-7a8efe86d8f47d911b15a9ad3f56c52ba66de41f.tar.zst
gsoc2013-empathy-7a8efe86d8f47d911b15a9ad3f56c52ba66de41f.zip
connect to val-changed signal in contact manager
new accounts have to be registered for status-changed signals, that can only be done if the account-validity-changed signal is handled. fixes bug #604628
-rw-r--r--libempathy/empathy-contact-manager.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libempathy/empathy-contact-manager.c b/libempathy/empathy-contact-manager.c
index ce77d273b..ee3b70516 100644
--- a/libempathy/empathy-contact-manager.c
+++ b/libempathy/empathy-contact-manager.c
@@ -176,6 +176,19 @@ contact_manager_status_changed_cb (TpAccount *account,
}
static void
+contact_manager_validity_changed_cb (TpAccountManager *account_manager,
+ TpAccount *account,
+ gboolean valid,
+ EmpathyContactManager *manager)
+{
+ if (valid) {
+ empathy_signal_connect_weak (account, "status-changed",
+ G_CALLBACK (contact_manager_status_changed_cb),
+ G_OBJECT (manager));
+ }
+}
+
+static void
contact_manager_finalize (GObject *object)
{
EmpathyContactManagerPriv *priv = GET_PRIV (object);
@@ -272,6 +285,10 @@ account_manager_prepared_cb (GObject *source_object,
G_OBJECT (manager));
}
g_list_free (accounts);
+
+ empathy_signal_connect_weak (account_manager, "account-validity-changed",
+ G_CALLBACK (contact_manager_validity_changed_cb),
+ G_OBJECT (manager));
}
static void