]> git.lyx.org Git - lyx.git/blobdiff - src/lyxrc.C
more cursor dispatch
[lyx.git] / src / lyxrc.C
index c2082dcf6ba3e4e6a4f0bf8eedfaaf5418b80c90..24c940267bd087b83c3a487923269c46bcb43466 100644 (file)
@@ -29,6 +29,8 @@
 #include "lyxlex.h"
 #include "lyxfont.h"
 
+#include "graphics/GraphicsTypes.h"
+
 #include "support/filetools.h"
 #include "support/lstrings.h"
 #include "support/translator.h"
@@ -47,15 +49,9 @@ using std::endl;
 using std::ios;
 using std::ofstream;
 using std::ostream;
+using std::string;
 
 
-namespace lyx {
-namespace graphics {
-/// The translator between the DisplayType and the corresponding lyx string.
-extern Translator<DisplayType, string> displayTranslator;
-}
-}
-
 namespace {
 
 // when adding something to this array keep it sorted!
@@ -356,7 +352,7 @@ int LyXRC::read(string const & filename)
 
                case RC_DISPLAY_GRAPHICS:
                        if (lexrc.next()) {
-                               display_graphics = lyx::graphics::displayTranslator.find(lexrc.getString());
+                               display_graphics = lyx::graphics::displayTranslator().find(lexrc.getString());
                        }
                        break;
 
@@ -767,7 +763,8 @@ int LyXRC::read(string const & filename)
                                break;
                        }
 
-                       if (!lcolor.setColor(lyx_name, x11_name)) {
+                       LColor::color col = lcolor.getFromLyXName(lyx_name);
+                       if (!lcolor.setColor(col, x11_name)) {
                                lyxerr << "Bad lyxrc set_color for "
                                        << lyx_name << endl;
 
@@ -1133,7 +1130,7 @@ void LyXRC::output(ostream & os) const
                        os << "# Display graphics within LyX\n"
                           << "# monochrome|grayscale|color|none\n"
                           << "\\display_graphics "
-                          << lyx::graphics::displayTranslator.find(display_graphics)
+                          << lyx::graphics::displayTranslator().find(display_graphics)
                           << '\n';
                }