mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
gdesktopappinfo: Rank Keywords matches higher than GenericName
It makes sense to match on GenericName in case an application does not provide any keywords, but the Keywords field has been added to explicitly support the search case, while GenericName was used to be displayed in menus, so it makes more sense to consider Keywords more (or equally) relevant for search. https://bugzilla.gnome.org/show_bug.cgi?id=711640
This commit is contained in:
parent
d33f758313
commit
2fb8901b64
@ -264,8 +264,8 @@ const gchar desktop_key_match_category[N_DESKTOP_KEYS] = {
|
||||
* use the same number for the two different keys.
|
||||
*/
|
||||
[DESKTOP_KEY_Name] = 1,
|
||||
[DESKTOP_KEY_GenericName] = 2,
|
||||
[DESKTOP_KEY_Keywords] = 3,
|
||||
[DESKTOP_KEY_Keywords] = 2,
|
||||
[DESKTOP_KEY_GenericName] = 3,
|
||||
[DESKTOP_KEY_X_GNOME_FullName] = 4,
|
||||
[DESKTOP_KEY_Comment] = 5
|
||||
};
|
||||
@ -3506,6 +3506,8 @@ g_app_info_get_default_for_uri_scheme (const char *uri_scheme)
|
||||
* applications that matched @search_string with an equal score. The
|
||||
* outer list is sorted by score so that the first strv contains the
|
||||
* best-matching applications, and so on.
|
||||
* The algorithm for determining matches is undefined and may change at
|
||||
* any time.
|
||||
*
|
||||
* Returns: (array zero-terminated=1) (element-type GStrv) (transfer full): a
|
||||
* list of strvs. Free each item with g_strfreev() and free the outer
|
||||
|
Loading…
Reference in New Issue
Block a user