2001-11-14 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
- * 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.
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;
#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"
// 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;
lyxerr[Debug::LYXSERVER] << "LyXComm: Closing connection" << endl;
if (pipename.empty()) {
+ lyxerr[Debug::LYXSERVER]
+ << "LyXComm: server is disabled, nothing to do"
+ << endl;
return;
}
void LyXComm::emergencyCleanup()
{
- endPipe(infd, inPipeName());
- endPipe(outfd, outPipeName());
+ if (!pipename.empty()) {
+ endPipe(infd, inPipeName());
+ endPipe(outfd, outPipeName());
+ }
}