From 1b31d419d49ccf860173be79c5599f5b8cd7330a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erick=20P=C3=A9rez=20Castellanos?= Date: Mon, 22 Dec 2014 23:34:29 -0500 Subject: [PATCH] app: make DBus-activatable This commit installs a service file, renames the desktop file to follow the bus name, and adds the DBusActivatable key to the desktop file, following https://wiki.gnome.org/HowDoI/DBusApplicationLaunching Updates POTFILE files accordingly --- configure.ac | 2 +- data/Makefile.am | 17 +++++++++++++++-- ...p.in.in => org.gnome.Calendar.desktop.in.in} | 1 + po/POTFILES.in | 2 +- po/POTFILES.skip | 2 +- 5 files changed, 19 insertions(+), 5 deletions(-) rename data/{gnome-calendar.desktop.in.in => org.gnome.Calendar.desktop.in.in} (91%) diff --git a/configure.ac b/configure.ac index 16f7d3ba..1728c659 100644 --- a/configure.ac +++ b/configure.ac @@ -101,7 +101,7 @@ AC_CONFIG_FILES([ Makefile src/Makefile data/Makefile - data/gnome-calendar.desktop.in + data/org.gnome.Calendar.desktop.in data/icons/Makefile po/Makefile.in ]) diff --git a/data/Makefile.am b/data/Makefile.am index 84085d19..6e4adb8d 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,11 +1,24 @@ SUBDIRS = icons desktopdir = $(datadir)/applications +desktop_in_files = org.gnome.Calendar.desktop.in desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) - desktop_in_files = gnome-calendar.desktop.in @INTLTOOL_DESKTOP_RULE@ +servicedir = $(datadir)/dbus-1/services +service_DATA = org.gnome.Calendar.service + +%.service: %.service.in Makefile + $(AM_V_GEN) [ -d $(@D) ] || $(mkdir_p) $(@D) ; \ + sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@.tmp && mv $@.tmp $@ + +org.gnome.Calendar.service: + $(AM_V_GEN) (echo '[D-BUS Service]'; \ + echo 'Name=org.gnome.Calendar'; \ + echo 'Exec=${bindir}/gnome-calendar --gapplication-service') > $@.tmp && \ + mv $@.tmp $@ + gsettings_ENUM_NAMESPACE = org.gnome.calendar gsettings_ENUM_FILES = \ $(top_srcdir)/src/gcal-utils.h @@ -18,7 +31,7 @@ gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml) @GSETTINGS_RULES@ EXTRA_DIST= \ - gnome-calendar.desktop \ + org.gnome.Calendar.desktop \ calendar.gresource.xml \ ui/edit-dialog.ui \ ui/menus.ui \ diff --git a/data/gnome-calendar.desktop.in.in b/data/org.gnome.Calendar.desktop.in.in similarity index 91% rename from data/gnome-calendar.desktop.in.in rename to data/org.gnome.Calendar.desktop.in.in index c5ad6542..a7bf7d22 100644 --- a/data/gnome-calendar.desktop.in.in +++ b/data/org.gnome.Calendar.desktop.in.in @@ -9,3 +9,4 @@ StartupNotify=true OnlyShowIn=GNOME; Categories=GNOME;GTK;Utility;Core; MimeType=text/calendar; +DBusActivatable=true diff --git a/po/POTFILES.in b/po/POTFILES.in index 4f355acb..f8098b99 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,5 +1,5 @@ # List of source files containing translatable strings. -data/gnome-calendar.desktop.in.in +data/org.gnome.Calendar.desktop.in.in data/org.gnome.calendar.gschema.xml.in [type: gettext/glade]data/ui/edit-dialog.ui [type: gettext/glade]data/ui/menus.ui diff --git a/po/POTFILES.skip b/po/POTFILES.skip index 87cde25e..d8804165 100644 --- a/po/POTFILES.skip +++ b/po/POTFILES.skip @@ -1,2 +1,2 @@ # List of skipped of translation files -data/gnome-calendar.desktop.in +data/org.gnome.Calendar.desktop.in