mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
replace lyxserver and lyxsocket with theApp->server() and theApp->socket() equivalent methods.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15119 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
83b18f414e
commit
6104eebe0d
@ -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));
|
||||
|
||||
|
@ -25,11 +25,6 @@
|
||||
|
||||
using lyx::support::package;
|
||||
|
||||
// FIXME: replace all occurence of lyxserver with theApp->server().
|
||||
LyXServer * lyxserver;
|
||||
// FIXME: replace all occurence of lyxsocket with theApp->socket().
|
||||
LyXServerSocket * lyxsocket;
|
||||
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
@ -87,10 +82,6 @@ int Application::start(std::string const & batch)
|
||||
lyx_socket_.reset(new LyXServerSocket(lyxfunc_.get(),
|
||||
lyx::support::os::internal_path(package().temp_dir() + "/lyxsocket")));
|
||||
|
||||
// FIXME: these two lines should disappear soon (Abdel 20/09/71)
|
||||
lyxserver = lyx_server_.get();
|
||||
lyxsocket = lyx_socket_.get();
|
||||
|
||||
// handle the batch commands the user asked for
|
||||
if (!batch.empty()) {
|
||||
lyxfunc_->dispatch(lyxaction.lookupFunc(batch));
|
||||
|
@ -24,8 +24,6 @@
|
||||
#include "LyXAction.h"
|
||||
#include "lyxfunc.h"
|
||||
#include "lyxrc.h"
|
||||
#include "lyxserver.h"
|
||||
#include "lyxsocket.h"
|
||||
|
||||
|
||||
#include "support/lstrings.h"
|
||||
|
@ -35,12 +35,12 @@
|
||||
#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();
|
||||
}
|
||||
|
||||
|
||||
|
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user