After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 596580 - Blank rows in entry autocompletion
Blank rows in entry autocompletion
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
: 596413 599047 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-09-28 10:09 UTC by Xan Lopez
Modified: 2009-10-20 22:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testentrycompletion.c (1.54 KB, text/plain)
2009-09-28 10:10 UTC, Xan Lopez
Details

Description Xan Lopez 2009-09-28 10:09:02 UTC
Compile the attached testcase, press 'a' in the entry, the autocompletion treeview will only show three rows (there's three lines in the model), but only the first one will have something in it.

git bisect says the commit that broke this is:

commit af73305d37fa185308995b99d8332d9eea2ffe68
Author: Kristian Rietveld <kris@gtk.org>
Date:   Tue Sep 1 17:51:19 2009 +0200

    Marking nodes invisible after pulling in the root level is wrong

diff --git a/gtk/gtktreemodelfilter.c b/gtk/gtktreemodelfilter.c
index 0d982b2..49020af 100644
--- a/gtk/gtktreemodelfilter.c
+++ b/gtk/gtktreemodelfilter.c
@@ -1284,13 +1284,6 @@ gtk_tree_model_filter_row_changed (GtkTreeModel *c_model,
       gtk_tree_model_filter_build_level (filter, NULL, NULL, FALSE);

       root = FILTER_LEVEL (filter->priv->root);
-
-      if (root)
-        {
-          for (i = 0; i < root->array->len; i++)
-            g_array_index (root->array, FilterElt, i).visible = FALSE;
-          root->visible_nodes = 0;
-        }
     }

   gtk_tree_model_filter_increment_stamp (filter);
Comment 1 Xan Lopez 2009-09-28 10:10:01 UTC
Created attachment 144162 [details]
testentrycompletion.c
Comment 2 Christian Dywan 2009-09-28 10:32:30 UTC
I am seeing empty completion rows in Midori as well, I think this is the same problem.

I reverted the above change locally and completion works normally again.
Comment 3 Kristian Rietveld 2009-09-29 06:58:40 UTC
Thanks for the test case.  I looked into this last night already and I am seeing what the problem is, only I need to find out what the right fix was.  The commit you pointed out does remove code that was wrong, but does seem to have served a purpose ;)

By the way Xan, once this is fixed, I think the reordering crashes will be fixed as well.
Comment 4 Kristian Rietveld 2009-09-30 08:05:56 UTC
*** Bug 596413 has been marked as a duplicate of this bug. ***
Comment 5 Kristian Rietveld 2009-09-30 08:36:54 UTC
Fixed, pushed to master.
Comment 6 Reinout van Schouwen 2009-10-20 22:51:50 UTC
*** Bug 599047 has been marked as a duplicate of this bug. ***