Skip to content

Commit

Permalink
Be DBus-Activatable
Browse files Browse the repository at this point in the history
This is useful if GTG exposes some DBus services, so that the user don't
need to keep the application open, but rather it can be started (and
exited) as needed, for example when the user is searching for some tasks
(not implemented here).
  • Loading branch information
Neui authored and diegogangl committed Oct 4, 2020
1 parent 3674bba commit b62b108
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,16 @@ i18n.merge_file(
type: 'desktop'
)

service_config = configuration_data()
service_config.set('APP_ID', application_id)
service_config.set('bindir', bindir)

configure_file(
input: rdnn_name + '.service.in',
output: application_id + '.service',
configuration: service_config,
install: true,
install_dir: dbusservicedir
)

subdir('icons')
1 change: 1 addition & 0 deletions data/org.gnome.GTG.desktop.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Categories=Office;ProjectManagement;
Keywords=Organizer;Task;Tasks;Projects;Activities;Productivity;Plan;Planning;Planner;Time;Management;Scheduling;GTD;gtg;Todo;
MimeType=x-scheme-handler/gtg;
StartupNotify=true
DBusActivatable=true
3 changes: 3 additions & 0 deletions data/org.gnome.GTG.service.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[D-BUS Service]
Name=@APP_ID@
Exec=@bindir@/gtg --gapplication-service
2 changes: 2 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ datadir = prefix / get_option('datadir')

appdatadir = datadir / 'metainfo'
desktopdir = datadir / 'applications'
dbusservicedir = datadir / 'dbus-1' / 'services'
icondir = datadir / 'icons'
pythondir = python3.get_path('purelib')
rdnn_name = 'org.gnome.GTG'
Expand All @@ -33,6 +34,7 @@ bin_config.set('local_build', 'False')
bin_config.set('pythondir', pythondir)
bin_config.set('localedir', datadir / 'locale')
bin_config.set('APP_ID', application_id)
bin_config.set('bindir', bindir)

local_config = configuration_data()
local_config.set('local_build', 'True')
Expand Down

0 comments on commit b62b108

Please sign in to comment.