GNOME Bugzilla – Bug 680288
GtkEntryCompletion's inline completion (but not popup completion) is case-sensitive.
Last modified: 2017-08-28 00:49:43 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.
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;
*** This bug has been marked as a duplicate of bug 361599 ***
*** This bug has been marked as a duplicate of bug 395964 ***