[gnome-code-assistance] [backends/jscommon] Own name from main loop



commit 0c537a1672a63758ba891ce5df82ddf8f404c649
Author: Jesse van den Kieboom <jessevdk gmail com>
Date:   Sat Nov 16 15:00:05 2013 +0100

    [backends/jscommon] Own name from main loop

 .../gnome/codeassistance/transport_dbus.js         |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/backends/jscommon/gnome/codeassistance/transport_dbus.js 
b/backends/jscommon/gnome/codeassistance/transport_dbus.js
index 870f045..83c6287 100644
--- a/backends/jscommon/gnome/codeassistance/transport_dbus.js
+++ b/backends/jscommon/gnome/codeassistance/transport_dbus.js
@@ -471,11 +471,13 @@ Transport.prototype = {
     },
 
     run: function() {
-        Gio.DBus.session.own_name('org.gnome.CodeAssist.v1.' + this.service.language,
-                                  Gio.BusNameOwnerFlags.NONE,
-                                  Lang.bind(this, this.onBusAcquired),
-                                  Lang.bind(this, this.onNameAcquired),
-                                  Lang.bind(this, this.onNameLost));
+        GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, function() {
+            Gio.DBus.session.own_name('org.gnome.CodeAssist.v1.' + this.service.language,
+                                      Gio.BusNameOwnerFlags.NONE,
+                                      Lang.bind(this, this.onBusAcquired),
+                                      Lang.bind(this, this.onNameAcquired),
+                                      Lang.bind(this, this.onNameLost));
+        }));
 
         this.main.run();
     }


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