[gnome-clocks/wip/gnotification: 1/3] data: Support launching via DBus activation



commit 8d60242ba7323fda7fea88cb773ca0afd85c5ca4
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Oct 26 02:09:58 2013 +0200

    data: Support launching via DBus activation
    
    This will be the preferred way of launching applications, so install a
    DBus .service file, rename the .desktop file to use reverse DNS notation
    and mark it as DBus activatable.
    Using reverse DNS notation for the .desktop file is also a prerequisite
    for using GLib's new notification API.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710913

 Makefile.am                                        |   12 ++++++++++--
 ...ocks.desktop.in => org.gnome.clocks.desktop.in} |    1 +
 data/org.gnome.clocks.service.in                   |    3 +++
 3 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index eb12cc4..d9dde0d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,8 +7,16 @@ SUBDIRS = help po
 %.desktop: %.desktop.in
        $(MKDIR_P) $(dir $@); LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache 
$(top_srcdir)/po $< $@
 applicationsdir = $(datadir)/applications
-applications_DATA = data/gnome-clocks.desktop
-dist_noinst_DATA = data/gnome-clocks.desktop.in
+applications_DATA = data/org.gnome.clocks.desktop
+dist_noinst_DATA = data/org.gnome.clocks.desktop.in
+
+# DBus service file
+servicedir = $(datadir)/dbus-1/services
+service_DATA = data/org.gnome.clocks.service
+dist_noinst_DATA = data/org.gnome.clocks.service.in
+
+data/org.gnome.clocks.service: data/org.gnome.clocks.service.in Makefile
+       $(AM_V_GEN) sed -e "s|\ bindir\@|$(bindir)|" $< > $@
 
 # appdata file
 appdatadir = $(datadir)/appdata
diff --git a/data/gnome-clocks.desktop.in b/data/org.gnome.clocks.desktop.in
similarity index 94%
rename from data/gnome-clocks.desktop.in
rename to data/org.gnome.clocks.desktop.in
index 66eb7b6..c251a01 100644
--- a/data/gnome-clocks.desktop.in
+++ b/data/org.gnome.clocks.desktop.in
@@ -10,4 +10,5 @@ Terminal=false
 Type=Application
 Categories=GNOME;GTK;Utility;Clock;
 StartupNotify=true
+DBusActivatable=true
 X-GNOME-UsesNotifications=true
diff --git a/data/org.gnome.clocks.service.in b/data/org.gnome.clocks.service.in
new file mode 100644
index 0000000..8958e76
--- /dev/null
+++ b/data/org.gnome.clocks.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.clocks
+Exec= bindir@/gnome-clocks


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]