GNOME Bugzilla – Bug 555087
Shouldn't the return type of gtk_entry_completion_get_model be GtkTreeModelFilter ?
Last modified: 2010-05-22 03:53:41 UTC
Please describe the problem: While contributing to OCaml binding to Gtk (lablgtk2) I encountered the following problem. Should'nt the return type of gtk_entry_completion_get_model be GtkTreeModelFilter instead of GtkTreeModel ? The same remark holds for gboolean (* match_selected) (GtkEntryCompletion *completion, GtkTreeModel *model, GtkTreeIter *iter); which should take as argument a GtkTreeModelFilter. If it is not possible to update the prototypes, documenting that the models are indeed GtkTreeModelFilter would help strongly typed language bindings to Gtk to be safer. Thanks in advance for your help Benjamin Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
No, get_model must return what was set with set_model. The filter model is an internal object used by the entry completion code. You are right that there is a problem with the parameters passed to the match-selected and cursor-on-match signals, currently.
Thanks for the clarification. Can I safely assume that sooner or later the parameters of the signals will be changed ?
I think the signal prototype is correct, but the parameters are wrong. The signal should not be emitted with the GtkTreeModelFilter, but with the model that was set using set_model().