]> git.lyx.org Git - lyx.git/blobdiff - src/BufferParams.cpp
GuiSearch did not work with num. keypad enter
[lyx.git] / src / BufferParams.cpp
index 46d56581ca13eb3acbbb5d4bf8da4bb6f93f8bc6..7004a9211f2e176ceed5c65ace6641b75eb204c5 100644 (file)
@@ -704,9 +704,10 @@ BufferParams::MathNumber BufferParams::getMathNumber() const
 
 
 string BufferParams::readToken(Lexer & lex, string const & token,
-       FileName const & filepath)
+       FileName const & filename)
 {
        string result;
+       FileName const & filepath = filename.onlyPath();
 
        if (token == "\\textclass") {
                lex.next();
@@ -1028,7 +1029,7 @@ string BufferParams::readToken(Lexer & lex, string const & token,
                                        color = lcolor.getX11HexName(Color_background);
                                // FIXME UNICODE
                                if (!shortcut.empty())
-                                       lcolor.setColor(to_utf8(shortcut), color);
+                                       lcolor.setColor(to_utf8(shortcut)+ "@" + filename.absFileName(), color);
                        }
                }
        } else if (token == "\\author") {
@@ -1055,12 +1056,15 @@ string BufferParams::readToken(Lexer & lex, string const & token,
                notefontcolor = lyx::rgbFromHexName(color);
                lcolor.setColor("notefontcolor", color);
                lcolor.setLaTeXName("notefontcolor", "note_fontcolor");
+               lcolor.setGUIName("notefontcolor", N_("greyedout inset text"));
+               // set a local name for the painter
+               lcolor.setColor("notefontcolor@" + filename.absFileName(), color);
                isnotefontcolor = true;
        } else if (token == "\\boxbgcolor") {
                lex.eatLine();
                string color = lex.getString();
                boxbgcolor = lyx::rgbFromHexName(color);
-               lcolor.setColor("boxbgcolor", color);
+               lcolor.setColor("boxbgcolor@" + filename.absFileName(), color);
                isboxbgcolor = true;
        } else if (token == "\\paperwidth") {
                lex >> paperwidth;