X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FServerSocket.cpp;h=7940b7fc3886d2e3c5017c8c9894da437f237e32;hb=1db7ad00fe02ca4ebba56a5e02c2b9856dc538db;hp=6d3368a517b1c44a2811f94812fa81fb04d8a8b2;hpb=377cdd5f6cc2dd67fabd0b03703d20722a9ed0ea;p=lyx.git diff --git a/src/ServerSocket.cpp b/src/ServerSocket.cpp index 6d3368a517..7940b7fc38 100644 --- a/src/ServerSocket.cpp +++ b/src/ServerSocket.cpp @@ -28,7 +28,7 @@ #include "support/FileName.h" #include "support/socktools.h" -#include +#include "support/bind.h" #include #include @@ -40,7 +40,7 @@ using namespace std; using namespace lyx::support; -using boost::shared_ptr; + namespace lyx { @@ -60,15 +60,15 @@ ServerSocket::ServerSocket(FileName const & addr) // Needed by xdvi setEnv("XEDITOR", "lyxclient -g %f %l"); // Needed by lyxclient - setEnv("LYXSOCKET", address_.absFilename()); + setEnv("LYXSOCKET", address_.absFileName()); theApp()->registerSocketCallback( fd_, - boost::bind(&ServerSocket::serverCallback, this) + bind(&ServerSocket::serverCallback, this) ); LYXERR(Debug::LYXSERVER, "lyx: New server socket " - << fd_ << ' ' << address_.absFilename()); + << fd_ << ' ' << address_.absFileName()); } @@ -90,7 +90,7 @@ ServerSocket::~ServerSocket() string const ServerSocket::address() const { - return address_.absFilename(); + return address_.absFileName(); } @@ -115,7 +115,7 @@ void ServerSocket::serverCallback() shared_ptr(new LyXDataSocket(client_fd)); theApp()->registerSocketCallback( client_fd, - boost::bind(&ServerSocket::dataCallback, + bind(&ServerSocket::dataCallback, this, client_fd) ); } @@ -143,6 +143,7 @@ void ServerSocket::dataCallback(int fd) string const cmd = line.substr(pos + 1); DispatchResult dr; theApp()->dispatch(lyxaction.lookupFunc(cmd), dr); + theApp()->dispatch(FuncRequest(LFUN_PARAGRAPH_UPDATE)); string const rval = to_utf8(dr.message()); if (dr.error()) client->writeln("ERROR:" + cmd + ':' + rval); @@ -189,7 +190,7 @@ void ServerSocket::writeln(string const & line) // void ServerSocket::dump() const // { // lyxerr << "ServerSocket debug dump.\n" -// << "fd = " << fd_ << ", address = " << address_.absFilename() << ".\n" +// << "fd = " << fd_ << ", address = " << address_.absFileName() << ".\n" // << "Clients: " << clients.size() << ".\n"; // map >::const_iterator client = clients.begin(); // map >::const_iterator end = clients.end();