[empathy] Bug 626552 — Sporadic tree model warnings upon initial fill in Empathy



commit 9e050b87711ad401c2a19b0c59fbe4ed0a4bd325
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Tue Aug 17 11:54:57 2010 +0100

    Bug 626552 â?? Sporadic tree model warnings upon initial fill in Empathy
    
    Work around bgo#621076 in EmpathyIndividualView to ensure that all
    individuals and groups are visible in the contact list on initial load.
    Closes: bgo#626552

 libempathy-gtk/empathy-individual-view.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 6f8cda0..05ca7ac 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -1376,6 +1376,7 @@ individual_view_row_has_child_toggled_cb (GtkTreeModel *model,
   g_free (name);
 }
 
+/* FIXME: This is a workaround for bgo#621076 */
 static void
 individual_view_verify_group_visibility (EmpathyIndividualView *view,
     GtkTreePath *path)
@@ -1493,13 +1494,22 @@ individual_view_filter_visible_func (GtkTreeModel *model,
 
   if (individual != NULL)
     {
-      visible = individual_view_is_visible_individual (self, individual);
+      if (is_searching == TRUE)
+        visible = individual_view_is_visible_individual (self, individual);
+      else
+        visible = (priv->show_offline || is_online);
+
       g_object_unref (individual);
 
-      if (is_searching)
-        return visible;
-      else
-        return (priv->show_offline || is_online);
+      /* FIXME: Work around bgo#626552/bgo#621076 */
+      if (visible == TRUE)
+        {
+          GtkTreePath *path = gtk_tree_model_get_path (model, iter);
+          individual_view_verify_group_visibility (self, path);
+          gtk_tree_path_free (path);
+        }
+
+      return visible;
     }
 
   if (is_separator)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]