The main thing it does is integrate mouse-modifiers into the
FuncRequest machinery. Previously, these had to be passed
separately, which led to some ugly function signatures.
There was also an unnecessary form of the constructor, which
can now be removed.
No change of behavior is intended.
Only the ones I understand (DWORD is always unsigned). There are more:
../../src/Server.cpp: In member function ‘bool lyx::LyXComm::pipeServer()’:
../../src/Server.cpp:280:10: warning: enumeration value ‘CONNECTING_STATE’ not handled in switch [-Wswitch]
switch (pipe_[i].state) {
^
../../src/Server.cpp:347:8: warning: ‘success’ may be used uninitialized in this function [-Wmaybe-uninitialized]
&& status == pipe_[i].iobuf.length()) {
^
Both bugs above were due to a missing screen update. This patch
updates the current view after dispatching a lyxserver command
and thus solves both.
The patch is quite strightforward and the only difficulty was due
to the fact that the lyxserver needs the result of the dispatched
command. Now, GuiApplication::dispatch(FuncRequest const &) does
right this, but does not return the result, while
GuiApplication::dispatch(FuncRequest const &, DispatchResult &)
is called by the former but does not return the result. So, I
split the first one, isolating the code performing the update,
such that the second one can also update the current view when
the caller is the lyx server. When the action is initiated by
anything different from the lyx server, the behavior is unchanged.
By default, if the lyxpipe is set up and working, loading of documents
is deferred to an already running instance. Note that an already running
instance is only used for loading, such that export from command line
still works as usual.
The default behavior can be changed through a preference setting, and,
whatever the default is, it can be overridden by command line options.
Unticking the "Single instance" check box in the preferences, LyX behaves
exactly as before the introduction of this feature.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36278 a592a061-630c-0410-9148-cb99ea01b6c8
Solution: don't use boost::bind for msvc10 (could also be extended to several GCC versions)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34257 a592a061-630c-0410-9148-cb99ea01b6c8
a lot of simplification is possible. Except some instability period...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33389 a592a061-630c-0410-9148-cb99ea01b6c8
This required to make Cursor::disp_ mutable.
Also, the server parts now pass a DispatchResult object to dispatch (which is
a good thing anyway).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33259 a592a061-630c-0410-9148-cb99ea01b6c8
the input ones. In this way, two (or more) concurrent readers can each
get a reply, which otherwise would be stealed by only one of them.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31254 a592a061-630c-0410-9148-cb99ea01b6c8
nonsignaled state, otherwise after a shutdown the server would be
continually stopped...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31194 a592a061-630c-0410-9148-cb99ea01b6c8
Only for autotools, I don't know how to update cmake and scons, sorry.
For cmake and scons, you should make sure that moc is called on Server.h
using the -D_WIN32 option.
In order to enable the server, specify the LyXServer pipe in
Tools->Preferences->Paths. The path to be entered there must have the
form "\\.\pipe\nameofyourchoice" (without quotes). After that, you can
send commands to LyX. For example, if the pipe path is \\.\pipe\lyxpipe,
typing the following in a terminal:
echo LYXCMD:test:file-open > \\.\pipe\lyxpipe.in
type \\.\pipe\lyxpipe.out
brings up the file dialog and returns the acknowledgment from LyX.
Beware of spaces when using cmd.exe. For example, the following:
echo LYXCMD:test:file-open:foo.lyx> \\.\pipe\lyxpipe.in
will correctly load the document named foo.lyx, but
echo LYXCMD:test:file-open:foo.lyx > \\.\pipe\lyxpipe.in
(notice the space before the redirection) will try to load a
document whose name is "foo.lyx .lyx" because cmd.exe will also
pass the space (sigh).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31189 a592a061-630c-0410-9148-cb99ea01b6c8
Now support/* should have no dependencies on src/* anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21851 a592a061-630c-0410-9148-cb99ea01b6c8