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:
Руслан Ижбулатов 2020-12-17 16:43:23 +00:00
parent 48d96b21f9
commit d33c3747dc

View File

@ -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);
}