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




commit 773b3473da1afdbd90589ae15702a7c8ae71fbb0
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 d493e0050..0e6e65b95 100644
--- a/lib/gs-app.c
+++ b/lib/gs-app.c
@@ -5330,7 +5330,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]