}
-string const LColor::getGUIName(LColor::color c) const
+docstring const LColor::getGUIName(LColor::color c) const
{
Pimpl::InfoTab::const_iterator it = pimpl_->infotab.find(c);
if (it != pimpl_->infotab.end())
- return to_utf8(_(it->second.guiname));
- return "none";
+ return _(it->second.guiname);
+ return from_ascii("none");
}
{
string const lcname = ascii_lowercase(lyxname);
if (pimpl_->lyxcolors.find(lcname) == pimpl_->lyxcolors.end()) {
- lyxerr[Debug::GUI]
+ LYXERR(Debug::GUI)
<< "LColor::setColor: Unknown color \""
<< lyxname << '"' << endl;
addColor(static_cast<color>(pimpl_->infotab.size()), lcname);
}
-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(to_utf8(_(it->second.guiname)), guiname))
- return it->first;
- }
- return LColor::inherit;
-}
-
-
void LColor::addColor(LColor::color c, string const & lyxname) const
{
ColorEntry ce = { c, "", "", "", lyxname.c_str() };