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




commit 0eaeeaf06b7ad1e37c36aec35a3ebe5d6ac15e01
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 8ccdcf0f3..0469dcdcd 100644
--- a/lib/gs-app.c
+++ b/lib/gs-app.c
@@ -5562,7 +5562,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]