diff --git a/src/ChangeLog b/src/ChangeLog index 085c6d5616..8d2bc17967 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,15 @@ 2001-11-14 Jean-Marc Lasgouttes - * lyxrc.C (read): + * lyxserver.C (emergencyCleanup): do not try to close pipes if + server is not running. + (openConnection): + (closeConnection): add debug info when server is disabled. + + * ColorHandler.C (getGCForeground): send debug message to GUI + channel. + + * lyxrc.C: do not include lyxserver.h and tex-strings.h. + * kbmap.C (bind): modify because return conventions of kb_sequence::parse have changed. diff --git a/src/ColorHandler.C b/src/ColorHandler.C index fcd516610e..95912c5225 100644 --- a/src/ColorHandler.C +++ b/src/ColorHandler.C @@ -88,7 +88,7 @@ GC LyXColorHandler::getGCForeground(LColor::color c) val.foreground = bla; // Try the exact RGB values first, then the approximate. } else if (XAllocColor(display, colormap, &xcol) != 0) { - if (lyxerr.debugging()) { + if (lyxerr.debugging(Debug::GUI)) { lyxerr << _("LyX: X11 color ") << s << _(" allocated for ") << lcolor.getGUIName(c) << endl; diff --git a/src/lyxrc.C b/src/lyxrc.C index c93b33729a..cd89f42206 100644 --- a/src/lyxrc.C +++ b/src/lyxrc.C @@ -23,10 +23,8 @@ #include "lyxrc.h" #include "kbmap.h" #include "LyXAction.h" -#include "lyxserver.h" #include "lyx_main.h" #include "intl.h" -#include "tex-strings.h" #include "support/path.h" #include "support/filetools.h" #include "lyxtext.h" diff --git a/src/lyxserver.C b/src/lyxserver.C index 3e16f06138..368e6df9ad 100644 --- a/src/lyxserver.C +++ b/src/lyxserver.C @@ -108,7 +108,12 @@ void LyXComm::openConnection() // We assume that we don't make it ready = false; - if (pipename.empty()) return; + if (pipename.empty()) { + lyxerr[Debug::LYXSERVER] + << "LyXComm: server is disabled, nothing to do" + << endl; + return; + } if ((infd = startPipe(inPipeName(), false)) == -1) return; @@ -136,6 +141,9 @@ void LyXComm::closeConnection() lyxerr[Debug::LYXSERVER] << "LyXComm: Closing connection" << endl; if (pipename.empty()) { + lyxerr[Debug::LYXSERVER] + << "LyXComm: server is disabled, nothing to do" + << endl; return; } @@ -255,8 +263,10 @@ void LyXComm::endPipe(int & fd, string const & filename) void LyXComm::emergencyCleanup() { - endPipe(infd, inPipeName()); - endPipe(outfd, outPipeName()); + if (!pipename.empty()) { + endPipe(infd, inPipeName()); + endPipe(outfd, outPipeName()); + } }