[gnome-documents] Use a single-binary setup for DBus activation



commit 7b5f605d39b903cc7515fcaec73b325d5e89b5c2
Author: Álvaro Peña <alvaropg gmail com>
Date:   Thu Mar 20 23:58:02 2014 +0100

    Use a single-binary setup for DBus activation
    
    Bump minimum GLib version to 2.39.3.
    
    Fixes: https://bugzilla.gnome.org/726794

 configure.ac                                       |    2 +-
 src/Makefile.am                                    |   17 ++++++-----------
 src/application.js                                 |    1 -
 src/gnome-documents                                |    3 ---
 ...ome-documents-service.in => gnome-documents.in} |    0
 src/main.js                                        |    3 ++-
 src/org.gnome.Documents.service.in                 |    2 +-
 7 files changed, 10 insertions(+), 18 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 47636de..3220a74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,7 @@ AC_SUBST(LIBM)
 
 EVINCE_MIN_VERSION=3.7.4
 WEBKITGTK_MIN_VERSION=1.10.0
-GLIB_MIN_VERSION=2.37.0
+GLIB_MIN_VERSION=2.39.3
 GTK_MIN_VERSION=3.11.5
 GOBJECT_INTROSPECTION_MIN_VERSION=1.31.6
 GDATA_MIN_VERSION=0.13.3
diff --git a/src/Makefile.am b/src/Makefile.am
index caa17ea..d87cd37 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -56,16 +56,6 @@ typelib_DATA += $(gir_DATA:.gir=.typelib)
 
 CLEANFILES += $(gir_DATA) $(typelib_DATA)
 
-libexec_SCRIPTS += gnome-documents-service
-gnome-documents-service: gnome-documents-service.in
-       $(AM_V_GEN) $(do_subst) $< > $@
-       chmod +x $@
-
-CLEANFILES += \
-    gnome-documents-service
-EXTRA_DIST += \
-    gnome-documents-service.in
-
 service_in_files = org.gnome.Documents.service.in
 servicedir = $(datadir)/dbus-1/services
 service_DATA = org.gnome.Documents.service
@@ -76,4 +66,9 @@ CLEANFILES += $(service_DATA)
 EXTRA_DIST += $(service_in_files)
 
 bin_SCRIPTS += gnome-documents
-EXTRA_DIST += gnome-documents
+gnome-documents: gnome-documents.in
+       $(AM_V_GEN) $(do_subst) $< > $@
+       chmod +x $@
+
+CLEANFILES += gnome-documents
+EXTRA_DIST += gnome-documents.in
diff --git a/src/application.js b/src/application.js
index 43c6ebb..f4ddaeb 100644
--- a/src/application.js
+++ b/src/application.js
@@ -120,7 +120,6 @@ const Application = new Lang.Class({
         GLib.set_application_name(_("Documents"));
 
         this.parent({ application_id: 'org.gnome.Documents',
-                      flags: Gio.ApplicationFlags.IS_SERVICE,
                       inactivity_timeout: 12000 });
 
         this._searchProvider = new ShellSearchProvider.ShellSearchProvider();
diff --git a/src/gnome-documents-service.in b/src/gnome-documents.in
similarity index 100%
rename from src/gnome-documents-service.in
rename to src/gnome-documents.in
diff --git a/src/main.js b/src/main.js
index 9a3adb3..40af051 100644
--- a/src/main.js
+++ b/src/main.js
@@ -21,10 +21,11 @@
 
 const Application = imports.application;
 const GLib = imports.gi.GLib;
+const System = imports.system;
 
 function start() {
     let application = new Application.Application();
     if (GLib.getenv('DOCUMENTS_PERSIST'))
         application.hold();
-    return application.run(ARGV);
+    return application.run([System.programInvocationName].concat(ARGV));
 }
diff --git a/src/org.gnome.Documents.service.in b/src/org.gnome.Documents.service.in
index cb32a6e..ce2c4ad 100644
--- a/src/org.gnome.Documents.service.in
+++ b/src/org.gnome.Documents.service.in
@@ -1,3 +1,3 @@
 [D-BUS Service]
 Name=org.gnome.Documents
-Exec= libexecdir@/gnome-documents-service
+Exec= bindir@/gnome-documents --gapplication-service


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