From d33c3747dc0ccbb4f6d4bf958257ae190b6a84cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Thu, 17 Dec 2020 16:43:23 +0000 Subject: [PATCH] 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). --- gio/gwin32appinfo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gio/gwin32appinfo.c b/gio/gwin32appinfo.c index 9e6b36c48..e77db37f4 100644 --- a/gio/gwin32appinfo.c +++ b/gio/gwin32appinfo.c @@ -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); }