X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLColor.C;h=ba6f4289ae81222988b3cb31843a8394e54685b0;hb=35204f8f33d7400a5fefeffea533fb4cb4097211;hp=33cf10686d3aaa1f3197ee6763e9f18f52e5f7b6;hpb=02ab1bf675bec2f1f2f101da1a22bbb2aeee01ca;p=lyx.git diff --git a/src/LColor.C b/src/LColor.C index 33cf10686d..ba6f4289ae 100644 --- a/src/LColor.C +++ b/src/LColor.C @@ -23,8 +23,11 @@ #include -using lyx::support::compare_ascii_no_case; -using lyx::support::ascii_lowercase; + +namespace lyx { + +using support::compare_ascii_no_case; +using support::ascii_lowercase; using std::endl; using std::string; @@ -110,6 +113,7 @@ LColor::LColor() { commentbg, N_("comment background"), "commentbg", "linen", "commentbg" }, { greyedout, N_("greyedout inset"), "greyedout", "red", "greyedout" }, { greyedoutbg, N_("greyedout inset background"), "greyedoutbg", "linen", "greyedoutbg" }, + { shadedbg, N_("shaded box"), "shaded", "#ff0000", "shaded" }, { depthbar, N_("depth bar"), "depthbar", "IndianRed", "depthbar" }, { language, N_("language"), "language", "Blue", "language" }, { command, N_("command inset"), "command", "black", "command" }, @@ -176,7 +180,7 @@ string const LColor::getGUIName(LColor::color c) const { Pimpl::InfoTab::const_iterator it = pimpl_->infotab.find(c); if (it != pimpl_->infotab.end()) - return _(it->second.guiname); + return to_utf8(_(it->second.guiname)); return "none"; } @@ -188,7 +192,7 @@ string const LColor::getX11Name(LColor::color c) const return it->second.x11name; lyxerr << "LyX internal error: Missing color" - " entry in LColor.C for " << c << '\n' + " entry in LColor.C for " << c << '\n' << "Using black." << endl; return "black"; } @@ -253,7 +257,7 @@ LColor::color LColor::getFromGUIName(string const & guiname) const Pimpl::InfoTab::const_iterator it = pimpl_->infotab.begin(); Pimpl::InfoTab::const_iterator end = pimpl_->infotab.end(); for (; it != end; ++it) { - if (!compare_ascii_no_case(_(it->second.guiname), guiname)) + if (!compare_ascii_no_case(to_utf8(_(it->second.guiname)), guiname)) return it->first; } return LColor::inherit; @@ -296,3 +300,6 @@ LColor::color LColor::getFromLaTeXName(string const & latexname) const LColor lcolor; // An equally evil global system LColor instance LColor system_lcolor; + + +} // namespace lyx