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 641073 - Please be consistent with GtkEntryCompletion
Please be consistent with GtkEntryCompletion
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkEntry
2.99.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-01-31 20:34 UTC by Milan Crha
Modified: 2011-02-01 07:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Milan Crha 2011-01-31 20:34:05 UTC
I'm following from bug #640698, which is a possible follow-up from bug #555087.

After fix from commit 38f6065b the "match-selected" signal passes consistently the inner model, not the GtkTreeModelFilter one from the completion object, as parameters, either when selecting by mouse or keyboard, which is nice.

But if I set a gtk_cell_layout_set_cell_data_func() on
a gtk_entry_completion_new () object, then the function passes in the GtkTreeModelFilter model again.

It's pretty confusing what model is passed in when, one may say at least.

Could there be done some clarification or anything, if nothing else then in the documentation, though I agree that with the cell data func it's not so simple, so a note in GtkEntryCompletion description or such should work too. Thanks in advance.
Comment 1 Matthias Clasen 2011-01-31 22:56:41 UTC
Ugh, I don't think we want to duplicate the entire array of cell data funcs, so let me just document that other callbacks on the cell layout, cell renderers or cell area may get another model. The important thing is that the iter and the model match each other, so as long as you just use gtk_tree_model_get, you are fine.
Comment 2 Matthias Clasen 2011-01-31 22:59:07 UTC
Out of interest, what are you trying to do with the model that is making it important to discriminate between the filter model and your own ?
Comment 3 Milan Crha 2011-02-01 07:58:50 UTC
(In reply to comment #2)
> Out of interest, what are you trying to do with the model that is making it
> important to discriminate between the filter model and your own ?

Me personally nothing interesting, it's just the way the ENameSelectorEntry is written. See [1] and search for GTK_TREE_MODEL_FILTER. Maybe it's just obsolete these days, but it was written couple years ago and after eds switched to gtk3 then runtime warnings and dis-functionality appeared.

[1] http://git.gnome.org/browse/evolution-data-server/tree/libedataserverui/e-name-selector-entry.c