#include <config.h>
#include <cstdlib>
+#include <fcntl.h>
#ifdef __GNUG__
#pragma implementation
#include FORMS_H_LOCATION
#include "support/filetools.h"
#include "support/os.h"
+#include "support/lyxlib.h"
#include "figure_form.h"
#include "print_form.h"
#include "tex-strings.h"
#endif
#include "bufferlist.h"
#include "ColorHandler.h"
-#include "frontends/Dialogs.h"
#include "frontends/GUIRunTime.h"
#include "frontends/xforms/xforms_helpers.h" // for XformColor
extern LyXServer * lyxserver;
extern bool finished; // flag, that we are quitting the program
extern BufferList bufferlist;
-extern GUIRunTime guiruntime;
extern string user_lyxdir;
FL_CMD_OPT cmdopt[] =
};
-extern "C"
+extern "C" {
+
+static
int LyX_XErrHandler(Display * display, XErrorEvent * xeev)
{
- // emergency save
- if (!bufferlist.empty())
- bufferlist.emergencyWriteAll();
+ // emergency cleanup
+ LyX::emergencyCleanup();
// Get the reason for the crash.
char etxt[513];
lyx::abort();
return 0; // Solaris CC wants us to return something
}
+
+}
LyXGUI::LyXGUI(LyX * owner, int * argc, char * argv[], bool GUI)
void LyXGUI::create_forms()
{
lyxerr[Debug::INIT] << "Initializing LyXView..." << endl;
- lyxViews = new LyXView(width, height);
+ lyxViews = GUIRunTime::createMainView(width, height);
lyxerr[Debug::INIT] << "Initializing LyXView...done" << endl;
// From here down should be done by somebody else. (Lgb)
}
lyxViews->show(main_placement, FL_FULLBORDER, "LyX");
-
- if (lyxrc.show_banner)
- lyxViews->getDialogs()->showSplash();
}
{
if (!gui) return;
- guiruntime.runTime();
+ GUIRunTime::runTime();
}