[gnome-maps] Make Maps DBus activatable
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] Make Maps DBus activatable
- Date: Mon, 5 May 2014 19:22:00 +0000 (UTC)
commit acfe464724ccf39b278dc3b4b5da0b6dbc5375c4
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Thu May 1 22:36:14 2014 +0200
Make Maps DBus activatable
https://bugzilla.gnome.org/show_bug.cgi?id=729361
src/Makefile.am | 12 +++++++++++-
src/application.js | 9 +++++++++
2 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 0ebf9a5..3d2f61d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,6 +24,15 @@ data_files = $(shell $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(srcdir) \
--generate-dependencies $(srcdir)/gnome-maps.data.gresource.xml)
+dbusservicedir = $(datadir)/dbus-1/services
+dbusservice_DATA = org.gnome.Maps.service
+
+org.gnome.Maps.service: Makefile
+ $(AM_V_GEN) (echo '[D-BUS Service]'; \
+ echo 'Name=org.gnome.Maps'; \
+ echo 'Exec=${bindir}/gnome-maps --gapplication-service') > $ tmp && \
+ mv $ tmp $@
+
gnome-maps-data.h: gnome-maps.data.gresource.xml $(data_files)
$(AM_V_GEN) \
$(GLIB_COMPILE_RESOURCES) \
@@ -50,7 +59,8 @@ BUILT_SOURCES += $(data_built_sources)
bin_PROGRAMS = gnome-maps
CLEANFILES += \
- gnome-maps \
+ gnome-maps \
+ $(dbusservice_DATA) \
$(data_built_sources)
gnome_maps_SOURCES = main.c \
diff --git a/src/application.js b/src/application.js
index 7c9682e..fabd7d5 100644
--- a/src/application.js
+++ b/src/application.js
@@ -114,6 +114,15 @@ const Application = new Lang.Class({
this._mainWindow.window.connect('destroy', this._onWindowDestroy.bind(this));
},
+ vfunc_dbus_register: function(connection, path) {
+ this.parent(connection, path);
+ return true;
+ },
+
+ vfunc_dbus_unregister: function(connection, path) {
+ this.parent(connection, path);
+ },
+
vfunc_activate: function() {
this._createWindow();
this._mainWindow.window.present();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]