mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 09:46:17 +01:00
GWin32AppInfo: invert verb comparison function
The list is sorted in ascending order, which means that to put verbs alphabetically we need to sort ealier verbs with -1. Same for the "open" verb and the preferred verb (if any).
This commit is contained in:
parent
48d96b21f9
commit
d33c3747dc
@ -733,18 +733,18 @@ compare_verbs (gconstpointer a,
|
||||
if (def != NULL)
|
||||
{
|
||||
if (_wcsicmp (ca->name, def) == 0)
|
||||
return 1;
|
||||
else if (_wcsicmp (cb->name, def) == 0)
|
||||
return -1;
|
||||
else if (_wcsicmp (cb->name, def) == 0)
|
||||
return 1;
|
||||
}
|
||||
|
||||
is_open_ca = is_open (ca->name);
|
||||
is_open_cb = is_open (cb->name);
|
||||
|
||||
if (is_open_ca && !is_open_cb)
|
||||
return 1;
|
||||
else if (is_open_ca && !is_open_cb)
|
||||
return -1;
|
||||
else if (is_open_ca && !is_open_cb)
|
||||
return 1;
|
||||
|
||||
return _wcsicmp (ca->name, cb->name);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user