]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_gui.C
remove CXX_WORKING_NAMESPACES
[lyx.git] / src / lyx_gui.C
index 3ea7067556bd5bfb16588436998408e32cb01c99..0880fdd93cb73bf9d6581d3956ef9ab63d7b916c 100644 (file)
 
 #include <config.h>
 #include <cstdlib>
-#include <clocale>
 
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
-#include <fcntl.h>
+//#include <fcntl.h>
 #include "lyx_gui.h"
 #include FORMS_H_LOCATION
 #include "support/filetools.h"
 #include "combox.h"
 #include "lyx.h"
 #include "form1.h"
-#include "layout_forms.h"
 #include "print_form.h"
 #include "tex-strings.h"
 #include "lyx_main.h"
 #include "lyxlookup.h"
 #endif
 #include "bufferlist.h"
-#include "language.h"
 #include "ColorHandler.h"
 #include "frontends/Dialogs.h"
 #include "frontends/GUIRunTime.h"
-#include "frontends/xforms/xform_helpers.h" // for XformColor
+#include "frontends/xforms/xforms_helpers.h" // for XformColor
 
 using std::endl;
 
-FD_form_character * fd_form_character;
 FD_form_sendto * fd_form_sendto;
 FD_form_figure * fd_form_figure;
-Combox * combo_language;
-Combox * combo_language2;
 
 extern LyXServer * lyxserver;
 extern bool finished;  // flag, that we are quitting the program
@@ -108,7 +102,7 @@ LyXGUI::LyXGUI(LyX * owner, int * argc, char * argv[], bool GUI)
        fl_initialize(argc, argv, "LyX", cmdopt, num_res);
        // It appears that, in xforms >=0.89.5, fl_initialize()
        // calls setlocale() and ruins our LC_NUMERIC setting.
-       setlocale(LC_NUMERIC, "C");
+       locale_init();
        fl_get_app_resources(res, num_res);
 
        static const int geometryBitmask =
@@ -156,7 +150,7 @@ LyXGUI::LyXGUI(LyX * owner, int * argc, char * argv[], bool GUI)
                ypos += HeightOfScreen(ScreenOfDisplay(fl_get_display(), fl_screen)) - height; //DefaultScreen(fl_get_display())) - height;
 
        // Initialize the LyXColorHandler
-       lyxColorHandler = new LyXColorHandler;
+       lyxColorHandler.reset(new LyXColorHandler);
 }
 
 
@@ -278,53 +272,6 @@ void LyXGUI::create_forms()
        // Create forms
        //
 
-       // the character form
-       fd_form_character = create_form_form_character();
-       fl_set_form_atclose(fd_form_character->form_character,
-                           CancelCloseBoxCB, 0);
-       fl_addto_choice(fd_form_character->choice_family, 
-                       _(" No change %l| Roman | Sans Serif | Typewriter %l| Reset "));
-       fl_addto_choice(fd_form_character->choice_series, 
-                       _(" No change %l| Medium | Bold %l| Reset "));
-       fl_addto_choice(fd_form_character->choice_shape,
-                       _(" No change %l| Upright | Italic | Slanted | Small Caps "
-                       "%l| Reset "));
-       fl_addto_choice(fd_form_character->choice_size, 
-                       _(" No change %l| Tiny | Smallest | Smaller | Small "
-                       "| Normal | Large | Larger | Largest | Huge | Huger "
-                       "%l| Increase | Decrease | Reset "));
-       fl_addto_choice(fd_form_character->choice_bar, 
-                       _(" No change %l| Emph | Underbar | Noun | LaTeX mode %l| Reset "));
-       fl_addto_choice(fd_form_character->choice_color, 
-                       _(" No change %l| No color | Black | White | Red | Green "
-                       "| Blue | Cyan | Magenta | Yellow %l| Reset "));
-       // Appears to need initialising to avoid seg fault when dialog is
-       // launched. Over-written by combo_language2, below
-       fl_addto_choice(fd_form_character->choice_language,
-                       _(" English %l| German | French "));
-       fl_set_form_minsize(fd_form_character->form_character,
-                           fd_form_character->form_character->w,
-                           fd_form_character->form_character->h);
-       lyxerr[Debug::INIT] << "Initializing form_character::combox..." << endl;
-       fl_addto_form(fd_form_character->form_character);
-       combo_language2 = new Combox(FL_COMBOX_DROPLIST);
-       FL_OBJECT * ob = fd_form_character->choice_language;
-       combo_language2->add(ob->x, ob->y, ob->w, ob->h, 250);
-       combo_language2->shortcut("#L", 1);
-       fl_end_form();
-       lyxerr[Debug::INIT] << "Initializing form_character...done" << endl;
-
-       // build up the combox entries
-       combo_language2->addline(_("No change"));
-       combo_language2->addline(_("Reset"));
-       for (Languages::const_iterator cit = languages.begin();
-           cit != languages.end(); ++cit) {
-#ifdef DO_USE_DEFAULT_LANGUAGE
-           if ((*cit).second.lang() != "default")
-#endif
-               combo_language2->addto((*cit).second.lang());
-       }
-
        // the sendto form
        fd_form_sendto = create_form_form_sendto();
        fl_set_form_atclose(fd_form_sendto->form_sendto, CancelCloseBoxCB, 0);
@@ -339,7 +286,7 @@ void LyXGUI::create_forms()
        // should a mapping exist.
        {
                string filename = AddName(user_lyxdir, "preferences.xform");
-               XformColor::read( filename );
+               XformsColor::read( filename );
        }
        
        // Show the main & title form