From 50139a394b3fad6096c1e58325cc852bb9b49e83 Mon Sep 17 00:00:00 2001 From: ayuanx Date: Tue, 29 Dec 2009 18:25:45 +0000 Subject: [PATCH] More multi-byte display fix git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4750 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp | 4 ++-- Source/Core/DolphinWX/Src/CheatsWindow.cpp | 4 ++-- Source/Core/DolphinWX/Src/GameListCtrl.cpp | 10 +++++----- Source/Core/DolphinWX/Src/ISOProperties.cpp | 10 +++++----- Source/Core/DolphinWX/Src/PatchAddEdit.cpp | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp b/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp index a977bb763b..8d04fe8b56 100644 --- a/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp +++ b/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp @@ -48,7 +48,7 @@ void CARCodeAddEdit::CreateGUIControls(int _selection) } else { - currentName = wxString::FromAscii(arCodes.at(_selection).name.c_str()); + currentName = wxString(arCodes.at(_selection).name.c_str(), *wxConvCurrent); tempEntries = arCodes.at(_selection); } @@ -94,7 +94,7 @@ void CARCodeAddEdit::OnClose(wxCloseEvent& WXUNUSED (event)) void CARCodeAddEdit::ChangeEntry(wxSpinEvent& event) { ActionReplay::ARCode currentCode = arCodes.at((int)arCodes.size() - event.GetPosition()); - EditCheatName->SetValue(wxString::FromAscii(currentCode.name.c_str())); + EditCheatName->SetValue(wxString(currentCode.name.c_str(), *wxConvCurrent)); UpdateTextCtrl(currentCode); } diff --git a/Source/Core/DolphinWX/Src/CheatsWindow.cpp b/Source/Core/DolphinWX/Src/CheatsWindow.cpp index 08659c805d..12e1bf1a6b 100644 --- a/Source/Core/DolphinWX/Src/CheatsWindow.cpp +++ b/Source/Core/DolphinWX/Src/CheatsWindow.cpp @@ -147,7 +147,7 @@ void wxCheatsWindow::Load_ARCodes() { ARCode code = GetARCode(i); ARCodeIndex ind; - u32 index = m_CheckListBox_CheatsList->Append(wxString::FromAscii(code.name.c_str())); + u32 index = m_CheckListBox_CheatsList->Append(wxString(code.name.c_str(), *wxConvCurrent)); m_CheckListBox_CheatsList->Check(index, code.active); ind.index = i; ind.uiIndex = index; @@ -162,7 +162,7 @@ void wxCheatsWindow::OnEvent_CheatsList_ItemSelected(wxCommandEvent& WXUNUSED (e if ((int)indexList[i].uiIndex == index) { ARCode code = GetARCode(i); - m_Label_Codename->SetLabel(wxT("Name: ") + wxString::FromAscii(code.name.c_str())); + m_Label_Codename->SetLabel(wxT("Name: ") + wxString(code.name.c_str(), *wxConvCurrent)); char text[CHAR_MAX]; char* numcodes = text; sprintf(numcodes, "Number of Codes: %lu", (unsigned long)code.ops.size()); diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index d4d9327802..b4f30247ae 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -499,7 +499,7 @@ void CGameListCtrl::ScanForISOs() wxString msg; char tempstring[128]; sprintf(tempstring,"Scanning %s", FileName.c_str()); - msg = wxString::FromAscii(tempstring); + msg = wxString(tempstring, *wxConvCurrent); // Update with the progress (i) and the message (msg) bool Cont = dialog.Update(i, msg); @@ -763,7 +763,7 @@ void CGameListCtrl::OnMouseMotion(wxMouseEvent& event) { char temp[2048]; sprintf(temp, "^ %s%s%s", emuState[nState -1].c_str(), issues.size() > 0 ? " :\n" : "", issues.c_str()); - toolTip = new wxEmuStateTip(this, wxString::FromAscii(temp), &toolTip); + toolTip = new wxEmuStateTip(this, wxString(temp, *wxConvCurrent), &toolTip); } else toolTip = new wxEmuStateTip(this, wxT("Not Set"), &toolTip); @@ -1050,7 +1050,7 @@ void CGameListCtrl::CompressSelection(bool _compress) void CGameListCtrl::CompressCB(const char* text, float percent, void* arg) { - ((wxProgressDialog*)arg)->Update((int)(percent*1000), wxString::FromAscii(text)); + ((wxProgressDialog*)arg)->Update((int)(percent*1000), wxString(text, *wxConvCurrent)); } void CGameListCtrl::OnCompressGCM(wxCommandEvent& WXUNUSED (event)) @@ -1068,7 +1068,7 @@ void CGameListCtrl::OnCompressGCM(wxCommandEvent& WXUNUSED (event)) { path = wxFileSelector( _T("Save decompressed ISO"), - wxEmptyString, wxString::FromAscii(FileName.c_str()), wxEmptyString, + wxEmptyString, wxString(FileName.c_str(), *wxConvCurrent), wxEmptyString, wxString::Format ( _T("All GC/Wii ISO files (gcm)|*.gcm|All files (%s)|%s"), @@ -1087,7 +1087,7 @@ void CGameListCtrl::OnCompressGCM(wxCommandEvent& WXUNUSED (event)) { path = wxFileSelector( _T("Save compressed ISO"), - wxEmptyString, wxString::FromAscii(FileName.c_str()), wxEmptyString, + wxEmptyString, wxString(FileName.c_str(), *wxConvCurrent), wxEmptyString, wxString::Format ( _T("All compressed GC/Wii ISO files (gcz)|*.gcz|All files (%s)|%s"), diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index ececd3ba24..7b38f458fd 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -865,7 +865,7 @@ void CISOProperties::LoadGameConfig() GameIni.Get("EmuState", "EmulationIssues", &sTemp); if (!sTemp.empty()) { - EmuIssues->SetValue(wxString::FromAscii(sTemp.c_str())); + EmuIssues->SetValue(wxString(sTemp.c_str(), *wxConvCurrent)); bRefreshList = true; } EmuIssues->Enable(EmuState->GetSelection() != 0); @@ -951,7 +951,7 @@ bool CISOProperties::SaveGameConfig() else GameIni.Set("EmuState", "EmulationStateId", EmuState->GetSelection()); - GameIni.Set("EmuState", "EmulationIssues", (const char*)EmuIssues->GetValue().mb_str(wxConvUTF8)); + GameIni.Set("EmuState", "EmulationIssues", (const char*)EmuIssues->GetValue().mb_str(*wxConvCurrent)); PatchList_Save(); ActionReplayList_Save(); @@ -1024,7 +1024,7 @@ void CISOProperties::PatchList_Load() for (std::vector::const_iterator it = onFrame.begin(); it != onFrame.end(); ++it) { PatchEngine::Patch p = *it; - Patches->Append(wxString::FromAscii(p.name.c_str())); + Patches->Append(wxString(p.name.c_str(), *wxConvCurrent)); Patches->Check(index, p.active); ++index; } @@ -1068,7 +1068,7 @@ void CISOProperties::PatchButtonClicked(wxCommandEvent& event) CPatchAddEdit dlg(-1, this, 1, _("Add Patch")); if (dlg.ShowModal() == wxID_OK) { - Patches->Append(wxString::FromAscii(onFrame.back().name.c_str())); + Patches->Append(wxString(onFrame.back().name.c_str(), *wxConvCurrent)); Patches->Check((unsigned int)(onFrame.size() - 1), onFrame.back().active); } } @@ -1097,7 +1097,7 @@ void CISOProperties::ActionReplayList_Load() for (std::vector::const_iterator it = arCodes.begin(); it != arCodes.end(); ++it) { ActionReplay::ARCode arCode = *it; - Cheats->Append(wxString::FromAscii(arCode.name.c_str())); + Cheats->Append(wxString(arCode.name.c_str(), *wxConvCurrent)); Cheats->Check(index, arCode.active); ++index; } diff --git a/Source/Core/DolphinWX/Src/PatchAddEdit.cpp b/Source/Core/DolphinWX/Src/PatchAddEdit.cpp index 908ccd4306..8ba0dff694 100644 --- a/Source/Core/DolphinWX/Src/PatchAddEdit.cpp +++ b/Source/Core/DolphinWX/Src/PatchAddEdit.cpp @@ -49,7 +49,7 @@ void CPatchAddEdit::CreateGUIControls(int _selection) } else { - currentName = wxString::FromAscii(onFrame.at(_selection).name.c_str()); + currentName = wxString(onFrame.at(_selection).name.c_str(), *wxConvCurrent); tempEntries = onFrame.at(_selection).entries; }