[gnome-code-assistance] [backends/jscommon] Properly finalize application



commit 5eda81d4def6e2b5e288f24e9973835009c60afa
Author: Jesse van den Kieboom <jessevdk gmail com>
Date:   Sat Nov 16 12:20:09 2013 +0100

    [backends/jscommon] Properly finalize application

 .../gnome/codeassistance/transport_dbus.js         |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/backends/jscommon/gnome/codeassistance/transport_dbus.js 
b/backends/jscommon/gnome/codeassistance/transport_dbus.js
index fed4c97..86805e4 100644
--- a/backends/jscommon/gnome/codeassistance/transport_dbus.js
+++ b/backends/jscommon/gnome/codeassistance/transport_dbus.js
@@ -1,6 +1,5 @@
 const GLib = imports.gi.GLib;
 const Gio = imports.gi.Gio;
-const System = imports.system;
 const Lang = imports.lang;
 const Types = imports.gnome.codeassistance.types;
 
@@ -204,12 +203,13 @@ var DocumentServices = {
 
 const FreedesktopDBusProxy = Gio.DBusProxy.makeProxyWrapper(FreedesktopDBusIface);
 
-function Server(conn, service, document) {
-    this._init(conn, service, document);
+function Server(main, conn, service, document) {
+    this._init(main, conn, service, document);
 }
 
 Server.prototype = {
-    _init: function(conn, service, document) {
+    _init: function(main, conn, service, document) {
+        this.main = main;
         this.conn = conn;
         this.service = service;
         this.document = document;
@@ -358,7 +358,7 @@ Server.prototype = {
         delete this.apps[app.name];
 
         if (Object.keys(this.apps).length == 0) {
-            System.exit(0);
+            this.main.quit();
         }
     },
 
@@ -444,7 +444,7 @@ Transport.prototype = {
     },
 
     onBusAcquired: function(conn, name) {
-        this.server = new Server(conn, this.service, this.document);
+        this.server = new Server(this.main, conn, this.service, this.document);
     },
 
     onNameAcquired: function(conn, name) {


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