[gnome-software/wip/ubuntu-3-26: 5/13] Sort snaps before other apps
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/ubuntu-3-26: 5/13] Sort snaps before other apps
- Date: Sun, 15 Oct 2017 23:03:07 +0000 (UTC)
commit 0332541c7fe2e2fdadc9aa2b0eafeee9f048c8c5
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Mar 30 15:55:47 2016 +1300
Sort snaps before other apps
src/gs-search-page.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-search-page.c b/src/gs-search-page.c
index c93e70a..16d5d02 100644
--- a/src/gs-search-page.c
+++ b/src/gs-search-page.c
@@ -203,6 +203,12 @@ gs_search_page_get_app_sort_key (GsApp *app)
{
GString *key = g_string_sized_new (64);
+ /* sort snaps before other apps */
+ if (g_strcmp0 (gs_app_get_management_plugin (app), "snap") == 0)
+ g_string_append (key, "9:");
+ else
+ g_string_append (key, "1:");
+
/* sort apps before runtimes and extensions */
switch (gs_app_get_kind (app)) {
case AS_APP_KIND_DESKTOP:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]