X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fclient%2Fclient.cpp;h=023e73e96b44e45facfb9af06232bd0164a0287b;hb=e8c932ff842ced0b26c205ed6983102b6e7e50c2;hp=4d7eea53f6678f0f303ae40f43d18865951516c4;hpb=7b48e2aac0d63fe23cbeadf6ddd50ab0c26c1b6e;p=lyx.git diff --git a/src/client/client.cpp b/src/client/client.cpp index 4d7eea53f6..023e73e96b 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -19,8 +19,7 @@ #include "support/lstrings.h" #include "support/Messages.h" #include "support/unicode.h" - -#include +#include "support/unique_ptr.h" // getpid(), getppid() #ifdef HAVE_SYS_TYPES_H @@ -61,13 +60,15 @@ #include #include + using namespace std; using namespace lyx::support; -using ::boost::scoped_ptr; - namespace lyx { +// Dummy verbose support +bool verbose = false; + // Dummy LyXRC support struct LyXRC { string icon_set; @@ -426,7 +427,7 @@ bool CmdLineParser::parse(int argc, char * argv[]) namespace cmdline { - docstring mainTmp(from_ascii("/tmp")); +docstring mainTmp(from_ascii("/tmp")); class StopException : public exception @@ -456,8 +457,8 @@ void usage() "lyxclient will connect only to a lyx with the specified pid. Options -c and -g\n" "cannot be set simultaneoulsly. If no -c or -g options are given, lyxclient\n" "will read commands from standard input and disconnect when command read is BYE:\n" - "\n" - "System directory is: " << to_utf8(cmdline::mainTmp) + "\n" + "System directory is: " << to_utf8(cmdline::mainTmp) << endl; } @@ -506,9 +507,11 @@ int g(vector const & arg) << endl; return -1; } - singleCommand = "LYXCMD:server-goto-file-row " - + arg[0] + ' ' - + arg[1]; + singleCommand = "LYXCMD:command-sequence " + "server-goto-file-row " + + arg[0] + ' ' + + arg[1] + "; " + + "lyx-activate"; return 2; } @@ -618,7 +621,7 @@ int LyXClientApp::run() return EXIT_FAILURE; } - scoped_ptr server; + unique_ptr server; if (!cmdline::serverAddress.empty()) { server.reset(new LyXDataSocket(FileName(to_utf8(cmdline::serverAddress))));