summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-10-26 14:26:11 +1100
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2011-10-28 09:22:12 +1100
commitd87949ee841cb1be630ae1d048a1e007f2a4965f (patch)
tree5c6ee1627bdff0359a4705526b32e52f6b14edd4
parent807171fd01b81462be2f7ee96a9ddd213580597a (diff)
downloadempathy-d87949ee841cb1be630ae1d048a1e007f2a4965f.tar.gz
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
-rw-r--r--libempathy-gtk/empathy-contact-chooser.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-contact-chooser.c b/libempathy-gtk/empathy-contact-chooser.c
index 7faee3e09..4a4f9f4a0 100644
--- a/libempathy-gtk/empathy-contact-chooser.c
+++ b/libempathy-gtk/empathy-contact-chooser.c
@@ -176,6 +176,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,
@@ -213,6 +221,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);