]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_gui.C
Dekels tabular/textinset patches
[lyx.git] / src / lyx_gui.C
index cd81b5ee20686a889bb96b21057814b2fd28603f..ddff923cc32a444315ea5371ce0752dbb980bb91 100644 (file)
 #include "lyxrc.h"
 #include "gettext.h"
 #include "lyx_gui_misc.h"
-#if FL_REVISION < 89
+#if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
 #include "lyxlookup.h"
 #endif
 #include "bufferlist.h"
 #include "language.h"
 #include "ColorHandler.h"
 #include "frontends/GUIRunTime.h"
+#include "frontends/xforms/xform_helpers.h" // for XformColor
 
 using std::endl;
 
@@ -58,6 +59,7 @@ extern LyXServer * lyxserver;
 extern bool finished;  // flag, that we are quitting the program
 extern BufferList bufferlist;
 extern GUIRunTime guiruntime;
+extern string user_lyxdir;
 
 FL_CMD_OPT cmdopt[] =
 {
@@ -165,7 +167,7 @@ LyXGUI::~LyXGUI()
        delete lyxserver;
        lyxserver = 0;
        delete lyxViews;
-#if FL_REVISION < 89
+#if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
        CloseLyXLookup();
 #endif
 }
@@ -368,6 +370,13 @@ void LyXGUI::create_forms()
        fl_set_form_atclose(fd_latex_log->LaTeXLog,
                            CancelCloseBoxCB, 0);
 
+       // This is probably as good a time as any to map the xform colours,
+       // should a mapping exist.
+       {
+               string filename = AddName(user_lyxdir, "preferences.xform");
+               XformColor::read( filename );
+       }
+       
        // Show the main & title form
        int main_placement = FL_PLACE_CENTER | FL_FREE_SIZE;
        int title_placement = FL_PLACE_CENTER;