#pragma implementation
#endif
-#ifdef KDEGUI
-# include <kapp.h>
-#endif
-
-#ifdef GTKGUI
-# include <gnome--/main.h>
-#endif
-
#include <fcntl.h>
#include "lyx_gui.h"
#include FORMS_H_LOCATION
#include "bufferlist.h"
#include "language.h"
#include "ColorHandler.h"
+#include "frontends/GUIRunTime.h"
using std::endl;
};
-extern "C" int LyX_XErrHandler(Display * display, XErrorEvent * xeev)
+extern "C"
+int LyX_XErrHandler(Display * display, XErrorEvent * xeev)
{
//#warning Please see if you can trigger this!
// emergency save
combo_language->addto((*cit).second.lang().c_str());
combo_language2->addto((*cit).second.lang().c_str());
}
- combo_language2->select_text("No change");
+ combo_language2->select_text(_("No change"));
// not really necessary, but we can do it anyway.
fl_addto_choice(fd_form_document->choice_fontsize, "default|10|11|12");
int main_placement = FL_PLACE_CENTER | FL_FREE_SIZE;
int title_placement = FL_PLACE_CENTER;
// Did we get a valid position?
- if (xpos>= 0 && ypos>= 0) {
+ if (xpos >= 0 && ypos >= 0) {
lyxViews->setPosition(xpos, ypos);
if (lyxrc.show_banner) {
// show the title form in the middle of the main form
void LyXGUI::runTime()
- /* This will usually be toolkit (GUI) specific. This is
- * also usually the XEvent dispatcher of the GUI. */
{
- if (!gui)
- return;
-
- // XForms specific
- XEvent ev;
+ if (!gui) return;
- while (!finished) {
-#ifdef KDEGUI
- kapp->processEvents();
-#endif
-#ifdef GTKGUI
- while(Gnome::Main::instance()->events_pending()) Gnome::Main::instance()->iteration(FALSE);
-#endif
-
- if (fl_check_forms() == FL_EVENT) {
- lyxerr << "LyX: This shouldn't happen..." << endl;
- fl_XNextEvent(&ev);
- }
- }
+ GUIRunTime grt;
+ grt.runTime();
}
lyxViews->view()->buffer(b);
}
+
LyXView * LyXGUI::getLyXView() const
{
return lyxViews;