convert name, notes and creator to wxstring using *wxConvCurrent instead of FromAscii. fix issue 5069

This commit is contained in:
LPFaint99 2012-01-31 23:49:47 -08:00
parent a78c5f984f
commit d6de53f235

View File

@ -78,7 +78,7 @@ void CodeConfigPanel::UpdateCodeList()
gcodes_end = m_gcodes.end();
for (; gcodes_iter!=gcodes_end; ++gcodes_iter)
{
m_listbox_gcodes->Append(wxString::FromAscii(gcodes_iter->name.c_str()));
m_listbox_gcodes->Append(wxString(gcodes_iter->name.c_str(), *wxConvCurrent));
if (gcodes_iter->enabled)
m_listbox_gcodes->Check(m_listbox_gcodes->GetCount()-1, true);
}
@ -111,7 +111,7 @@ void CodeConfigPanel::UpdateInfoBox(wxCommandEvent&)
if (sel > -1)
{
m_infobox.label_name->SetLabel(wxGetTranslation(wxstr_name) + wxString::FromAscii(m_gcodes[sel].name.c_str()));
m_infobox.label_name->SetLabel(wxGetTranslation(wxstr_name) + wxString(m_gcodes[sel].name.c_str(), *wxConvCurrent));
// notes textctrl
m_infobox.textctrl_notes->Clear();
@ -119,10 +119,10 @@ void CodeConfigPanel::UpdateInfoBox(wxCommandEvent&)
notes_iter = m_gcodes[sel].notes.begin(),
notes_end = m_gcodes[sel].notes.end();
for (; notes_iter!=notes_end; ++notes_iter)
m_infobox.textctrl_notes->AppendText(wxString::FromAscii(notes_iter->c_str()));
m_infobox.textctrl_notes->AppendText(wxString(notes_iter->c_str(), *wxConvCurrent));
m_infobox.textctrl_notes->ScrollLines(-99); // silly
m_infobox.label_creator->SetLabel(wxGetTranslation(wxstr_creator) + wxString::FromAscii(m_gcodes[sel].creator.c_str()));
m_infobox.label_creator->SetLabel(wxGetTranslation(wxstr_creator) + wxString(m_gcodes[sel].creator.c_str(), *wxConvCurrent));
// add codes to info listbox
std::vector<GeckoCode::Code>::const_iterator