[empathy] roster-view: add_to_displayed: get the proper EmpathyRosterGroup object
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] roster-view: add_to_displayed: get the proper EmpathyRosterGroup object
- Date: Tue, 19 Jun 2012 11:38:13 +0000 (UTC)
commit 947941331f01e77ce83baa623e4a15b081d8cd1a
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Tue Jun 19 11:40:19 2012 +0200
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 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/libempathy-gtk/empathy-roster-view.c b/libempathy-gtk/empathy-roster-view.c
index a2033f2..1e98efc 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]