X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxfont.C;h=9d0d7c911cb9d6f8edda686b9bcbf55b52af8a60;hb=35cf7dcb2bdfdcda465b69c58465f657c77fd9d7;hp=07dca6dcac5021a66f7aa27ffde78b8034c966b4;hpb=94fd1a06287642d3691d857d0e51b83fb116ae6c;p=lyx.git diff --git a/src/lyxfont.C b/src/lyxfont.C index 07dca6dcac..9d0d7c911c 100644 --- a/src/lyxfont.C +++ b/src/lyxfont.C @@ -24,6 +24,7 @@ #include "lyxlex.h" #include "FontLoader.h" #include "support/lstrings.h" +#include "bufferparams.h" // stateText using std::ostream; using std::endl; @@ -380,7 +381,7 @@ bool LyXFont::resolved() const /// Build GUI description of font state -string LyXFont::stateText() const +string LyXFont::stateText(BufferParams * params) const { #ifdef HAVE_SSTREAM std::ostringstream ost; @@ -410,7 +411,8 @@ string LyXFont::stateText() const ost << _("Latex ") << _(GUIMiscNames[latex()]) << ", "; if (bits == inherit) ost << _("Default") << ", "; - ost << _("Language: ") << _(language()->display.c_str()); + if (!params || language() != params->language_info) + ost << _("Language: ") << _(language()->display().c_str()); #ifdef HAVE_SSTREAM string buf(ost.str().c_str()); #else @@ -657,14 +659,14 @@ void LyXFont::lyxWriteChanges(LyXFont const & orgfont, ostream & os) const if (orgfont.color() != color()) { // To make us file compatible with older // lyx versions we emit "default" instead - // of "ignore" + // of "inherit" string col_str(lcolor.getLyXName(color())); if (col_str == "inherit") col_str = "default"; os << "\\color " << col_str << "\n"; } if (orgfont.language() != language()) { if (language()) - os << "\\lang " << language()->lang << "\n"; + os << "\\lang " << language()->lang() << "\n"; else os << "\\lang unknown\n"; } @@ -693,7 +695,7 @@ int LyXFont::latexWriteStartChanges(ostream & os, LyXFont const & base, } else { string tmp = '{' + subst(lyxrc.language_command_begin, - "$$lang", language()->lang); + "$$lang", language()->lang()); os << tmp; count += tmp.length(); env = true; //We have opened a new environment