Commit Graph

22 Commits

Author SHA1 Message Date
Enrico Forestieri
3ab2267014 Don't start the pipe server if the pipe is already in use.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31213 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-23 14:40:26 +00:00
Enrico Forestieri
736d7f82a1 Properly stop the pipe server when LyX is quitting
but the answer to a client is still pending.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31212 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-23 13:27:08 +00:00
Enrico Forestieri
cd475bad39 Perform the clean up at the right place. Also put the event in the
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
2009-08-22 12:22:46 +00:00
Enrico Forestieri
96a8d85c7c Correct clean up on pipe server shutdown.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31192 a592a061-630c-0410-9148-cb99ea01b6c8
2009-08-22 11:23:11 +00:00
Enrico Forestieri
fc97861803 Implement the LyXServer on Windows.
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
2009-08-21 22:58:38 +00:00
Enrico Forestieri
4e12c4327a Avoid useless assignment to errno and add scope operator for safety.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27713 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-26 19:05:35 +00:00
Enrico Forestieri
077baded5c Fix bug 641 (Detect stale lyxpipes after crash)
http://bugzilla.lyx.org/show_bug.cgi?id=641


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27708 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-26 01:22:05 +00:00
André Pönitz
f1cba8ff64 more latin1..utf8 schanges. all of src/* should be utf8 now
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27425 a592a061-630c-0410-9148-cb99ea01b6c8
2008-11-14 15:58:50 +00:00
Enrico Forestieri
964a4fac79 Fix bug 1784
http://bugzilla.lyx.org/show_bug.cgi?id=1784


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26737 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-05 00:50:39 +00:00
Pavel Sanda
41e45a8977 * Doxy.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25483 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-07 17:26:07 +00:00
Abdelrazak Younes
2bf1c09376 header cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23049 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-18 07:14:42 +00:00
Abdelrazak Younes
e7bb71ff4e header cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22178 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 22:09:28 +00:00
Abdelrazak Younes
9abb7db468 getting rid of superfluous std:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22104 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:28:07 +00:00
Abdelrazak Younes
b89cc942eb 'using namespace lyx::support' instead of 'using support::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22103 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 18:57:56 +00:00
Abdelrazak Younes
9383f4c3c6 'using namespace std' instead of 'using std::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 10:16:00 +00:00
André Pönitz
23a672cf26 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21885 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-30 22:02:33 +00:00
André Pönitz
9d0ea8aeff Move debug.{cpp,h}, Messages.{cpp,h} and gettext.{cpp,h} to support/.
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
2007-11-29 07:04:28 +00:00
Abdelrazak Younes
f07105d0e5 * FileName:
- removeFile(): replace unlink
- copyTo(): add 'overwrite' parameter.

* getcwd.cpp: simplify.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21843 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-28 09:01:49 +00:00
André Pönitz
e1ce2f92db reduce line noise
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21631 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-15 20:04:51 +00:00
Abdelrazak Younes
c3e1c597ab MSVC compil fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20323 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-17 20:27:38 +00:00
André Pönitz
1e62913610 cosmetics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20319 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-16 20:58:22 +00:00
André Pönitz
d079c908b3 rename LyXServer into Server
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18092 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 16:22:46 +00:00