git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23192 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-02-24 15:18:39 +00:00
parent ebd4f002af
commit 6fab0b0804

View File

@ -77,7 +77,8 @@ namespace {
Translator<InsetInfo::info_type, string> const initTranslator() Translator<InsetInfo::info_type, string> const initTranslator()
{ {
Translator<InsetInfo::info_type, string> translator(InsetInfo::UNKNOWN_INFO, "unknown"); Translator<InsetInfo::info_type, string>
translator(InsetInfo::UNKNOWN_INFO, "unknown");
translator.addPair(InsetInfo::SHORTCUT_INFO, "shortcut"); translator.addPair(InsetInfo::SHORTCUT_INFO, "shortcut");
translator.addPair(InsetInfo::LYXRC_INFO, "lyxrc"); translator.addPair(InsetInfo::LYXRC_INFO, "lyxrc");
@ -91,10 +92,10 @@ Translator<InsetInfo::info_type, string> const initTranslator()
} // namespace anon } // namespace anon
Translator<InsetInfo::info_type, string> const & InsetInfo::nameTranslator() const Translator<InsetInfo::info_type, string>
const & InsetInfo::nameTranslator() const
{ {
static Translator<info_type, string> const translator = static Translator<info_type, string> const translator = initTranslator();
initTranslator();
return translator; return translator;
} }
@ -128,8 +129,7 @@ void InsetInfo::read(Buffer const & buf, Lexer & lex)
void InsetInfo::write(Buffer const &, ostream & os) const void InsetInfo::write(Buffer const &, ostream & os) const
{ {
os << "Info\ntype \"" os << "Info\ntype \"" << nameTranslator().find(type_)
<< nameTranslator().find(type_)
<< "\"\narg \"" << name_ << '\"'; << "\"\narg \"" << name_ << '\"';
} }
@ -202,8 +202,7 @@ void InsetInfo::updateInfo(Buffer const & buf)
break; break;
case TEXTCLASS_INFO: { case TEXTCLASS_INFO: {
// name_ is the class name // name_ is the class name
pair<bool, lyx::textclass_type> pp = pair<bool, lyx::textclass_type> pp = textclasslist.numberOfClass(name_);
textclasslist.numberOfClass(name_);
setText(pp.first ? _("yes") : _("no"), setText(pp.first ? _("yes") : _("no"),
bp.getFont(), false); bp.getFont(), false);
break; break;