The branch, master, has been updated. - Log -----------------------------------------------------------------
commit ceb180cebd64903f2376378fc2d425eb9e001bc4 Author: Uwe Stöhr <uwesto...@lyx.org> Date: Fri Jun 8 05:39:00 2012 +0200 GuiDocument.cpp: some languages only work with polyglossia, therefore enable non-TeX fonts when one of them is used as document language diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 164fe93..4b269ca 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -1060,7 +1060,7 @@ GuiDocument::GuiDocument(GuiView & lv) // language & quote langModule = new UiWidget<Ui::LanguageUi>; connect(langModule->languageCO, SIGNAL(activated(int)), - this, SLOT(change_adaptor())); + this, SLOT(languageChanged(int))); connect(langModule->defaultencodingRB, SIGNAL(clicked()), this, SLOT(change_adaptor())); connect(langModule->otherencodingRB, SIGNAL(clicked()), @@ -1757,6 +1757,26 @@ void GuiDocument::deleteBoxBackgroundColor() } +void GuiDocument::languageChanged(int i) +{ + // some languages only work with polyglossia/XeTeX + string current_language = lyx::languages.getLanguage( + fromqstr(langModule->languageCO->itemData(i).toString()))->lang(); + if (current_language == "ancientgreek" + || current_language == "coptic" || current_language == "divehi" + || current_language == "hindi" || current_language == "kurmanji" + || current_language == "lao" || current_language == "marathi" + || current_language == "occitan" || current_language == "sanskrit" + || current_language == "syriac" || current_language == "tamil" + || current_language == "telugu" || current_language == "urdu") { + fontModule->osFontsCB->setChecked(true); + fontModule->osFontsCB->setEnabled(false); + } + else + fontModule->osFontsCB->setEnabled(true); +} + + void GuiDocument::osFontsChanged(bool nontexfonts) { bool const tex_fonts = !nontexfonts; diff --git a/src/frontends/qt4/GuiDocument.h b/src/frontends/qt4/GuiDocument.h index 4ab74c6..cb89b20 100644 --- a/src/frontends/qt4/GuiDocument.h +++ b/src/frontends/qt4/GuiDocument.h @@ -120,6 +120,7 @@ private Q_SLOTS: void deleteNoteFontColor(); void changeBoxBackgroundColor(); void deleteBoxBackgroundColor(); + void languageChanged(int); void osFontsChanged(bool); void branchesRename(docstring const &, docstring const &); private: ----------------------------------------------------------------------- Summary of changes: src/frontends/qt4/GuiDocument.cpp | 22 +++++++++++++++++++++- src/frontends/qt4/GuiDocument.h | 1 + 2 files changed, 22 insertions(+), 1 deletions(-) hooks/post-receive -- The LyX Source Repository