#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"
namespace fs = boost::filesystem;
namespace os = lyx::support::os;
-extern LyXServerSocket * lyxsocket;
-
namespace {
string const token_from("$$i");
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));
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));
\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
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
#include "LyXAction.h"
#include "lyxfunc.h"
#include "lyxrc.h"
-#include "lyxserver.h"
-#include "lyxsocket.h"
#include "support/lstrings.h"
#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"
#endif
-extern LyXServer * lyxserver;
-
// This is the global bufferlist object
BufferList bufferlist;
// a crash
bufferlist.emergencyWriteAll();
- if (lyxserver)
- lyxserver->emergencyCleanup();
+ theApp->server().emergencyCleanup();
}
#include "lyxlex.h"
#include "lyxrc.h"
#include "lyxrow.h"
-#include "lyxserver.h"
#include "lyxtextclasslist.h"
#include "lyxvc.h"
#include "paragraph.h"
#include "insets/insetvspace.h"
#include "insets/insetwrap.h"
+#include "frontends/Application.h"
#include "frontends/Alert.h"
#include "frontends/Dialogs.h"
#include "frontends/FileDialog.h"
extern BufferList bufferlist;
-extern LyXServer * lyxserver;
extern boost::scoped_ptr<kb_keymap> toplevel_keymap;
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: {