From 8d67e139719bedbf168d4968d73ad49070ed05c2 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 1 May 2019 07:53:19 +0800 Subject: [PATCH] Cleaning up unicode conversion --- .../world_editor_graph_plugin/graph_plugin.cpp | 12 ++++++------ .../world_editor_shard_monitor_plugin/plugin.cpp | 4 ++-- .../world_editor_sound_plugin/DialogFlags.cpp | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/graph_plugin.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/graph_plugin.cpp index d42b14eb8..aacc4a253 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/graph_plugin.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_graph_plugin/graph_plugin.cpp @@ -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())); } } } \ No newline at end of file diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/plugin.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/plugin.cpp index 72453fa70..30922cf1f 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/plugin.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/plugin.cpp @@ -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: { diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/DialogFlags.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/DialogFlags.cpp index 55cbbd25c..bf0857c39 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/DialogFlags.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_sound_plugin/DialogFlags.cpp @@ -118,7 +118,7 @@ void CDialogFlags::init(CSoundPlugin *plugin) for (uint i =0; i(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) {