aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-19 17:40:19 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-19 19:30:44 +0800
commit947941331f01e77ce83baa623e4a15b081d8cd1a (patch)
tree1bca356c7da66e1b07f0f4e61a09cf153e70ee21
parentc977e894c549b8bb146e23dd5ce88509a30c96cd (diff)
downloadgsoc2013-empathy-947941331f01e77ce83baa623e4a15b081d8cd1a.tar
gsoc2013-empathy-947941331f01e77ce83baa623e4a15b081d8cd1a.tar.gz
gsoc2013-empathy-947941331f01e77ce83baa623e4a15b081d8cd1a.tar.bz2
gsoc2013-empathy-947941331f01e77ce83baa623e4a15b081d8cd1a.tar.lz
gsoc2013-empathy-947941331f01e77ce83baa623e4a15b081d8cd1a.tar.xz
gsoc2013-empathy-947941331f01e77ce83baa623e4a15b081d8cd1a.tar.zst
gsoc2013-empathy-947941331f01e77ce83baa623e4a15b081d8cd1a.zip
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
-rw-r--r--libempathy-gtk/empathy-roster-view.c11
1 files 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);
}