From 9f0ae638267de24fad0d7d9202a5948d821137b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= Date: Sun, 27 Jul 2025 12:18:47 +0200 Subject: [PATCH] Add D-Bus service file And mark the application as D-Bus activatable. This allows application launchers to activate it via D-Bus. --- data/com.github.finefindus.eyedropper.desktop.in.in | 1 + data/com.github.finefindus.eyedropper.service.in | 3 +++ data/meson.build | 8 +++++++- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 data/com.github.finefindus.eyedropper.service.in diff --git a/data/com.github.finefindus.eyedropper.desktop.in.in b/data/com.github.finefindus.eyedropper.desktop.in.in index 7026a9c4..63ab9f2d 100644 --- a/data/com.github.finefindus.eyedropper.desktop.in.in +++ b/data/com.github.finefindus.eyedropper.desktop.in.in @@ -11,3 +11,4 @@ Keywords=Gnome;GTK;Color;Colorpicker;Picker;Palette; # Translators: Do NOT translate or transliterate this text (this is an icon file name)! Icon=@icon@ StartupNotify=true +DBusActivatable=true diff --git a/data/com.github.finefindus.eyedropper.service.in b/data/com.github.finefindus.eyedropper.service.in new file mode 100644 index 00000000..940bca86 --- /dev/null +++ b/data/com.github.finefindus.eyedropper.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=@appid@ +Exec=@bindir@/@name@ --gapplication-service diff --git a/data/meson.build b/data/meson.build index 94e319d2..a9ff5138 100644 --- a/data/meson.build +++ b/data/meson.build @@ -75,11 +75,17 @@ if glib_compile_schemas.found() ) endif -# Search Provider +# D-Bus service file and Search Provider service_conf = configuration_data() service_conf.set('appid', application_id) service_conf.set('name', meson.project_name()) service_conf.set('bindir', bindir) +configure_file( + input: '@0@.service.in'.format(base_id), + output: '@0@.service'.format(application_id), + configuration: service_conf, + install_dir: datadir / 'dbus-1' / 'services' +) configure_file( input: '@0@.SearchProvider.service.in'.format(base_id), output: '@0@.SearchProvider.service'.format(application_id),