GNOME Bugzilla – Bug 319151
bugs in treeview typeahead
Last modified: 2011-02-04 16:19:59 UTC
Some issues i noticed when reviewing a port of this code to nautilus icon view: gtk_tree_view_search_entry_flush_timeout() sets tree_view->priv->typeselect_flush_timeout to 0 but then returns TRUE, meaning the timeout lives on. This can cause a crash if gtk_tree_view_search_dialog_hide() didn't hide the dialog (due to popup menu up). Shouldn't gtk_tree_view_search_enable_popdown() ref "data" until gtk_tree_view_real_search_enable_popdown(). I think gtk_tree_view_search_move() needs in addition to: if (up && tree_view->priv->selected_iter == 1) return; also return of selected_iter == 0. This happens if there is no initial match.
I have fixed the flush_timeout thing. I don't know if reffing the "data" is necessary there. The data is the treeview itself, so it would be quite unusual to its reference go to zero while the menu is popped up on its behalf. Regarding the selected_iter == 0 issue, I don't know what value selected_iter is supposed to have when there is no match, but I don't seem to be able to produce any problems when stepping to the first or last match, or when having no matches with the filechooser treeview...
For the == 0 issue, I could reproduce in my port by typing a letter that resulted in no match, and then pressing the up key. That might have been a result of the port though.