mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix bug that I triggered with the sorting of the language names.
Note that this bug was always there, I just had the honour of triggering it! git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4107 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
80309032fd
commit
84480c05b2
@ -1,3 +1,11 @@
|
||||
2002-05-01 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* ControlCharacter.C: use "ignore" and "reset" as the identifiers, not
|
||||
"No change" and "Reset".
|
||||
|
||||
* frnt_lang.C: ditto. Further, do not sort thes two entries. Ie, leave
|
||||
them at the front of the list.
|
||||
|
||||
2002-05-01 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* ControlGraphics.C: add some comments to the char * arrays.
|
||||
|
@ -220,16 +220,16 @@ string ControlCharacter::getLanguage() const
|
||||
{
|
||||
if (font_.get() && font_->language())
|
||||
return font_->language()->lang();
|
||||
return "No change";
|
||||
return "ignore";
|
||||
}
|
||||
|
||||
|
||||
void ControlCharacter::setLanguage(string const & val)
|
||||
{
|
||||
if (val == "No change")
|
||||
if (val == "ignore")
|
||||
font_->setLanguage(ignore_language);
|
||||
|
||||
else if (val == "Reset")
|
||||
else if (val == "reset")
|
||||
font_->setLanguage(lv_.buffer()->params.language);
|
||||
|
||||
else
|
||||
|
@ -42,8 +42,8 @@ vector<LanguagePair> const getLanguageData(bool character_dlg)
|
||||
vector<LanguagePair> langs(size);
|
||||
|
||||
if (character_dlg) {
|
||||
langs[0].first = N_("No change"); langs[0].second = "No change";
|
||||
langs[1].first = N_("Reset"); langs[1].second = "Reset";
|
||||
langs[0].first = N_("No change"); langs[0].second = "ignore";
|
||||
langs[1].first = N_("Reset"); langs[1].second = "reset";
|
||||
}
|
||||
|
||||
vector<string>::size_type i = character_dlg ? 2 : 0;
|
||||
@ -54,7 +54,11 @@ vector<LanguagePair> const getLanguageData(bool character_dlg)
|
||||
++i;
|
||||
}
|
||||
|
||||
std::sort(langs.begin(), langs.end(), Sorter());
|
||||
// Don't sort "ignore" and "reset"
|
||||
vector<LanguagePair>::iterator begin = character_dlg ?
|
||||
langs.begin() + 2 : langs.begin();
|
||||
|
||||
std::sort(begin, langs.end(), Sorter());
|
||||
|
||||
return langs;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user