]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_gui.C
citation patch from Angus
[lyx.git] / src / lyx_gui.C
index f432f5363d47a8aa4debcec0bc24297f4e6a5d45..d9385d076bd4e1161cc6bb93c48fa2117188ccc9 100644 (file)
@@ -102,7 +102,7 @@ int LyX_XErrHandler(Display * display, XErrorEvent * xeev)
 
 
 LyXGUI::LyXGUI(LyX * owner, int * argc, char * argv[], bool GUI)
-  : _owner(owner), lyxViews(0)
+       : _owner(owner), lyxViews(0)
 {
        gui = GUI;
        if (!gui)
@@ -114,12 +114,12 @@ LyXGUI::LyXGUI(LyX * owner, int * argc, char * argv[], bool GUI)
        fl_initialize(argc, argv, "LyX", cmdopt, num_res);
        fl_get_app_resources(res, num_res);
 
-       static const int geometryBitmask = XParseGeometry( geometry,
-                                                           &xpos,
-                                                           &ypos,
-                                                           (unsigned int *) &width,
-                                                           (unsigned int *) &height
-                                                         );
+       static const int geometryBitmask =
+               XParseGeometry( geometry,
+                               &xpos,
+                               &ypos,
+                               reinterpret_cast<unsigned int *>(&width),
+                               reinterpret_cast<unsigned int *>(&height));
 
        Display * display = fl_get_display();
        if (!display) {
@@ -374,6 +374,15 @@ void LyXGUI::create_forms()
        fl_end_form();
        lyxerr[Debug::INIT] << "Initializing form_character...done" << endl;
 
+       // build up the combox entries
+       combo_language2->addto(_("No change"));
+       combo_language2->addto(_("Reset"));
+       for(Languages::const_iterator cit = languages.begin();
+           cit != languages.end(); ++cit) {
+               combo_language2->addto((*cit).second.lang().c_str());
+       }
+       combo_language2->select_text(_("No change"));
+
 #ifdef USE_OLD_DOCUMENT_LAYOUT
        // the document form
        fd_form_document = create_form_form_document();
@@ -397,14 +406,10 @@ void LyXGUI::create_forms()
 
        // "default" is not part of the languages array any more.
        combo_language->addto("default");
-       combo_language2->addto(_("No change"));
-       combo_language2->addto(_("Reset"));
        for(Languages::const_iterator cit = languages.begin();
            cit != languages.end(); ++cit) {
                combo_language->addto((*cit).second.lang().c_str());
-               combo_language2->addto((*cit).second.lang().c_str());
        }
-       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");
@@ -564,8 +569,7 @@ void LyXGUI::runTime()
 {
        if (!gui) return;
 
-       GUIRunTime grt;
-       grt.runTime();
+       GUIRunTime::runTime();
 }