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/Tox/src/tox_contacts.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'protocols/Tox/src/tox_contacts.cpp') diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index d3e094e0db..5abda14238 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -91,15 +91,15 @@ MCONTACT CToxProto::AddContact(const char *address, const char *nick, const char setString(hContact, TOX_SETTINGS_ID, address); if (mir_strlen(nick)) - setTString(hContact, "Nick", ptrW(mir_utf8decodeW(nick))); + setWString(hContact, "Nick", ptrW(mir_utf8decodeW(nick))); if (mir_strlen(dnsId)) - setTString(hContact, TOX_SETTINGS_DNS, ptrW(mir_utf8decodeW(dnsId))); + setWString(hContact, TOX_SETTINGS_DNS, ptrW(mir_utf8decodeW(dnsId))); DBVARIANT dbv; - if (!getTString(TOX_SETTINGS_GROUP, &dbv)) + if (!getWString(TOX_SETTINGS_GROUP, &dbv)) { - db_set_ts(hContact, "CList", "Group", dbv.ptszVal); + db_set_ws(hContact, "CList", "Group", dbv.ptszVal); db_free(&dbv); } @@ -149,7 +149,7 @@ void CToxProto::LoadFriendList(void*) TOX_ERR_FRIEND_QUERY getNameResult; uint8_t nick[TOX_MAX_NAME_LENGTH] = { 0 }; if (tox_friend_get_name(toxThread->Tox(), friendNumber, nick, &getNameResult)) - setTString(hContact, "Nick", ptrW(mir_utf8decodeW((char*)nick))); + setWString(hContact, "Nick", ptrW(mir_utf8decodeW((char*)nick))); else debugLogA(__FUNCTION__": failed to get friend name (%d)", getNameResult); @@ -188,7 +188,7 @@ INT_PTR CToxProto::OnRequestAuth(WPARAM hContact, LPARAM lParam) uint8_t nick[TOX_MAX_NAME_LENGTH] = { 0 }; TOX_ERR_FRIEND_QUERY errorFriendQuery; if (tox_friend_get_name(toxThread->Tox(), friendNumber, nick, &errorFriendQuery)) - setTString(hContact, "Nick", ptrW(mir_utf8decodeW((char*)nick))); + setWString(hContact, "Nick", ptrW(mir_utf8decodeW((char*)nick))); else debugLogA(__FUNCTION__": failed to get friend name (%d)", errorFriendQuery); @@ -292,7 +292,7 @@ void CToxProto::OnFriendNameChange(Tox*, uint32_t friendNumber, const uint8_t *n rawName[length] = 0; ptrW nickname(mir_utf8decodeW(rawName)); - proto->setTString(hContact, "Nick", nickname); + proto->setWString(hContact, "Nick", nickname); } } @@ -307,7 +307,7 @@ void CToxProto::OnStatusMessageChanged(Tox*, uint32_t friendNumber, const uint8_ rawMessage[length] = 0; ptrW statusMessage(mir_utf8decodeW(rawMessage)); - db_set_ts(hContact, "CList", "StatusMsg", statusMessage); + db_set_ws(hContact, "CList", "StatusMsg", statusMessage); } } @@ -398,7 +398,7 @@ int CToxProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) if (szProto != NULL && !mir_strcmp(szProto, m_szModuleName)) { OPTIONSDIALOGPAGE odp = { sizeof(odp) }; - odp.flags = ODPF_TCHAR | ODPF_DONTTRANSLATE; + odp.flags = ODPF_UNICODE | ODPF_DONTTRANSLATE; odp.hInstance = g_hInstance; odp.dwInitParam = (LPARAM)this; odp.pwszTitle = m_tszUserName; @@ -441,7 +441,7 @@ INT_PTR CToxProto::UserInfoProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar break; } - SetDlgItemText(hwnd, IDC_DNS_ID, ptrW(proto->getTStringA(hContact, TOX_SETTINGS_DNS))); + SetDlgItemText(hwnd, IDC_DNS_ID, ptrW(proto->getWStringA(hContact, TOX_SETTINGS_DNS))); } break; @@ -458,7 +458,7 @@ INT_PTR CToxProto::UserInfoProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar } wchar_t dnsId[MAX_PATH]; GetDlgItemText(hwnd, IDC_DNS_ID, dnsId, MAX_PATH); - proto->setTString(hContact, TOX_SETTINGS_DNS, dnsId); + proto->setWString(hContact, TOX_SETTINGS_DNS, dnsId); break; } break; @@ -471,8 +471,6 @@ INT_PTR CToxProto::UserInfoProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0); } break; - - break; } return FALSE; -- cgit v1.2.3