]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-contact-chooser.c
contact-chooser: refilter when the tmp contacts change capabilities
[empathy.git] / libempathy-gtk / empathy-contact-chooser.c
index b16540cf3c88df1e74de18cf8630e9fb17b85fe3..7f31e711e5b1c8fca3f7a82847d0b2b936a36812 100644 (file)
@@ -186,6 +186,14 @@ out:
   return display;
 }
 
+static void
+contact_capabilities_changed (TpContact *contact,
+    GParamSpec *pspec,
+    EmpathyContactChooser *self)
+{
+  empathy_individual_view_refilter (self->priv->view);
+}
+
 static void
 get_contacts_cb (TpConnection *connection,
     guint n_contacts,
@@ -224,6 +232,10 @@ get_contacts_cb (TpConnection *connection,
 
   individual = folks_individual_new (personas);
 
+  /* listen for updates to the capabilities */
+  tp_g_signal_connect_object (contacts[0], "notify::capabilities",
+      G_CALLBACK (contact_capabilities_changed), self, 0);
+
   /* Pass ownership to the list */
   ctx->individuals = g_list_prepend (ctx->individuals, individual);