[gnome-software: 3/5] gs-installed-page: Hide the removable apps header if shown first




commit c1022d3d1f4c266bfa431abba996d7e5aac2edff
Author: Philip Withnall <pwithnall endlessos org>
Date:   Thu Mar 18 12:25:39 2021 +0000

    gs-installed-page: Hide the removable apps header if shown first
    
    This restores the behaviour for this header from before the previous
    commit, but allows this header to be shown if it’s *not* the first
    section in the list.
    
    In particular, this can happen if some apps are currently being
    installed or removed, as they are now sorted to the top of the list,
    in the ‘In Progress’ section.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1175

 src/gs-installed-page.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/gs-installed-page.c b/src/gs-installed-page.c
index dd922b533..4d7ebe37c 100644
--- a/src/gs-installed-page.c
+++ b/src/gs-installed-page.c
@@ -485,10 +485,14 @@ gs_installed_page_list_header_func (GtkListBoxRow *row,
                                     gpointer user_data)
 {
        GsApp *app = gs_app_row_get_app (GS_APP_ROW (row));
-       GsInstalledPageSection before_section = GS_UPDATE_LIST_SECTION_LAST;
        GsInstalledPageSection section;
        GtkWidget *header;
 
+       /* Don’t show a header if the REMOVABLE_APPS section is listed first,
+        * as it looks redundant. (But do show a header if another section is
+        * listed first.) */
+       GsInstalledPageSection before_section = GS_UPDATE_LIST_SECTION_REMOVABLE_APPS;
+
        /* first entry */
        gtk_list_box_row_set_header (row, NULL);
        if (before != NULL) {


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