[gnome-software/1917-software-source-for-web-apps-is-generally-broken] webapps: Change origin and packaging information




commit 0870c3ce9d21207baa38dbf4aa1c25acb8008481
Author: Milan Crha <mcrha redhat com>
Date:   Fri Oct 7 10:41:15 2022 +0200

    webapps: Change origin and packaging information
    
    ...to better show where the web app originates from.
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1917

 plugins/epiphany/gs-plugin-epiphany.c | 8 +++++++-
 plugins/epiphany/gs-self-test.c       | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/plugins/epiphany/gs-plugin-epiphany.c b/plugins/epiphany/gs-plugin-epiphany.c
index f0ebec804..e64547c71 100644
--- a/plugins/epiphany/gs-plugin-epiphany.c
+++ b/plugins/epiphany/gs-plugin-epiphany.c
@@ -495,7 +495,13 @@ refine_app (GsPluginEpiphany    *self,
        g_return_if_fail (url != NULL);
 
        gs_app_set_origin (app, "gnome-web");
-       gs_app_set_origin_ui (app, _("GNOME Web"));
+       if (gs_app_get_name (app) == NULL)
+               gs_app_set_origin_ui (app, _("Web App"));
+       else
+               gs_app_set_origin_ui (app, gs_app_get_name (app));
+       gs_app_set_origin_hostname (app, g_uri_get_host (uri));
+       gs_app_set_metadata (app, "GnomeSoftware::PackagingFormat", _("Web App"));
+       gs_app_set_metadata (app, "GnomeSoftware::PackagingIcon", "web-browser-symbolic");
 
        gs_app_set_scope (app, AS_COMPONENT_SCOPE_USER);
        gs_app_set_launchable (app, AS_LAUNCHABLE_KIND_URL, url);
diff --git a/plugins/epiphany/gs-self-test.c b/plugins/epiphany/gs-self-test.c
index 1b910217e..4dda07a1d 100644
--- a/plugins/epiphany/gs-self-test.c
+++ b/plugins/epiphany/gs-self-test.c
@@ -182,7 +182,7 @@ gs_plugins_epiphany_installed_func (GsPluginLoader *plugin_loader)
        g_assert_cmpstr (gs_app_get_summary (app), ==, "pinafore.social");
        g_assert_cmpstr (gs_app_get_origin (app), ==, "gnome-web");
        origin_ui = gs_app_dup_origin_ui (app, TRUE);
-       g_assert_cmpstr (origin_ui, ==, "GNOME Web");
+       g_assert_cmpstr (origin_ui, ==, "Pinafore (Web App)");
        icon = gs_app_get_icon_for_size (app, 4096, 1, NULL);
        g_assert_nonnull (icon);
        g_clear_object (&icon);


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