[glib] xdgmime: sort glob hits with larger weight first
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glib] xdgmime: sort glob hits with larger weight first
- Date: Thu, 8 Oct 2009 10:03:29 +0000 (UTC)
commit 2a3710872f8bfc1c95dc8044c92c9ce020adad40
Author: Alexander Larsson <alexl redhat com>
Date: Thu Oct 8 11:59:23 2009 +0200
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.
gio/xdgmime/xdgmimecache.c | 2 +-
gio/xdgmime/xdgmimeglob.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/xdgmime/xdgmimecache.c b/gio/xdgmime/xdgmimecache.c
index 6765787..97fe975 100644
--- a/gio/xdgmime/xdgmimecache.c
+++ b/gio/xdgmime/xdgmimecache.c
@@ -565,7 +565,7 @@ static int compare_mime_weight (const void *a, const void *b)
const MimeWeight *aa = (const MimeWeight *)a;
const MimeWeight *bb = (const MimeWeight *)b;
- return aa->weight - bb->weight;
+ return bb->weight - aa->weight;
}
#define ISUPPER(c) ((c) >= 'A' && (c) <= 'Z')
diff --git a/gio/xdgmime/xdgmimeglob.c b/gio/xdgmime/xdgmimeglob.c
index 2a0c777..c82bf22 100644
--- a/gio/xdgmime/xdgmimeglob.c
+++ b/gio/xdgmime/xdgmimeglob.c
@@ -381,7 +381,7 @@ static int compare_mime_weight (const void *a, const void *b)
const MimeWeight *aa = (const MimeWeight *)a;
const MimeWeight *bb = (const MimeWeight *)b;
- return aa->weight - bb->weight;
+ return bb->weight - aa->weight;
}
#define ISUPPER(c) ((c) >= 'A' && (c) <= 'Z')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]