mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Improve encoding GUI string
This commit is contained in:
parent
642b4acca1
commit
0a8294d426
@ -239,7 +239,7 @@ End
|
|||||||
# A plain utf8 encoding that does not use the inputenc package
|
# A plain utf8 encoding that does not use the inputenc package
|
||||||
# nor the LyX-added conversions in lib/unicodesymbols.
|
# nor the LyX-added conversions in lib/unicodesymbols.
|
||||||
# Such an encoding is required for XeTeX and LuaTeX.
|
# Such an encoding is required for XeTeX and LuaTeX.
|
||||||
Encoding utf8-plain utf8-plain "Pass-Through" UTF-8 variable none
|
Encoding utf8-plain utf8-plain "Direct" UTF-8 variable none
|
||||||
End
|
End
|
||||||
|
|
||||||
# Pure 7bit ASCII encoding (partially hardcoded in LyX)
|
# Pure 7bit ASCII encoding (partially hardcoded in LyX)
|
||||||
|
@ -978,9 +978,9 @@ GuiDocument::GuiDocument(GuiView & lv)
|
|||||||
|
|
||||||
// basic Unicode encodings: keep order
|
// basic Unicode encodings: keep order
|
||||||
const QStringList utf8_base_encodings = {"utf8", "utf8-plain", "utf8x"};
|
const QStringList utf8_base_encodings = {"utf8", "utf8-plain", "utf8x"};
|
||||||
for (auto const & i : utf8_base_encodings) {
|
for (auto const & i : utf8_base_encodings) {
|
||||||
langModule->unicodeEncodingCO->addItem(
|
langModule->unicodeEncodingCO->addItem(
|
||||||
toqstr(encodings.fromLyXName(fromqstr(i))->guiName()), i);
|
toqstr(encodings.fromLyXName(fromqstr(i))->guiName()), i);
|
||||||
}
|
}
|
||||||
langModule->unicodeEncodingCO->setItemData(0,
|
langModule->unicodeEncodingCO->setItemData(0,
|
||||||
"Standard Unicode support by the ``inputenc'' package.",
|
"Standard Unicode support by the ``inputenc'' package.",
|
||||||
@ -1012,8 +1012,8 @@ GuiDocument::GuiDocument(GuiView & lv)
|
|||||||
|| utf8_base_encodings.contains(toqstr(encvar.name())))
|
|| utf8_base_encodings.contains(toqstr(encvar.name())))
|
||||||
continue;
|
continue;
|
||||||
if (std::string(encvar.name()).find("utf8") == 0)
|
if (std::string(encvar.name()).find("utf8") == 0)
|
||||||
encodingmap_utf8.insert(toqstr(encvar.guiName()), toqstr(encvar.name()));
|
encodingmap_utf8.insert(toqstr(encvar.guiName()), toqstr(encvar.name()));
|
||||||
else
|
else
|
||||||
encodingmap.insert(toqstr(encvar.guiName()), toqstr(encvar.name()));
|
encodingmap.insert(toqstr(encvar.guiName()), toqstr(encvar.name()));
|
||||||
}
|
}
|
||||||
for (auto const & i : encodingmap_utf8.keys()) {
|
for (auto const & i : encodingmap_utf8.keys()) {
|
||||||
@ -2343,6 +2343,10 @@ void GuiDocument::encodingSwitched(int i)
|
|||||||
langModule->unicodeEncodingCO->setVisible(i == EncodingSets::unicode);
|
langModule->unicodeEncodingCO->setVisible(i == EncodingSets::unicode);
|
||||||
langModule->autoEncodingCO->setVisible(i == EncodingSets::legacy);
|
langModule->autoEncodingCO->setVisible(i == EncodingSets::legacy);
|
||||||
langModule->customEncodingCO->setVisible(i == EncodingSets::custom);
|
langModule->customEncodingCO->setVisible(i == EncodingSets::custom);
|
||||||
|
if (tex_fonts)
|
||||||
|
langModule->unicodeEncodingCO->setItemText(1, qt_("Direct (No inputenc)"));
|
||||||
|
else
|
||||||
|
langModule->unicodeEncodingCO->setItemText(1, qt_("Direct (XeTeX/LuaTeX)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiDocument::inputencodingToDialog()
|
void GuiDocument::inputencodingToDialog()
|
||||||
|
Loading…
Reference in New Issue
Block a user