[empathy: 1/2] contact-chooser: refilter when the tmp contacts change capabilities
- From: Danielle Madeley <daniellem src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 1/2] contact-chooser: refilter when the tmp contacts change capabilities
- Date: Thu, 27 Oct 2011 00:49:47 +0000 (UTC)
commit fcb0e76deed0527edb5caff02dd0edf785b1f82e
Author: Danielle Madeley <danielle madeley collabora co uk>
Date: Wed Oct 26 14:26:11 2011 +1100
contact-chooser: refilter when the tmp contacts change capabilities
Making a call to GetContactAttributes only gets the attributes currently known
to the CM. If a contact is unknown, lookups for the attributes are then queued
and signalled when retrieved. When we receive this signal, we should refilter
the contact list.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=662727
libempathy-gtk/empathy-contact-chooser.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-contact-chooser.c b/libempathy-gtk/empathy-contact-chooser.c
index b16540c..7f31e71 100644
--- a/libempathy-gtk/empathy-contact-chooser.c
+++ b/libempathy-gtk/empathy-contact-chooser.c
@@ -187,6 +187,14 @@ out:
}
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,
TpContact * const *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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]