[gnome-software/1853-source-popover-special-case-single-source-case] gs-details-page: Hide selected check in origin popover when there's only one origin



commit 6410d431917a4070b2bd29353daf7e12b27fe5eb
Author: Milan Crha <mcrha redhat com>
Date:   Wed Aug 10 17:17:01 2022 +0200

    gs-details-page: Hide selected check in origin popover when there's only one origin
    
    No need to show the check which origin is selected when the app
    is available only in a single origin.
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1853

 src/gs-details-page.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index e59b602db..6fa448d89 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -765,7 +765,8 @@ gs_details_page_get_alternates_cb (GObject *source_object,
                }
        }
 
-       if (select_row)
+       /* Do not show the "selected" check when there's only one app in the list */
+       if (select_row && gs_app_list_length (list) > 1)
                gs_origin_popover_row_set_selected (GS_ORIGIN_POPOVER_ROW (select_row), TRUE);
 
        gs_details_page_update_origin_button (self, TRUE);


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