+2002-07-22 John Levon <moz@compsoc.man.ac.uk>
+
+ * lyx_gui.C: use lyx_gui::exit()
+
2002-07-22 John Levon <moz@compsoc.man.ac.uk>
* LyXAction.C: show the failing pseudo action
+2002-07-22 John Levon <moz@compsoc.man.ac.uk>
+
+ * lyx_gui.h: add exit()
+
2002-07-22 John Levon <moz@compsoc.man.ac.uk>
* Toolbar.h:
*/
void start(string const & batch, std::vector<std::string> files);
+ /**
+ * quit running LyX
+ */
+ void exit();
+
/** Eg, passing LColor::black returns "000000",
* passing LColor::white returns "ffffff".
*/
+2002-07-22 John Levon <moz@compsoc.man.ac.uk>
+
+ * lyx_gui.C: add exit() so we don't busy loop !
+
2002-07-22 John Levon <moz@compsoc.man.ac.uk>
* QCommandEdit.C: complete if right at end of line
using std::hex;
using std::endl;
-extern bool finished;
extern BufferList bufferlist;
// FIXME: wrong place !
view.getLyXFunc()->dispatch(batch);
}
- // FIXME: something somewhere is EATING CPU
- while (!finished) {
- qApp->processEvents();
- }
+ qApp->exec();
- // FIXME
+ // FIXME
delete lyxserver;
}
+void lyx_gui::exit()
+{
+ qApp->exit(0);
+}
+
+
string const lyx_gui::hexname(LColor::color col)
{
QColor color(lcolor.getX11Name(col).c_str());
+2002-07-22 John Levon <moz@compsoc.man.ac.uk>
+
+ * lyx_gui.C: add lyx_gui::exit()
+
2002-07-22 John Levon <moz@compsoc.man.ac.uk>
* Toolbar_pimpl.h:
using std::setfill;
using std::setw;
-extern bool finished;
extern BufferList bufferlist;
// FIXME: wrong place !
namespace {
+/// quit lyx
+bool finished = false;
+
/// set default GUI configuration
void setDefaults()
{
}
+void lyx_gui::exit()
+{
+ finished = true;
+}
+
+
string const lyx_gui::hexname(LColor::color col)
{
string const name = lcolor.getX11Name(col);
#include "bufferview_funcs.h"
#include "debug.h"
#include "lastfiles.h"
-#include "frontends/LyXView.h"
#include "lyxrc.h"
#include "lyxtext.h"
#include "gettext.h"
#include "insets/insetlabel.h"
+#include "frontends/lyx_gui.h"
+#include "frontends/LyXView.h"
#include "frontends/Alert.h"
#include "frontends/FileDialog.h"
extern BufferList bufferlist;
// this should be static, but I need it in buffer.C
bool quitting; // flag, that we are quitting the program
-extern bool finished; // all cleanup done just let it run through now.
void ShowMessage(Buffer const * buf,
DestroyLyXTmpDir(system_tempdir);
- finished = true;
+ lyx_gui::exit();
}
// This is the global bufferlist object
BufferList bufferlist;
-// this should be static, but I need it in buffer.C
-bool finished = false; // flag, that we are quitting the program
-
// convenient to have it here.
boost::scoped_ptr<kb_keymap> toplevel_keymap;