]> git.lyx.org Git - lyx.git/blobdiff - src/Server.cpp
* src/LaTeXFeatures.cpp: simplify greektext definition. Patch by G. Milde (bug #6458)
[lyx.git] / src / Server.cpp
index 4efa37948b3aecfc26db90a70ece75348a2f4555..9b9f6e0a75a76009cdc569df7a3e2f26a54a188a 100644 (file)
@@ -34,7 +34,7 @@
           received LyX will inform the client that it's listening its
           messages, and 'bye' will inform that lyx is closing.
 
-          See development/server_monitor.c for an example client.
+          See development/lyxserver/server_monitor.cpp for an example client.
   Purpose: implement a client/server lib for LyX
 */
 
@@ -44,8 +44,8 @@
 
 #include "DispatchResult.h"
 #include "FuncRequest.h"
+#include "LyX.h"
 #include "LyXAction.h"
-#include "LyXFunc.h"
 
 #include "frontends/Application.h"
 
@@ -988,8 +988,8 @@ void ServerCallback(Server * server, string const & msg)
        server->callback(msg);
 }
 
-Server::Server(LyXFunc * f, string const & pipes)
-       : numclients_(0), func_(f), pipes_(pipes, this, &ServerCallback)
+Server::Server(string const & pipes)
+       : numclients_(0), pipes_(pipes, this, &ServerCallback)
 {}
 
 
@@ -1110,12 +1110,12 @@ void Server::callback(string const & msg)
                        // The correct solution would be to have a
                        // specialized (non-gui) BufferView. But how do
                        // we do it now? Probably we should just let it
-                       // connect to the lyxfunc in the single LyXView we
+                       // connect to the lyxfunc in the single GuiView we
                        // support currently. (Lgb)
 
                        FuncRequest const fr(lyxaction.lookupFunc(cmd), arg);
                        DispatchResult dr;
-                       func_->dispatch(fr, dr);
+                       theApp()->dispatch(fr, dr);
                        string const rval = to_utf8(dr.message());
 
                        // all commands produce an INFO or ERROR message