[epiphany/mwleeds/webapp-dbus-api: 3/5] Use consistent D-Bus name




commit 6524980fdb47bd9b018160817304b49dfe1681aa
Author: Phaedrus Leeds <mwleeds protonmail com>
Date:   Mon Dec 13 11:45:03 2021 -0800

    Use consistent D-Bus name

 data/meson.build                                  | 2 +-
 data/org.gnome.Epiphany.WebAppProvider.service.in | 2 +-
 org.gnome.Epiphany.json                           | 3 ++-
 src/webapp-provider/ephy-webapp-provider.c        | 4 +++-
 4 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 4d677fce7..3108a0060 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -98,7 +98,7 @@ configure_file(
 
 configure_file(
   input: 'org.gnome.Epiphany.WebAppProvider.service.in',
-  output: '@0@.WebAppProvider.service'.format(application_id),
+  output: 'org.gnome.Epiphany.WebAppProvider.service',
   configuration: service_conf,
   install_dir: servicedir
 )
diff --git a/data/org.gnome.Epiphany.WebAppProvider.service.in 
b/data/org.gnome.Epiphany.WebAppProvider.service.in
index de411d239..1ab1699a6 100644
--- a/data/org.gnome.Epiphany.WebAppProvider.service.in
+++ b/data/org.gnome.Epiphany.WebAppProvider.service.in
@@ -1,3 +1,3 @@
 [D-BUS Service]
-Name=@appid@.WebAppProvider
+Name=org.gnome.Epiphany.WebAppProvider
 Exec=@libexecdir@/epiphany-webapp-provider
diff --git a/org.gnome.Epiphany.json b/org.gnome.Epiphany.json
index 9f37ea823..d58f3bd86 100644
--- a/org.gnome.Epiphany.json
+++ b/org.gnome.Epiphany.json
@@ -17,7 +17,8 @@
         "--socket=fallback-x11",
         "--socket=pulseaudio",
         "--socket=wayland",
-        "--system-talk-name=org.freedesktop.GeoClue2"
+        "--system-talk-name=org.freedesktop.GeoClue2",
+        "--own-name=org.gnome.Epiphany.WebAppProvider"
     ],
     "modules" : [
          {
diff --git a/src/webapp-provider/ephy-webapp-provider.c b/src/webapp-provider/ephy-webapp-provider.c
index 3a73b1210..d8144f414 100644
--- a/src/webapp-provider/ephy-webapp-provider.c
+++ b/src/webapp-provider/ephy-webapp-provider.c
@@ -280,7 +280,9 @@ ephy_web_app_provider_service_class_init (EphyWebAppProviderServiceClass *klass)
 EphyWebAppProviderService *
 ephy_web_app_provider_service_new (void)
 {
-  g_autofree gchar *app_id = g_strconcat (APPLICATION_ID, ".WebAppProvider", NULL);
+  /* Note the application ID is constant for release/devel/canary builds
+   * because we want to always use the same well-known D-Bus name */
+  g_autofree gchar *app_id = g_strconcat ("org.gnome.Epiphany.WebAppProvider", NULL);
 
   return g_object_new (EPHY_TYPE_WEB_APP_PROVIDER_SERVICE,
                        "application-id", app_id,


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