Skip to content
  • Richard Hughes's avatar
    Allow passing an optional sorting function when searching · 969b601e
    Richard Hughes authored
    Depending on what we are doing with the search results sometimes we want to
    prioritize certain types of applications.
    
    When we run the search provider we return up to 20 results to gnome-shell and
    then gnome-shell typically chooses only three to show. This means it's a bit
    more critical how we sort the returned list as we only have three tries to get
    it right.
    
    For the case of the search provider, make sure we show available desktop
    applications first and order them by how well they match the search term.
    
    If the caller doesn't specify a custom sorting function just use the old
    match_value sorting method if a truncation is required.
    969b601e