[gnome-calendar] app: make DBus-activatable
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] app: make DBus-activatable
- Date: Tue, 23 Dec 2014 13:27:46 +0000 (UTC)
commit 1b31d419d49ccf860173be79c5599f5b8cd7330a
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Mon Dec 22 23:34:29 2014 -0500
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 +++++++++++++++--
...ktop.in.in => org.gnome.Calendar.desktop.in.in} | 1 +
po/POTFILES.in | 2 +-
po/POTFILES.skip | 2 +-
5 files changed, 19 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 16f7d3b..1728c65 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 84085d1..6e4adb8 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 c5ad654..a7bf7d2 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 4f355ac..f8098b9 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 87cde25..d880416 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]