]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_gui.C
Applied Angus patch to compile on DEC C++ and to avoid name clashes
[lyx.git] / src / lyx_gui.C
index 806372c37fe18f6389a4e1472f090c4d31c85a2f..8964860e0b1142da61a3bd602a4bd6d77822f8b1 100644 (file)
@@ -10,7 +10,6 @@
 
 #include <config.h>
 #include <cstdlib>
-#include <clocale>
 
 #ifdef __GNUG__
 #pragma implementation
@@ -20,7 +19,6 @@
 #include "lyx_gui.h"
 #include FORMS_H_LOCATION
 #include "support/filetools.h"
-#include "combox.h"
 #include "lyx.h"
 #include "form1.h"
 #include "print_form.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;
 
@@ -60,11 +57,15 @@ FL_CMD_OPT cmdopt[] =
        {"-geometry", "*.geometry", XrmoptionSepArg, "690x510"}
 };
 
-static int width  = 690;
-static int height = 510;
-static int xpos   = -1;
-static int ypos   = -1;
-static char geometry[40];
+namespace {
+
+int width  = 690;
+int height = 510;
+int xpos   = -1;
+int ypos   = -1;
+char geometry[40];
+
+} // namespace anon
 
 
 FL_resource res[] =
@@ -104,7 +105,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 =
@@ -152,7 +153,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);
 }
 
 
@@ -288,7 +289,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