mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 16:32:18 +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:
		| @@ -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); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user