From 47b05723cb2b5a27411e421162f86a74370aa7f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Vera?= Date: Wed, 18 Feb 2026 20:31:55 +0000 Subject: [PATCH 1/3] Enable DBus Activation (#1610) --- data/code.service.in | 3 +++ data/io.elementary.code.desktop.in.in | 12 ++++++++---- data/meson.build | 9 +++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 data/code.service.in diff --git a/data/code.service.in b/data/code.service.in new file mode 100644 index 000000000..b850f9ee7 --- /dev/null +++ b/data/code.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=io.elementary.code +Exec=@BINDIR@/io.elementary.code --gapplication-service diff --git a/data/io.elementary.code.desktop.in.in b/data/io.elementary.code.desktop.in.in index 9b0d98861..08a03180a 100644 --- a/data/io.elementary.code.desktop.in.in +++ b/data/io.elementary.code.desktop.in.in @@ -1,17 +1,21 @@ [Desktop Entry] Type=Application + Name=@NAME@ Comment=Edit code files GenericName=Code Editor -Exec=@EXEC_NAME@ %U -Icon=io.elementary.code -Terminal=false Categories=Development;GTK;IDE;WebDevelopment; Keywords=text;IDE;scratch;code; MimeType=text/plain;inode/directory; -StartupNotify=true Actions=NewWindow;NewFile; +Icon=io.elementary.code +Exec=@EXEC_NAME@ %U +DBusActivatable=true +SingleMainWindow=true +StartupNotify=true +Terminal=false + [Desktop Action NewFile] Name=New File Exec=@EXEC_NAME@ --new-tab diff --git a/data/meson.build b/data/meson.build index 0520e340b..f838c0e1d 100644 --- a/data/meson.build +++ b/data/meson.build @@ -30,6 +30,7 @@ install_data( ) config_data = configuration_data() +config_data.set('BINDIR', get_option('bindir')) config_data.set('EXEC_NAME', meson.project_name()) if (branch != '') @@ -38,6 +39,14 @@ else config_data.set('NAME', 'Code') endif +configure_file( + input: 'code.service.in', + output: meson.project_name() + '.service', + configuration: conf_data, + install_dir: get_option('datadir') / 'dbus-1' / 'services', + install: true +) + # Set the executable name and translate the desktop files desktop_in_file = configure_file( input: 'io.elementary.code.desktop.in.in', From 5258178c591377c5f881a532e5ac76f2770a0cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Vera?= Date: Wed, 18 Feb 2026 21:03:58 +0000 Subject: [PATCH 2/3] Fixed configuration attribute over configure_file for DBus service (#1610) --- data/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/meson.build b/data/meson.build index f838c0e1d..9e9201f2f 100644 --- a/data/meson.build +++ b/data/meson.build @@ -42,7 +42,7 @@ endif configure_file( input: 'code.service.in', output: meson.project_name() + '.service', - configuration: conf_data, + configuration: config_data, install_dir: get_option('datadir') / 'dbus-1' / 'services', install: true ) From fe9945c7d75fccb89ded688023a16c3cf69e3e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Vera?= Date: Thu, 19 Feb 2026 18:39:31 +0000 Subject: [PATCH 3/3] Fixed SingleMainWindow attribute (#1610) --- data/io.elementary.code.desktop.in.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/io.elementary.code.desktop.in.in b/data/io.elementary.code.desktop.in.in index 08a03180a..3ef75749c 100644 --- a/data/io.elementary.code.desktop.in.in +++ b/data/io.elementary.code.desktop.in.in @@ -12,7 +12,7 @@ Actions=NewWindow;NewFile; Icon=io.elementary.code Exec=@EXEC_NAME@ %U DBusActivatable=true -SingleMainWindow=true +SingleMainWindow=false StartupNotify=true Terminal=false