Cleaning up unicode conversion

This commit is contained in:
kaetemi 2019-05-01 07:53:19 +08:00
parent 09225503fc
commit 8d67e13971
3 changed files with 10 additions and 10 deletions

View file

@ -172,7 +172,7 @@ void CGraphPlugin::refreshPrimitives()
{
string msg("Can't write script file '");
msg += tmpPath+"/lang.dot'";
AfxMessageBox(utf8ToTStr(msg));
AfxMessageBox(nlUtf8ToTStr(msg));
}
else
{
@ -207,11 +207,11 @@ void CGraphPlugin::refreshPrimitives()
err = toString("%s : %s", primName.c_str(), e.Why.c_str());
}
AfxMessageBox(utf8ToTStr(err));
AfxMessageBox(nlUtf8ToTStr(err));
}
catch (const exception &e) //catch a possible exception from getRootFileName
{
AfxMessageBox(utf8ToTStr(e.what()));
AfxMessageBox(nlUtf8ToTStr(e.what()));
}
}
else
@ -254,7 +254,7 @@ void CGraphPlugin::refreshMachine()
{
string msg("Can't write script file '");
msg += tmpPath+"/lang.dot'";
AfxMessageBox(utf8ToTStr(msg));
AfxMessageBox(nlUtf8ToTStr(msg));
}
else
{
@ -298,7 +298,7 @@ void CGraphPlugin::refreshMachine()
{
string msg("Can't write script file '");
msg += tmpPath+"/lang.dot'";
AfxMessageBox(utf8ToTStr(msg));
AfxMessageBox(nlUtf8ToTStr(msg));
}
else
{
@ -940,7 +940,7 @@ void CGraphPlugin::doSelection(const string& primPath)
}
catch(const exception &e)
{
GraphDlg->MessageBox(utf8ToTStr(e.what()));
GraphDlg->MessageBox(nlUtf8ToTStr(e.what()));
}
}
}

View file

@ -1189,7 +1189,7 @@ void CPlugin::updateConnectionState()
// Change the text
_DialogFlag->ConnectCtrl.SetWindowText (getStringRsc(IDS_DISCONNECT));
_DialogFlag->State = (LPCTSTR) (getStringRsc(IDS_CONNECTED_TO) + _SHost.c_str());
_DialogFlag->Sent = CString(utf8ToTStr(toString (_Client->getBytesSent ()))) + getStringRsc(IDS_BYTE_SENT);
_DialogFlag->Sent = CString(nlUtf8ToTStr(toString(_Client->getBytesSent()))) + getStringRsc(IDS_BYTE_SENT);
//_DialogFlag->Received = (toString ((uint32)_Client->getBytesReceived ()) + " bytes received").c_str();
_DialogFlag->Received = (toString("%.1f", bandwidth/1024.0) + " kB/s").c_str();
_DialogFlag->DownloadValue = (toString("%.1f kB/s", _DialogFlag->Download/1024.0)).c_str();
@ -1198,7 +1198,7 @@ void CPlugin::updateConnectionState()
break;
case WaitingServerParams:
_DialogFlag->ConnectCtrl.SetWindowText (getStringRsc(IDS_CANCEL_CONNECT));
_DialogFlag->State = getStringRsc(IDS_WAITING_SERVER_PARAMS) + utf8ToTStr(_SHost);
_DialogFlag->State = getStringRsc(IDS_WAITING_SERVER_PARAMS) + nlUtf8ToTStr(_SHost);
break;
case WaitingLoginConfirmation:
{

View file

@ -118,7 +118,7 @@ void CDialogFlags::init(CSoundPlugin *plugin)
for (uint i =0; i<NLSOUND::UAudioMixer::TBackgroundFlags::NB_BACKGROUND_FLAGS; ++i)
{
static_cast<CButton*>(GetDlgItem(BG_FLAG_ID[i]))->SetCheck(flags.Flags[i] ? 1 : 0);
GetDlgItem(BG_FLAG_ID[i])->SetWindowText(utf8ToTStr(_Mixer->getBackgroundFlagName(i)));
GetDlgItem(BG_FLAG_ID[i])->SetWindowText(nlUtf8ToTStr(_Mixer->getBackgroundFlagName(i)));
}
@ -229,7 +229,7 @@ void CDialogFlags::OnTimer(UINT_PTR nIDEvent)
_stprintf(temp, _T("%6.2f"), SampleBanks[i].second / (1024.0f*1024.0f));
TCHAR bankName[1024];
_tcscpy_s(bankName, 1024, utf8ToTStr(SampleBanks[i].first));
_tcscpy_s(bankName, 1024, nlUtf8ToTStr(SampleBanks[i].first));
if (i < c)
{