]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_gui.C
fix "make dist" target
[lyx.git] / src / lyx_gui.C
index eee229e9bc21eb895c5318699c0372811a79e629..c7cd7262dfba0ea3788e2b767cba952175f89ec5 100644 (file)
@@ -10,7 +10,6 @@
 
 #include <config.h>
 #include <cstdlib>
-#include <clocale>
 
 #ifdef __GNUG__
 #pragma implementation
@@ -20,9 +19,8 @@
 #include "lyx_gui.h"
 #include FORMS_H_LOCATION
 #include "support/filetools.h"
-#include "combox.h"
-#include "lyx.h"
-#include "form1.h"
+#include "support/os.h"
+#include "figure_form.h"
 #include "print_form.h"
 #include "tex-strings.h"
 #include "lyx_main.h"
@@ -59,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[] =
@@ -103,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 =
@@ -116,6 +118,7 @@ LyXGUI::LyXGUI(LyX * owner, int * argc, char * argv[], bool GUI)
        Display * display = fl_get_display();
        if (!display) {
                lyxerr << "LyX: unable to access X display, exiting" << endl;
+               os::warn("Unable to access X display, exiting");
                exit(1);
        }
        fcntl(ConnectionNumber(display), F_SETFD, FD_CLOEXEC);
@@ -151,7 +154,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);
 }