[gnome-software/gnome-3-10] Show system applications at the end of the installed list



commit 80c4a9e23ba26e93f1f23e6e16036adece80bd72
Author: Richard Hughes <richard hughsie com>
Date:   Thu Oct 31 14:50:53 2013 +0000

    Show system applications at the end of the installed list
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1025250

 src/gs-plugin-loader.c   |    1 -
 src/gs-shell-installed.c |    7 +++++++
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 24303bb..59aaaac 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -678,7 +678,6 @@ gs_plugin_loader_get_installed_thread_cb (GSimpleAsyncResult *res,
                g_error_free (error);
                goto out;
        }
-       state->list = gs_plugin_loader_remove_system (state->list);
        state->list = gs_plugin_loader_remove_invalid (state->list);
        if (state->list == NULL) {
                g_set_error_literal (&error,
diff --git a/src/gs-shell-installed.c b/src/gs-shell-installed.c
index 4bf1104..0542490 100644
--- a/src/gs-shell-installed.c
+++ b/src/gs-shell-installed.c
@@ -343,6 +343,13 @@ gs_shell_installed_sort_func (GtkListBoxRow *a,
        guint64 date1 = gs_app_get_install_date (a1);
        guint64 date2 = gs_app_get_install_date (a2);
 
+       if (gs_app_get_kind (a1) == GS_APP_KIND_SYSTEM &&
+           gs_app_get_kind (a2) != GS_APP_KIND_SYSTEM)
+               return 1;
+       if (gs_app_get_kind (a1) != GS_APP_KIND_SYSTEM &&
+           gs_app_get_kind (a2) == GS_APP_KIND_SYSTEM)
+               return -1;
+
        if (date1 < date2)
                return 1;
        else if (date2 < date1)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]