From 428bf0cbd77813a43094cb5c984436deff251936 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 29 Jul 2016 12:36:34 +0000 Subject: no more TCHARs git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Omegle/src/chat.cpp | 4 ++-- protocols/Omegle/src/communication.cpp | 12 ++++++------ protocols/Omegle/src/dialogs.cpp | 4 ++-- protocols/Omegle/src/proto.cpp | 12 ++++++------ 4 files changed, 16 insertions(+), 16 deletions(-) (limited to 'protocols/Omegle/src') diff --git a/protocols/Omegle/src/chat.cpp b/protocols/Omegle/src/chat.cpp index 73fc40ea11..3cc30faaaf 100644 --- a/protocols/Omegle/src/chat.cpp +++ b/protocols/Omegle/src/chat.cpp @@ -331,10 +331,10 @@ void OmegleProto::SetChatStatus(int status) if (status == ID_STATUS_ONLINE) { // Load actual name from database - facy.nick_ = db_get_tsa(NULL, m_szModuleName, OMEGLE_KEY_NAME); + facy.nick_ = db_get_wsa(NULL, m_szModuleName, OMEGLE_KEY_NAME); if (facy.nick_ == NULL) { facy.nick_ = mir_wstrdup(TranslateT("You")); - db_set_ts(NULL, m_szModuleName, OMEGLE_KEY_NAME, facy.nick_); + db_set_ws(NULL, m_szModuleName, OMEGLE_KEY_NAME, facy.nick_); } // Add self contact diff --git a/protocols/Omegle/src/communication.cpp b/protocols/Omegle/src/communication.cpp index 0e3abe9354..390de4c4cc 100644 --- a/protocols/Omegle/src/communication.cpp +++ b/protocols/Omegle/src/communication.cpp @@ -513,7 +513,7 @@ bool Omegle_client::events() } else if (name == "serverMessage") { ptrW message(json_as_string(json_at(item, 1))); - parent->UpdateChat(NULL, TranslateTS(message)); + parent->UpdateChat(NULL, TranslateW(message)); } else if (name == "connected") { // Stranger connected @@ -541,7 +541,7 @@ bool Omegle_client::events() likes += L", "; } - parent->debugLog(L"Got common likes: '%s'", likes.c_str()); + parent->debugLogW(L"Got common likes: '%s'", likes.c_str()); parent->SetTopic(likes.c_str()); } else if (name == "question") { @@ -557,7 +557,7 @@ bool Omegle_client::events() st.hIcon = IcoLib_GetIconByHandle(GetIconHandle("typing_on")); ptrW who(name == "spyTyping" ? json_as_string(json_at(item, 1)) : mir_wstrdup(L"Stranger")); - mir_snwprintf(st.tszText, TranslateT("%s is typing."), TranslateTS(who)); + mir_snwprintf(st.tszText, TranslateT("%s is typing."), TranslateW(who)); CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)parent->GetChatHandle(), (LPARAM)&st); } @@ -570,7 +570,7 @@ bool Omegle_client::events() st.hIcon = IcoLib_GetIconByHandle(GetIconHandle("typing_off")); ptrW who(name == "spyTyping" ? json_as_string(json_at(item, 1)) : mir_wstrdup(L"Stranger")); - mir_snwprintf(st.tszText, TranslateT("%s stopped typing."), TranslateTS(who)); + mir_snwprintf(st.tszText, TranslateT("%s stopped typing."), TranslateW(who)); CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)parent->GetChatHandle(), (LPARAM)&st); } @@ -615,7 +615,7 @@ bool Omegle_client::events() ptrW stranger(json_as_string(json_at(item, 1))); wchar_t strT[255]; - mir_snwprintf(strT, TranslateT("%s disconnected."), TranslateTS(stranger)); + mir_snwprintf(strT, TranslateT("%s disconnected."), TranslateW(stranger)); parent->UpdateChat(NULL, strT); // Stranger disconnected @@ -640,7 +640,7 @@ bool Omegle_client::events() ptrW error(json_as_string(json_at(item, 1))); wchar_t strT[255]; - mir_snwprintf(strT, TranslateT("Error: %s"), TranslateTS(error)); + mir_snwprintf(strT, TranslateT("Error: %s"), TranslateW(error)); parent->UpdateChat(NULL, strT); } } diff --git a/protocols/Omegle/src/dialogs.cpp b/protocols/Omegle/src/dialogs.cpp index 206f3af30e..259e34d2e8 100644 --- a/protocols/Omegle/src/dialogs.cpp +++ b/protocols/Omegle/src/dialogs.cpp @@ -38,7 +38,7 @@ static BOOL StoreDBCheckState(OmegleProto* ppro, HWND hwnd, int idCtrl, const ch static void LoadDBText(OmegleProto* ppro, HWND hwnd, int idCtrl, const char* szSetting) { - ptrW tstr(db_get_tsa(NULL, ppro->m_szModuleName, szSetting)); + ptrW tstr(db_get_wsa(NULL, ppro->m_szModuleName, szSetting)); if (tstr) SetDlgItemText(hwnd, idCtrl, tstr); } @@ -49,7 +49,7 @@ static void StoreDBText(OmegleProto* ppro, HWND hwnd, int idCtrl, const char* sz GetDlgItemText(hwnd, idCtrl, tstr, _countof(tstr)); if (tstr[0] != '\0') { - db_set_ts(NULL, ppro->m_szModuleName, szSetting, tstr); + db_set_ws(NULL, ppro->m_szModuleName, szSetting, tstr); } else { db_unset(NULL, ppro->m_szModuleName, szSetting); diff --git a/protocols/Omegle/src/proto.cpp b/protocols/Omegle/src/proto.cpp index ee0b34a616..91d79f0d5f 100644 --- a/protocols/Omegle/src/proto.cpp +++ b/protocols/Omegle/src/proto.cpp @@ -44,7 +44,7 @@ PROTO(proto_name, username) // Create standard network connection wchar_t descr[512]; NETLIBUSER nlu = { sizeof(nlu) }; - nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR; + nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; nlu.szSettingsModule = m_szModuleName; mir_snwprintf(descr, TranslateT("%s server connection"), m_tszUserName); nlu.ptszDescriptiveName = descr; @@ -57,10 +57,10 @@ PROTO(proto_name, username) facy.set_handle(m_hNetlibUser); - SkinAddNewSoundExT("StrangerTyp", m_tszUserName, LPGENW("Stranger is typing")); - SkinAddNewSoundExT("StrangerTypStop", m_tszUserName, LPGENW("Stranger stopped typing")); - SkinAddNewSoundExT("StrangerChange", m_tszUserName, LPGENW("Changing stranger")); - SkinAddNewSoundExT("StrangerMessage", m_tszUserName, LPGENW("Receive message")); + SkinAddNewSoundExW("StrangerTyp", m_tszUserName, LPGENW("Stranger is typing")); + SkinAddNewSoundExW("StrangerTypStop", m_tszUserName, LPGENW("Stranger stopped typing")); + SkinAddNewSoundExW("StrangerChange", m_tszUserName, LPGENW("Changing stranger")); + SkinAddNewSoundExW("StrangerMessage", m_tszUserName, LPGENW("Receive message")); } OmegleProto::~OmegleProto() @@ -183,7 +183,7 @@ int OmegleProto::OnOptionsInit(WPARAM wParam, LPARAM) odp.hInstance = g_hInstance; odp.pwszTitle = m_tszUserName; odp.dwInitParam = LPARAM(this); - odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE; + odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE; odp.position = 271828; odp.pwszGroup = LPGENW("Network"); -- cgit v1.2.3