GNOME Bugzilla – Bug 109342
when typing a keyword into the entry bar, should be case insensitive
Last modified: 2004-12-22 21:47:04 UTC
Hence if i enter "gnome" but i have a keyword "GNOME" the topics contained within the topic "gnome" should be shown.
*** Bug 113829 has been marked as a duplicate of this bug. ***
*** Bug 116634 has been marked as a duplicate of this bug. ***
Created attachment 18229 [details] [review] Patch for case insensitive topic match
Hi, Here is a patch which does a case insensitive match against topic names. It hopefully handles I18N since it uses g_utf8_casefold(). Love to get some feedback. Tony
Marking 1.0 because there is a patch. If someone could give a first review, I'd appreciate.
Hm, the patch doesn't seem to work correctly for me -- autocompletion still doesn't match case-insensitively. As for the patch itself, i'm a little converned about performance; casefolding the strings while searching for a match doesn't seem the right approach; i'd prefer if the strings were casefolded when they are offered to the autocompletion sources.
This fixes the case issue with Topics, but completely breaks autocompl with simple bookmarks (?). And I agree with chpe on the performance issue, doing lots of utf8 stuff in a loop should be the last resort :)
Thanks for the feedback. I'll keep looking into a more efficient place to do the case fold. Doing the case fold for the search key elsewhere going to be trick as it would affect matches against website titles. This raises the question whether we want matches against website titles to be case insensitive? Currently searches against titles in History and Bookmarks are case insensitive. Hmmm not sure why it didn't work for you Christian. Could you please provide more details? I'm not sure what you mean, Xan, about it breaking autocompletion with simple bookmarks? It still autocompletes against website titles in my bookmarks. Could please explain what you mean by simple bookmarks?
Basically everything should be case insensitive.
> Hmmm not sure why it didn't work for you Christian. Could you please > provide more details? I misread the intention of the patch (and of this bug): i thought _everything_ was going to be matched case-insensitively (ie bookmarks too), not just topic names, which, indeed, works with the patch. Sorry :)
Hi. Here is another patch for this bug. Sorry for taking so long to get back with something, real life getting in the way. :) This patch does a case insensitive match against topics and website titles. This patch tries to be more efficient by only doing the case fold once in ephy_autocompletion_update_matches_full_item(). The search key is folded in ephy_location_entry_set_autocompletion_key(). The _EphyAutocompletionMatch data struct now stores the folded copy of the topic and title. These copies are freed in acma_destroy(). I've added the pointer "folded_title" into _EphyAutocompletionMatch to store the folded copy of the title. I didn't use the pointer "title" because it is used when displaying the drop down list of matches. That is, if I placed the folded title into the "title" pointer all the matches in the drop down list will be in lower case. One thing I wasn't sure about, is how the value for the macro ACMA_BASE_SIZE came about. This macro is used in acma_grow(). Since I've added something into the _EphyAutocompletionMatch struct I'm worried about the need to change the value of this macro. Anyway, I hope this is more along the lines of what we are looking for.
Created attachment 18479 [details] [review] 2nd Case Insensitive Match Patch
Sorry for the spam. Reassigning bugs with a target to our next milestone.
fixed in cvs
*** Bug 132259 has been marked as a duplicate of this bug. ***
*** Bug 134154 has been marked as a duplicate of this bug. ***
*** Bug 134158 has been marked as a duplicate of this bug. ***