• Jehan's avatar
    app: update action search to use glib API. · b9a91696
    Jehan authored
    I now normalize with g_str_tokenize_and_fold() which uses standard
    Unicode normalization.
    I don't use g_str_match_string() directly though, because I want to
    run additional checks to order the results by relevance. For instance
    I still want actions whose labels starts with the search string to be
    at the top, and results with same order as search token before those
    with a different order. Then results with match in the tooltip. Finally
    I also returns results with partial match in the label, and the rest in
    the tooltip, though at the bottom of the list.
    Other than that, this returns the same results as g_str_match_string()
    with a similar algorithm. In particular now we only match the start of
    tokens (a substring in the middle of a token won't match anymore).
    I kept the small 2-character trick matching the first letters of the
    first 2 words of the label, but I got rid of the fuzzy search (that none
    really found ever relevant anyway).
    b9a91696
gimpaction-history.h 1.88 KB