Index: src/lyxserver.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxserver.C,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -p -r1.36 -r1.37
--- src/lyxserver.C	21 Mar 2002 17:25:15 -0000	1.36
+++ src/lyxserver.C	28 May 2002 23:04:56 -0000	1.37
@@ -50,7 +50,6 @@
 #include "lyxserver.h"
 #include "lyx_main.h"
 #include "debug.h"
-#include "LyXAction.h"
 #include "lyxfunc.h"
 #include "support/lstrings.h"
 #include "support/lyxlib.h"
@@ -78,9 +77,6 @@ int mkfifo(char const * __path, mode_t _
 
 /* === variables ========================================================= */
 
-extern LyXAction lyxaction;
-
-
 extern "C" {
 
 	// C wrapper
@@ -501,25 +497,20 @@ void LyXServer::callback(LyXServer * ser
 			// connect to the lyxfunc in the single LyXView we
 			// support currently. (Lgb)
 
-			kb_action action = static_cast<kb_action>(lyxaction.LookupFunc(cmd));
-			//int action = -1;
-			string rval, buf;
-
-			if (action>= 0) {
-				rval = serv->func->dispatch(action, arg);
-			} else {
-				rval = "Unknown command";
-			}
 
-      //modified june 1999 [EMAIL PROTECTED]:
+			serv->func->verboseDispatch(cmd + ' ' + arg, false);
+			string const rval = serv->func->getMessage();
+			
+			//modified june 1999 [EMAIL PROTECTED]:
 			//all commands produce an INFO or ERROR message
 			//in the output pipe, even if they do not return
 			//anything. See chapter 4 of Customization doc.
-			if (action<0 || serv->func->errorStat())
+			string buf;
+			if (serv->func->errorStat())
 				buf = "ERROR:";
 			else
 				buf = "INFO:";
-			buf += string(client) + ":" + cmd	+ ":" + rval + "\n";
+			buf += client + ":" + cmd + ":" +  rval + "\n";
 			serv->pipes.send(buf);
 
 			// !!! we don't do any error checking -


Reply via email to