aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy')
-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