]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_gui.C
Fix crash when running lyx -dbg insets -e ...
[lyx.git] / src / lyx_gui.C
index cdb1f3645778a0f340b781ca3601bc0bf6f6e9d7..27526090cb329cd6d8311cfc2578666e9651513f 100644 (file)
@@ -15,7 +15,6 @@
 #pragma implementation
 #endif
 
-//#include <fcntl.h>
 #include "lyx_gui.h"
 #include FORMS_H_LOCATION
 #include "support/filetools.h"
@@ -28,6 +27,7 @@
 #include "version.h"
 #include "LyXView.h"
 #include "buffer.h"
+#include "BufferView.h"
 #include "lyxserver.h"
 #include "lyxrc.h"
 #include "gettext.h"
@@ -49,7 +49,6 @@ FD_form_figure * fd_form_figure;
 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[] =
@@ -267,7 +266,7 @@ void LyXGUI::init()
 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)
@@ -312,7 +311,7 @@ void LyXGUI::runTime()
 {
        if (!gui) return;
 
-       guiruntime.runTime();
+       GUIRunTime::runTime();
 }