From 947941331f01e77ce83baa623e4a15b081d8cd1a Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 19 Jun 2012 11:40:19 +0200 Subject: [PATCH] roster-view: add_to_displayed: get the proper EmpathyRosterGroup object The contacts hash table is a group-name => EmpathyRosterContact mapping. We need to use the self->priv->roster_groups hash to get the EmpathyRosterGroup object which is the one we want to refilter. https://bugzilla.gnome.org/show_bug.cgi?id=678205 --- libempathy-gtk/empathy-roster-view.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libempathy-gtk/empathy-roster-view.c b/libempathy-gtk/empathy-roster-view.c index a2033f216..1e98efcfe 100644 --- a/libempathy-gtk/empathy-roster-view.c +++ b/libempathy-gtk/empathy-roster-view.c @@ -715,7 +715,7 @@ add_to_displayed (EmpathyRosterView *self, FolksIndividual *individual; GHashTable *contacts; GHashTableIter iter; - gpointer v; + gpointer k; if (g_hash_table_lookup (self->priv->displayed_contacts, contact) != NULL) return; @@ -731,9 +731,14 @@ add_to_displayed (EmpathyRosterView *self, return; g_hash_table_iter_init (&iter, contacts); - while (g_hash_table_iter_next (&iter, NULL, &v)) + while (g_hash_table_iter_next (&iter, &k, NULL)) { - GtkWidget *group = GTK_WIDGET (v); + const gchar *group_name = k; + GtkWidget *group; + + group = g_hash_table_lookup (self->priv->roster_groups, group_name); + if (group == NULL) + continue; egg_list_box_child_changed (EGG_LIST_BOX (self), group); } -- 2.11.4.GIT