[gnome-software/mwleeds/pwa-plugin] WIP
- From: Phaedrus Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/mwleeds/pwa-plugin] WIP
- Date: Tue, 14 Dec 2021 00:00:19 +0000 (UTC)
commit 21102a7ce8013ad85ed87a04c5ac84f3da687a9d
Author: Phaedrus Leeds <mwleeds protonmail com>
Date: Mon Dec 13 16:00:08 2021 -0800
WIP
plugins/epiphany/gs-plugin-epiphany.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/plugins/epiphany/gs-plugin-epiphany.c b/plugins/epiphany/gs-plugin-epiphany.c
index 6ae1d9273..32eabf257 100644
--- a/plugins/epiphany/gs-plugin-epiphany.c
+++ b/plugins/epiphany/gs-plugin-epiphany.c
@@ -7,6 +7,7 @@
*/
#include <config.h>
+#include <glib/gi18n.h>
#include <gnome-software.h>
#include "gs-epiphany-generated.h"
@@ -107,11 +108,13 @@ gs_plugin_epiphany_setup_async (GsPlugin *plugin,
/* Check that the proxy exists (and is owned; it should auto-start) so
* we can disable the plugin for systems which don’t have new enough
- * Epiphany.
+ * Epiphany. Note that this doesn't work with development or canary
+ * builds of Epiphany since those have different app IDs and
+ * correspondingly different interface names.
*/
gs_ephy_web_app_provider_proxy_new_for_bus (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE,
- "org.gnome.Epiphany.Devel.WebAppProvider",
+ "org.gnome.Epiphany.WebAppProvider",
"/org/gnome/Epiphany/WebAppProvider",
cancellable,
proxy_new_cb,
@@ -188,6 +191,7 @@ gs_plugin_add_installed (GsPlugin *plugin,
guint64 install_date = 0;
g_autofree char *app_id = NULL;
g_autoptr(GsApp) app = NULL;
+ g_autofree char *description = NULL;
g_variant_dict_init (&dict, webapp_v);
if (!g_variant_dict_lookup (&dict, "desktop-path", "&s", &desktop_path)) {
@@ -208,9 +212,16 @@ gs_plugin_add_installed (GsPlugin *plugin,
app_id = g_path_get_basename (desktop_path);
app = gs_app_new (app_id);
gs_app_set_management_plugin (app, plugin);
+ gs_app_set_state (app, GS_APP_STATE_INSTALLED);
gs_app_set_kind (app, AS_COMPONENT_KIND_WEB_APP);
gs_app_set_name (app, GS_APP_QUALITY_NORMAL, name);
gs_app_set_url (app, AS_URL_KIND_HOMEPAGE, url);
+
+ /* Summary and description must be present to show up in the UI */
+ gs_app_set_summary (app, GS_APP_QUALITY_LOWEST, url);
+ description = g_strdup_printf (_("Epiphany web application for %s"), url);
+ gs_app_set_description (app, GS_APP_QUALITY_LOWEST, description);
+
if (icon_path) {
g_autoptr(GFile) icon_file = g_file_new_for_path (icon_path);
g_autoptr(GIcon) icon = g_file_icon_new (icon_file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]