[sushi] application: use dbus_register vfunc



commit 4df86c907648b08791b4572ad0ade25bc545f035
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Jun 26 15:41:26 2015 -0700

    application: use dbus_register vfunc

 src/js/ui/application.js |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/js/ui/application.js b/src/js/ui/application.js
index 0b424cc..6cfd6d7 100644
--- a/src/js/ui/application.js
+++ b/src/js/ui/application.js
@@ -57,9 +57,6 @@ const Application = new Lang.Class({
 
     _init : function(args) {
         this.parent({ application_id: SUSHI_DBUS_NAME });
-
-        this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(SushiIface, this);
-        this._dbusImpl.export(Gio.DBus.session, SUSHI_DBUS_PATH);
     },
 
     vfunc_startup : function() {
@@ -69,6 +66,13 @@ const Application = new Lang.Class({
         this._createMainWindow();
     },
 
+    vfunc_dbus_register : function(connection, path) {
+       this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(SushiIface, this);
+        this._dbusImpl.export(connection, SUSHI_DBUS_PATH);
+
+       return this.parent(connection, path);
+    },
+
     vfunc_activate : function() {
     },
 


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