X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLColor.C;h=5923d26ce8b83df3a5ac17933eb653a179b6e771;hb=e5a46922e916a06ad1b958d5895cc3cfb4f13d2c;hp=2f2a9ff06f57b6ed41e0947f28d83f4be9198a11;hpb=f5c6da2b51a46e2e36919d02d0db0bb6ea3abe36;p=lyx.git diff --git a/src/LColor.C b/src/LColor.C index 2f2a9ff06f..5923d26ce8 100644 --- a/src/LColor.C +++ b/src/LColor.C @@ -174,12 +174,12 @@ LColor & LColor::operator=(LColor tmp) } -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"); } @@ -250,18 +250,6 @@ bool LColor::setColor(string const & lyxname, string const &x11name) } -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() };