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




commit cd0f599e181d5bacd1dbb01a497382133bcfc09a
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 9e58b1c4d..634ba2dc7 100644
--- a/lib/gs-app.c
+++ b/lib/gs-app.c
@@ -5290,7 +5290,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]