summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/contacts.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
commit6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch)
tree2e8bb660c908b54914abd562af8aafa4a486c846 /protocols/WhatsApp/src/contacts.cpp
parenta61c8728b379057fe7f0a0d86fe0b037598229dd (diff)
less TCHARs:
- TCHAR is replaced with wchar_t everywhere; - LPGENT replaced with either LPGENW or LPGEN; - fixes for ANSI plugins that improperly used _t functions; - TCHAR *t removed from MAllStrings; - ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz* git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/contacts.cpp')
-rw-r--r--protocols/WhatsApp/src/contacts.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/WhatsApp/src/contacts.cpp b/protocols/WhatsApp/src/contacts.cpp
index 3dfeec59a1..2c9f0c17e9 100644
--- a/protocols/WhatsApp/src/contacts.cpp
+++ b/protocols/WhatsApp/src/contacts.cpp
@@ -133,11 +133,11 @@ void WhatsAppProto::UpdateStatusMsg(MCONTACT hContact)
bool denied = getBool(hContact, WHATSAPP_KEY_LAST_SEEN_DENIED, false);
if (lastSeen > 0) {
time_t ts = lastSeen;
- TCHAR stzLastSeen[MAX_PATH];
+ wchar_t stzLastSeen[MAX_PATH];
if (status == ID_STATUS_ONLINE)
- _tcsftime(stzLastSeen, _countof(stzLastSeen), TranslateT("Last online on %x at %X"), localtime(&ts));
+ wcsftime(stzLastSeen, _countof(stzLastSeen), TranslateT("Last online on %x at %X"), localtime(&ts));
else
- _tcsftime(stzLastSeen, _countof(stzLastSeen), denied ? TranslateT("Denied: Last online on %x at %X") : TranslateT("Last seen on %x at %X"), localtime(&ts));
+ wcsftime(stzLastSeen, _countof(stzLastSeen), denied ? TranslateT("Denied: Last online on %x at %X") : TranslateT("Last seen on %x at %X"), localtime(&ts));
ss << stzLastSeen;
}
@@ -162,15 +162,15 @@ void WhatsAppProto::onSendGetPicture(const std::string &jid, const std::vector<u
debugLogA("Updating avatar for jid %s", jid.c_str());
// Save avatar
- std::tstring filename = GetAvatarFileName(hContact);
- FILE *f = _tfopen(filename.c_str(), L"wb");
+ std::wstring filename = GetAvatarFileName(hContact);
+ FILE *f = _wfopen(filename.c_str(), L"wb");
size_t r = fwrite(std::string(data.begin(), data.end()).c_str(), 1, data.size(), f);
fclose(f);
PROTO_AVATAR_INFORMATION ai = { 0 };
ai.hContact = hContact;
ai.format = PA_FORMAT_JPEG;
- _tcsncpy_s(ai.filename, filename.c_str(), _TRUNCATE);
+ wcsncpy_s(ai.filename, filename.c_str(), _TRUNCATE);
int ackResult;
if (r > 0) {
@@ -184,7 +184,7 @@ void WhatsAppProto::onSendGetPicture(const std::string &jid, const std::vector<u
}
}
-TCHAR* WhatsAppProto::GetContactDisplayName(const string& jid)
+wchar_t* WhatsAppProto::GetContactDisplayName(const string& jid)
{
MCONTACT hContact = ContactIDToHContact(jid);
return (hContact) ? pcli->pfnGetContactDisplayName(hContact, 0) : L"none";