[gnome-software/wip/william/cherry-pick-4: 20/23] Sort snaps before other apps
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/william/cherry-pick-4: 20/23] Sort snaps before other apps
- Date: Fri, 3 Jun 2016 07:02:12 +0000 (UTC)
commit 5cb94ba3702b909c4b36f34f0be9ebc1d558faec
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Mar 30 15:55:47 2016 +1300
Sort snaps before other apps
src/gs-shell-search.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-search.c b/src/gs-shell-search.c
index cb17cf8..60da255 100644
--- a/src/gs-shell-search.c
+++ b/src/gs-shell-search.c
@@ -258,6 +258,12 @@ gs_shell_search_get_app_sort_key (GsApp *app)
/* sort installed, removing, other */
key = g_string_sized_new (64);
+ /* sort snaps before other apps */
+ if (g_strcmp0 (gs_app_get_management_plugin (app), "snappy") == 0)
+ g_string_append (key, "9:");
+ else
+ g_string_append (key, "1:");
+
/* sort missing codecs before applications */
switch (gs_app_get_state (app)) {
case AS_APP_STATE_UNAVAILABLE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]