[gnome-software/1166-repository-dialog-design-updates: 35/39] gs-app: Use OS name in origin UI for provenance packages only, not for repositories




commit a8de080d99e8dc1d2ca4a14912ae9f3356a4bcfe
Author: Milan Crha <mcrha redhat com>
Date:   Wed Jul 21 07:58:23 2021 +0200

    gs-app: Use OS name in origin UI for provenance packages only, not for repositories
    
    The repositories should keep their set origin UI property, to have correct
    name in the repositories dialog.

 lib/gs-app.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/lib/gs-app.c b/lib/gs-app.c
index 3aaa97612..baa0e0f95 100644
--- a/lib/gs-app.c
+++ b/lib/gs-app.c
@@ -5510,7 +5510,8 @@ gs_app_get_origin_ui (GsApp *app)
        g_return_val_if_fail (GS_IS_APP (app), NULL);
 
        /* use the distro name for official packages */
-       if (gs_app_has_quirk (app, GS_APP_QUIRK_PROVENANCE)) {
+       if (gs_app_has_quirk (app, GS_APP_QUIRK_PROVENANCE) &&
+           gs_app_get_kind (app) != AS_COMPONENT_KIND_REPOSITORY) {
                os_release = gs_os_release_new (NULL);
                if (os_release != NULL)
                        origin_str = gs_os_release_get_name (os_release);


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