Windows fixes for headless operation
authorKevin Wasserman <krwasserman@hotmail.com>
Thu, 16 May 2013 19:13:24 +0000 (15:13 -0400)
committerKevin Wasserman <krwasserman@hotmail.com>
Thu, 16 May 2013 19:13:24 +0000 (15:13 -0400)
src/moonshot-identity-manager-app.vala
src/moonshot-server.vala

index 537ff47..a9642ea 100644 (file)
@@ -211,7 +211,7 @@ public class IdentityManagerApp {
         // obtrusive message box, on Windows
         //
         this.ipc_server = MoonshotServer.get_instance ();
-        MoonshotServer.start (this.view);
+        MoonshotServer.start (this);
     }
 #elif IPC_DBUS_GLIB
     private void init_ipc_server ()
index 2bff71d..c415086 100644 (file)
@@ -221,13 +221,13 @@ using MoonshotRpcInterface;
  * process ends
  */
 public class MoonshotServer : Object {
-    private static IdentityManagerView main_window;
+    private static IdentityManagerApp parent_app;
 
     private static MoonshotServer instance = null;
 
-    public static void start (Gtk.Window window)
+    public static void start (IdentityManagerApp app)
     {
-        main_window = (IdentityManagerView) window;
+        parent_app = app;
         Rpc.server_start (MoonshotRpcInterface.spec, "/org/janet/Moonshot", Rpc.Flags.PER_USER);
     }
 
@@ -252,7 +252,7 @@ public class MoonshotServer : Object {
     {
         bool result = false;
 
-        var request = new IdentityRequest (main_window,
+        var request = new IdentityRequest (parent_app,
                                            nai,
                                            password,
                                            service);
@@ -314,7 +314,7 @@ public class MoonshotServer : Object {
     {
         bool result;
 
-        var request = new IdentityRequest.default (main_window);
+        var request = new IdentityRequest.default (parent_app);
         request.mutex = new Mutex ();
         request.cond = new Cond ();
         request.set_callback (return_identity_cb);
@@ -415,7 +415,7 @@ public class MoonshotServer : Object {
         // Defer addition to the main loop thread.
         Idle.add (() => {
             mutex.lock ();
-            success = main_window.add_identity (idcard);
+            success = parent_app.add_identity (idcard);
             cond.signal ();
             mutex.unlock ();
             return false;