diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-29 12:36:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-29 12:36:34 +0000 |
commit | 428bf0cbd77813a43094cb5c984436deff251936 (patch) | |
tree | d7dfa8971153d53a849e45c942be97fe5b90b7ec /protocols/WhatsApp/src/chat.cpp | |
parent | 82ef17ca5286f58ae7af604fb9518e8dc496b7c3 (diff) |
no more TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/chat.cpp')
-rw-r--r-- | protocols/WhatsApp/src/chat.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/WhatsApp/src/chat.cpp b/protocols/WhatsApp/src/chat.cpp index 26a46bec48..eded520031 100644 --- a/protocols/WhatsApp/src/chat.cpp +++ b/protocols/WhatsApp/src/chat.cpp @@ -85,7 +85,7 @@ int WhatsAppProto::onGroupChatEvent(WPARAM, LPARAM lParam) setWord(hContact, "Status", ID_STATUS_ONLINE);
db_set_b(hContact, "CList", "Hidden", 1);
- setTString(hContact, "Nick", gch->ptszUID);
+ setWString(hContact, "Nick", gch->ptszUID);
db_set_dw(hContact, "Ignore", "Mask1", 0);
}
CallService(MS_MSG_SENDMESSAGE, hContact, 0);
@@ -145,8 +145,8 @@ void WhatsAppProto::ChatLogMenuHook(WAChatInfo *pInfo, struct GCHOOK *gch) void WhatsAppProto::EditChatSubject(WAChatInfo *pInfo)
{
- CMString title(FORMAT, TranslateT("Set new subject for %s"), pInfo->tszNick);
- ptrW tszOldValue(getTStringA(pInfo->hContact, WHATSAPP_KEY_NICK));
+ CMStringW title(FORMAT, TranslateT("Set new subject for %s"), pInfo->tszNick);
+ ptrW tszOldValue(getWStringA(pInfo->hContact, WHATSAPP_KEY_NICK));
ENTER_STRING es = { 0 };
es.cbSize = sizeof(es);
@@ -225,7 +225,7 @@ void WhatsAppProto::AddChatUser(WAChatInfo*, const wchar_t *ptszJid) PROTOSEARCHRESULT psr = { 0 };
psr.cbSize = sizeof(psr);
- psr.flags = PSR_TCHAR;
+ psr.flags = PSR_UNICODE;
psr.id.w = (wchar_t*)ptszJid;
psr.nick.w = GetChatUserNick(jid);
@@ -253,7 +253,7 @@ void WhatsAppProto::KickChatUser(WAChatInfo *pInfo, const wchar_t *ptszJid) int WhatsAppProto::OnDeleteChat(WPARAM hContact, LPARAM)
{
if (isChatRoom(hContact) && isOnline()) {
- ptrW tszID(getTStringA(hContact, WHATSAPP_KEY_ID));
+ ptrW tszID(getWStringA(hContact, WHATSAPP_KEY_ID));
if (tszID)
m_pConnection->sendJoinLeaveGroup(_T2A(tszID), false);
}
@@ -314,7 +314,7 @@ WAChatInfo* WhatsAppProto::InitChat(const std::string &jid, const std::string &n GCDEST gcd = { m_szModuleName, ptszJid, GC_EVENT_ADDGROUP };
GCEVENT gce = { sizeof(gce), &gcd };
for (int i = _countof(sttStatuses) - 1; i >= 0; i--) {
- gce.ptszStatus = TranslateTS(sttStatuses[i]);
+ gce.ptszStatus = TranslateW(sttStatuses[i]);
CallServiceSync(MS_GC_EVENT, NULL, (LPARAM)&gce);
}
@@ -419,7 +419,7 @@ void WhatsAppProto::onGroupNewSubject(const std::string &gjid, const std::string return;
ptrW tszText(str2t(newSubject));
- ptrW tszTextDb(getTStringA(pInfo->hContact, WHATSAPP_KEY_NICK));
+ ptrW tszTextDb(getWStringA(pInfo->hContact, WHATSAPP_KEY_NICK));
if (!mir_wstrcmp(tszText, tszTextDb)) // notify about subject change only if differs from the stored one
return;
@@ -436,7 +436,7 @@ void WhatsAppProto::onGroupNewSubject(const std::string &gjid, const std::string gce.ptszText = tszText;
CallServiceSync(MS_GC_EVENT, NULL, (LPARAM)&gce);
- setTString(pInfo->hContact, WHATSAPP_KEY_NICK, tszText);
+ setWString(pInfo->hContact, WHATSAPP_KEY_NICK, tszText);
}
void WhatsAppProto::onGroupAddUser(const std::string &gjid, const std::string &ujid, int ts)
|