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 555087 - Shouldn't the return type of gtk_entry_completion_get_model be GtkTreeModelFilter ?
Shouldn't the return type of gtk_entry_completion_get_model be GtkTreeModelFi...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkEntry
unspecified
Other All
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-10-05 12:18 UTC by Benjamin Monate
Modified: 2010-05-22 03:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Benjamin Monate 2008-10-05 12:18:08 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:
Comment 1 Matthias Clasen 2008-10-06 22:22:32 UTC
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. 
Comment 2 Benjamin Monate 2008-10-07 22:34:01 UTC
Thanks for the clarification. Can I safely assume that sooner or later the parameters of the signals will be changed ?
Comment 3 Benjamin Otte (Company) 2009-07-10 14:50:39 UTC
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().