[polari] data: Support launching via DBus activation
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] data: Support launching via DBus activation
- Date: Sat, 5 Oct 2013 20:39:31 +0000 (UTC)
commit 5d1e76e4231202e7bd47bd7da580a818bfdce504
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Oct 5 01:23:41 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.
.gitignore | 1 +
data/Makefile.am | 11 ++++++++++-
...lari.desktop.in => org.gnome.Polari.desktop.in} | 1 +
data/org.gnome.Polari.service.in | 3 +++
po/POTFILES.in | 2 +-
5 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b828709..70ac9a2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,6 +18,7 @@ data/*.desktop
data/*.gresource
data/*.gschema.valid
data/*.gschema.xml
+data/*.service
depcomp
install-sh
libtool
diff --git a/data/Makefile.am b/data/Makefile.am
index 567dfe7..505e9ec 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -2,10 +2,17 @@ SUBDIRS = icons
desktopdir = $(datadir)/applications
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-desktop_in_files = polari.desktop.in
+desktop_in_files = org.gnome.Polari.desktop.in
@INTLTOOL_DESKTOP_RULE@
+servicedir = $(datadir)/dbus-1/services
+service_DATA = $(service_in_files:.service.in=.service)
+service_in_files = org.gnome.Polari.service.in
+
+org.gnome.Polari.service: org.gnome.Polari.service.in Makefile
+ $(AM_V_GEN) sed -e "s|\ bindir\@|$(bindir)|" $< > $@
+
check-local:
$(DESKTOP_FILE_VALIDATE) $(desktop_DATA)
@@ -21,6 +28,7 @@ gsettings_SCHEMAS = org.gnome.polari.gschema.xml
EXTRA_DIST = \
$(desktop_in_files) \
+ $(service_in_files) \
polari.gresource.xml \
$(resource_files) \
$(gsettings_SCHEMAS) \
@@ -28,5 +36,6 @@ EXTRA_DIST = \
CLEANFILES = \
$(desktop_DATA) \
+ $(service_DATA) \
$(resource_DATA) \
$(NULL)
diff --git a/data/polari.desktop.in b/data/org.gnome.Polari.desktop.in
similarity index 91%
rename from data/polari.desktop.in
rename to data/org.gnome.Polari.desktop.in
index c259e31..62adeb4 100644
--- a/data/polari.desktop.in
+++ b/data/org.gnome.Polari.desktop.in
@@ -6,5 +6,6 @@ TryExec=polari
Icon=polari
Type=Application
StartupNotify=true
+DBusActivatable=true
Categories=GNOME;GTK;Network;IRCClient;
_Keywords=IRC;Internet;Relay;Chat;
diff --git a/data/org.gnome.Polari.service.in b/data/org.gnome.Polari.service.in
new file mode 100644
index 0000000..63dfaa4
--- /dev/null
+++ b/data/org.gnome.Polari.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.Polari
+Exec= bindir@/polari
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1b5fa4c..af32d25 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,5 +1,5 @@
data/org.gnome.polari.gschema.xml
-data/polari.desktop.in
+data/org.gnome.Polari.desktop.in
[type: gettext/glade]data/resources/app-menu.ui
[type: gettext/glade]data/resources/connection-details-dialog.ui
[type: gettext/glade]data/resources/connection-list-dialog.ui
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]