Merge pull request #603 from turtleli/fix-change-language

Fix language panel glitch on Windows
This commit is contained in:
Gregory Hainaut 2015-06-19 15:03:27 +02:00
commit cfff229977
2 changed files with 2 additions and 9 deletions

View File

@ -113,7 +113,7 @@ Panels::LanguageSelectionPanel::LanguageSelectionPanel( wxWindow* parent, bool s
compiled[i].Printf( L"%s", m_langs[i].englishName.c_str() );
m_picker = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
size, compiled.GetPtr(), wxCB_READONLY | wxCB_SORT );
size, compiled.GetPtr(), wxCB_READONLY);
*this += 5;
*this += m_picker | pxSizerFlags::StdSpace();

View File

@ -59,14 +59,7 @@ LangPackEnumeration::LangPackEnumeration( wxLanguage langId )
LangPackEnumeration::LangPackEnumeration()
{
wxLangId = wxLANGUAGE_DEFAULT;
#if wxMAJOR_VERSION < 3
englishName = L"_System Default"; // left-side space forces it to sort to the front of the lists
#else
// It seems wx change its sort algo... It seems non alphanumeric character are removed
englishName = L"0) System Default"; // left-side 0) forces it to sort to the front of the lists
// This one can work too
//englishName = L"A default";
#endif
englishName = L"System Default";
englishName += _(" (default)");
canonicalName = L"default";