]> git.lyx.org Git - features.git/commitdiff
replace lyxserver and lyxsocket with theApp->server() and theApp->socket() equivalent...
authorAbdelrazak Younes <younes@lyx.org>
Fri, 22 Sep 2006 12:34:13 +0000 (12:34 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 22 Sep 2006 12:34:13 +0000 (12:34 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15119 a592a061-630c-0410-9148-cb99ea01b6c8

src/format.C
src/frontends/Application.C
src/frontends/qt4/lyx_gui.C
src/lyx_main.C
src/lyxfunc.C

index 2ce250db95d00373e27e8c2d35755cb942f5ddf0..7de79556ff9eb90400e0f5273ebd1a203480f712 100644 (file)
@@ -16,8 +16,8 @@
 #include "lyxrc.h"
 #include "debug.h"
 #include "gettext.h"
-#include "lyxsocket.h"
 
+#include "frontends/Application.h"
 #include "frontends/Alert.h" //to be removed?
 
 #include "support/filetools.h"
@@ -46,8 +46,6 @@ using std::distance;
 namespace fs = boost::filesystem;
 namespace os = lyx::support::os;
 
-extern LyXServerSocket * lyxsocket;
-
 namespace {
 
 string const token_from("$$i");
@@ -311,7 +309,7 @@ bool Formats::view(Buffer const & buffer, string const & filename,
 
        command = subst(command, token_from, quoteName(filename));
        command = subst(command, token_path, quoteName(onlyPath(filename)));
-       command = subst(command, token_socket, quoteName(lyxsocket->address()));
+       command = subst(command, token_socket, quoteName(theApp->socket().address()));
        lyxerr[Debug::FILES] << "Executing command: " << command << std::endl;
        buffer.message(_("Executing command: ") + lyx::from_utf8(command));
 
@@ -370,7 +368,7 @@ bool Formats::edit(Buffer const & buffer, string const & filename,
 
        command = subst(command, token_from, quoteName(filename));
        command = subst(command, token_path, quoteName(onlyPath(filename)));
-       command = subst(command, token_socket, quoteName(lyxsocket->address()));
+       command = subst(command, token_socket, quoteName(theApp->socket().address()));
        lyxerr[Debug::FILES] << "Executing command: " << command << std::endl;
        buffer.message(_("Executing command: ") + lyx::from_utf8(command));
 
index d590e9d67883e33e1cb2d921511559813f228dd7..fadd7d956cfa5f67f29a65637f48c25c75420e8c 100644 (file)
 \r
 using lyx::support::package;\r
 \r
-// FIXME: replace all occurence of lyxserver with theApp->server().\r
-LyXServer * lyxserver;\r
-// FIXME: replace all occurence of lyxsocket with theApp->socket().\r
-LyXServerSocket * lyxsocket;\r
-\r
 namespace lyx {\r
 namespace frontend {\r
 \r
@@ -87,10 +82,6 @@ int Application::start(std::string const & batch)
        lyx_socket_.reset(new LyXServerSocket(lyxfunc_.get(), \r
                lyx::support::os::internal_path(package().temp_dir() + "/lyxsocket")));\r
 \r
-       // FIXME: these two lines should disappear soon (Abdel 20/09/71)\r
-       lyxserver = lyx_server_.get();\r
-       lyxsocket = lyx_socket_.get();\r
-\r
        // handle the batch commands the user asked for\r
        if (!batch.empty()) {\r
                lyxfunc_->dispatch(lyxaction.lookupFunc(batch));\r
index 8cf90e00019e3789901f0817e9f961e580654756..7f3d51d526fc49960f20ce752e3638f3db1c55fc 100644 (file)
@@ -24,8 +24,6 @@
 #include "LyXAction.h"
 #include "lyxfunc.h"
 #include "lyxrc.h"
-#include "lyxserver.h"
-#include "lyxsocket.h"
 
 
 #include "support/lstrings.h"
index 1627140e71ebdfbb4462f02ebb3530466f469939..9f2cf24573d120e53a4f811dab92147e0f865935 100644 (file)
 #include "lyxlex.h"
 #include "lyxrc.h"
 #include "lyxtextclasslist.h"
-#include "lyxserver.h"
 #include "MenuBackend.h"
 #include "mover.h"
 #include "ToolbarBackend.h"
 
 #include "frontends/Alert.h"
+#include "frontends/Application.h"
 #include "frontends/lyx_gui.h"
 #include "frontends/LyXView.h"
 
@@ -89,8 +89,6 @@ using std::system;
 #endif
 
 
-extern LyXServer * lyxserver;
-
 // This is the global bufferlist object
 BufferList bufferlist;
 
@@ -661,8 +659,7 @@ void LyX::emergencyCleanup() const
        // a crash
 
        bufferlist.emergencyWriteAll();
-       if (lyxserver)
-               lyxserver->emergencyCleanup();
+       theApp->server().emergencyCleanup();
 }
 
 
index 9cc21249d4c9c4c6cbecb8457c801e4b0e1d9881..6eb2b59217967004e9b76e8a74d914954cf87095 100644 (file)
@@ -51,7 +51,6 @@
 #include "lyxlex.h"
 #include "lyxrc.h"
 #include "lyxrow.h"
-#include "lyxserver.h"
 #include "lyxtextclasslist.h"
 #include "lyxvc.h"
 #include "paragraph.h"
@@ -72,6 +71,7 @@
 #include "insets/insetvspace.h"
 #include "insets/insetwrap.h"
 
+#include "frontends/Application.h"
 #include "frontends/Alert.h"
 #include "frontends/Dialogs.h"
 #include "frontends/FileDialog.h"
@@ -139,7 +139,6 @@ namespace fs = boost::filesystem;
 
 
 extern BufferList bufferlist;
-extern LyXServer * lyxserver;
 
 extern boost::scoped_ptr<kb_keymap> toplevel_keymap;
 
@@ -1120,7 +1119,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
 
                case LFUN_SERVER_NOTIFY:
                        dispatch_buffer = lyx::from_utf8(keyseq.print());
-                       lyxserver->notifyClient(lyx::to_utf8(dispatch_buffer));
+                       theApp->server().notifyClient(lyx::to_utf8(dispatch_buffer));
                        break;
 
                case LFUN_SERVER_GOTO_FILE_ROW: {