mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-10 12:38:54 +02:00
xdgmime: sort glob hits with larger weight first
Higher weight is more important, so return these first meaning they will be used as the default.
This commit is contained in:
@ -565,7 +565,7 @@ static int compare_mime_weight (const void *a, const void *b)
|
|||||||
const MimeWeight *aa = (const MimeWeight *)a;
|
const MimeWeight *aa = (const MimeWeight *)a;
|
||||||
const MimeWeight *bb = (const MimeWeight *)b;
|
const MimeWeight *bb = (const MimeWeight *)b;
|
||||||
|
|
||||||
return aa->weight - bb->weight;
|
return bb->weight - aa->weight;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ISUPPER(c) ((c) >= 'A' && (c) <= 'Z')
|
#define ISUPPER(c) ((c) >= 'A' && (c) <= 'Z')
|
||||||
|
@ -381,7 +381,7 @@ static int compare_mime_weight (const void *a, const void *b)
|
|||||||
const MimeWeight *aa = (const MimeWeight *)a;
|
const MimeWeight *aa = (const MimeWeight *)a;
|
||||||
const MimeWeight *bb = (const MimeWeight *)b;
|
const MimeWeight *bb = (const MimeWeight *)b;
|
||||||
|
|
||||||
return aa->weight - bb->weight;
|
return bb->weight - aa->weight;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ISUPPER(c) ((c) >= 'A' && (c) <= 'Z')
|
#define ISUPPER(c) ((c) >= 'A' && (c) <= 'Z')
|
||||||
|
Reference in New Issue
Block a user