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 680288 - GtkEntryCompletion's inline completion (but not popup completion) is case-sensitive.
GtkEntryCompletion's inline completion (but not popup completion) is case-sen...
Status: RESOLVED DUPLICATE of bug 395964
Product: gtk+
Classification: Platform
Component: Widget: GtkComboBox
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-07-19 21:41 UTC by matthew
Modified: 2017-08-28 00:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description matthew 2012-07-19 21:41:52 UTC
The Gtk docs (http://developer.gnome.org/gtk3/stable/GtkEntryCompletion.html) state: "By default, the matching is done by comparing the entry text case-insensitively against the text column of the model." This is true for the completion popup: If I type "mat", and the model contains "Matthew", "Matthew appears in the completion popup.

However, inline completion appears to be case-sensitive. If I type "mat", and the model contains "Matthew", "thew" does not appear in the entry. However, if I type "Mat", then "thew" *does* appear in the entry.

This is using an EntryCompletion setup with gtk_entry_completion_set_text_column and no custom handlers.
Comment 1 matthew 2012-07-19 22:16:16 UTC
Follow-up: This bug occurs not only with the default handler, but with a custom MatchFunc. Here is an example MatchFunc (in Vala):

bool completion_match_func(Gtk.EntryCompletion completion, string key, Gtk.TreeIter iter) {
    GLib.Value value;
    list_store.get_value(iter, 0, out value);
    string? cased_target = value.get_string();
    
    if (cased_target == null)
        return false;
        
    if (key.length > cased_target.length)
        return false;
            
    string lowercase_prefix = cased_target.substring(0, key.length).casefold();
    return lowercase_prefix == key;
}

...

entry_completion = new Gtk.EntryCompletion();
entry_completion.model = ...
entry_completion.text_column = 0;
entry_completion.set_match_func(completion_match_func);
entry_completion.inline_completion = true;
entry_completion.inline_selection = true;
Comment 2 Daniel Boles 2017-08-28 00:48:01 UTC

*** This bug has been marked as a duplicate of bug 361599 ***
Comment 3 Daniel Boles 2017-08-28 00:49:43 UTC

*** This bug has been marked as a duplicate of bug 395964 ***