[ekiga] Reworked the code to hide/show offline contacts
- From: Julien Puydt <jpuydt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Reworked the code to hide/show offline contacts
- Date: Mon, 27 Sep 2010 18:49:33 +0000 (UTC)
commit a7581276b3d8b64540f2da606755104c1ec1d0a0
Author: Julien Puydt <jpuydt gnome org>
Date: Mon Sep 27 15:19:00 2010 +0200
Reworked the code to hide/show offline contacts
It is now more readable... and should work quite correctly, except perhaps
for the phantom unsorted group.
lib/engine/gui/gtk-frontend/roster-view-gtk.cpp | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
index fe24704..1d1f9da 100644
--- a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
+++ b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
@@ -548,6 +548,22 @@ show_offline_contacts_changed_nt (G_GNUC_UNUSED gpointer id,
/* beware: model is filtered here */
model = gtk_tree_view_get_model (self->priv->tree_view);
gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (model));
+
+ /* there's an interesting problem there : hiding makes the rows
+ * unexpanded... so they don't come back as they should! */
+ GtkTreeIter heaps;
+ GtkTreePath* path = NULL;
+ if (gtk_tree_model_get_iter_first (model, &heaps)) {
+
+ do {
+
+ path = gtk_tree_model_get_path (model, &heaps);
+ gtk_tree_view_expand_row (self->priv->tree_view, path, FALSE);
+ gtk_tree_path_free (path);
+
+ roster_view_gtk_update_groups (self, &heaps);
+ } while (gtk_tree_model_iter_next (model, &heaps));
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]