summaryrefslogtreecommitdiff
path: root/protocols/VKontakte
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
commit8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch)
tree94ef8927e12043ed6dcc15e1e640d68a8add520e /protocols/VKontakte
parent1e273e28d89b5838e3d0f0cafac9676577cb71ce (diff)
hello, Unix.
phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r--protocols/VKontakte/src/misc.cpp274
-rw-r--r--protocols/VKontakte/src/vk_avatars.cpp8
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp66
-rw-r--r--protocols/VKontakte/src/vk_dialogs.cpp2
-rw-r--r--protocols/VKontakte/src/vk_feed.cpp148
-rw-r--r--protocols/VKontakte/src/vk_files.cpp16
-rw-r--r--protocols/VKontakte/src/vk_history.cpp12
-rw-r--r--protocols/VKontakte/src/vk_messages.cpp6
-rw-r--r--protocols/VKontakte/src/vk_options.cpp20
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp4
-rw-r--r--protocols/VKontakte/src/vk_search.cpp8
-rw-r--r--protocols/VKontakte/src/vk_status.cpp8
-rw-r--r--protocols/VKontakte/src/vk_struct.cpp6
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp16
14 files changed, 297 insertions, 297 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index be8e69cb1f..0e835a8e35 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -594,46 +594,46 @@ void CVkProto::SetMirVer(MCONTACT hContact, int platform)
switch (platform) {
case VK_APP_ID:
- MirVer = _T("Miranda NG VKontakte");
+ MirVer = L"Miranda NG VKontakte";
break;
case 2386311:
- MirVer = _T("QIP 2012 VKontakte");
+ MirVer = L"QIP 2012 VKontakte";
break;
case 1:
- MirVer = _T("VKontakte (Mobile)");
+ MirVer = L"VKontakte (Mobile)";
break;
case 3087106: // iPhone
case 3140623:
case 2:
- MirVer = _T("VKontakte (iPhone)");
+ MirVer = L"VKontakte (iPhone)";
break;
case 3682744: // iPad
case 3:
- MirVer = _T("VKontakte (iPad)");
+ MirVer = L"VKontakte (iPad)";
break;
case 2685278: // Android - Kate
- MirVer = _T("Kate Mobile (Android)");
+ MirVer = L"Kate Mobile (Android)";
break;
case 2890984: // Android
case 2274003:
case 4:
- MirVer = _T("VKontakte (Android)");
+ MirVer = L"VKontakte (Android)";
break;
case 3059453: // Windows Phone
case 2424737:
case 3502561:
case 5:
- MirVer = _T("VKontakte (WPhone)");
+ MirVer = L"VKontakte (WPhone)";
break;
case 3584591: // Windows 8.x
case 6:
- MirVer = _T("VKontakte (Windows)");
+ MirVer = L"VKontakte (Windows)";
break;
case 7:
- MirVer = _T("VKontakte (Website)");
+ MirVer = L"VKontakte (Website)";
break;
default:
- MirVer = _T("VKontakte (Other)");
+ MirVer = L"VKontakte (Other)";
bSetFlag = OldMirVer.IsEmpty();
}
@@ -679,7 +679,7 @@ void CVkProto::SetSrmmReadStatus(MCONTACT hContact)
TCHAR ttime[64];
_locale_t locale = _create_locale(LC_ALL, "");
- _tcsftime_l(ttime, _countof(ttime), _T("%X - %x"), localtime(&time), locale);
+ _tcsftime_l(ttime, _countof(ttime), L"%X - %x", localtime(&time), locale);
_free_locale(locale);
StatusTextData st = { 0 };
@@ -834,36 +834,36 @@ CMString CVkProto::SpanVKNotificationType(CMString& tszType, VKObjType& vkFeedba
{
CVKNotification vkNotification[] = {
// type, parent, feedback, string for translate
- { _T("group"), vkInvite, vkNull, TranslateT("has invited you to a group") },
- { _T("page"), vkInvite, vkNull, TranslateT("has invited you to subscribe to a page") },
- { _T("event"), vkInvite, vkNull, TranslateT("invites you to event") },
-
- { _T("follow"), vkNull, vkUsers, _T("") },
- { _T("friend_accepted"), vkNull, vkUsers, _T("") },
- { _T("mention"), vkNull, vkPost, _T("") },
- { _T("wall"), vkNull, vkPost, _T("") },
- { _T("wall_publish"), vkNull, vkPost, _T("") },
-
- { _T("comment_post"), vkPost, vkComment, TranslateT("commented on your post") },
- { _T("comment_photo"), vkPhoto, vkComment, TranslateT("commented on your photo") },
- { _T("comment_video"), vkVideo, vkComment, TranslateT("commented on your video") },
- { _T("reply_comment"), vkComment, vkComment, TranslateT("replied to your comment") },
- { _T("reply_comment_photo"), vkComment, vkComment, TranslateT("replied to your comment to photo") },
- { _T("reply_comment_video"), vkComment, vkComment, TranslateT("replied to your comment to video") },
- { _T("reply_topic"), vkTopic, vkComment, TranslateT("replied to your topic") },
- { _T("like_post"), vkPost, vkUsers, TranslateT("liked your post") },
- { _T("like_comment"), vkComment, vkUsers, TranslateT("liked your comment") },
- { _T("like_photo"), vkPhoto, vkUsers, TranslateT("liked your photo") },
- { _T("like_video"), vkVideo, vkUsers, TranslateT("liked your video") },
- { _T("like_comment_photo"), vkComment, vkUsers, TranslateT("liked your comment to photo") },
- { _T("like_comment_video"), vkComment, vkUsers, TranslateT("liked your comment to video" ) },
- { _T("like_comment_topic"), vkComment, vkUsers, TranslateT("liked your comment to topic") },
- { _T("copy_post"), vkPost, vkCopy, TranslateT("shared your post") },
- { _T("copy_photo"), vkPhoto, vkCopy, TranslateT("shared your photo") },
- { _T("copy_video"), vkVideo, vkCopy, TranslateT("shared your video") },
- { _T("mention_comments"), vkPost, vkComment, _T("mentioned you in comment") },
- { _T("mention_comment_photo"), vkPhoto, vkComment, _T("mentioned you in comment to photo") },
- { _T("mention_comment_video"), vkVideo, vkComment, _T("mentioned you in comment to video") }
+ { L"group", vkInvite, vkNull, TranslateT("has invited you to a group") },
+ { L"page", vkInvite, vkNull, TranslateT("has invited you to subscribe to a page") },
+ { L"event", vkInvite, vkNull, TranslateT("invites you to event") },
+
+ { L"follow", vkNull, vkUsers, L"" },
+ { L"friend_accepted", vkNull, vkUsers, L"" },
+ { L"mention", vkNull, vkPost, L"" },
+ { L"wall", vkNull, vkPost, L"" },
+ { L"wall_publish", vkNull, vkPost, L"" },
+
+ { L"comment_post", vkPost, vkComment, TranslateT("commented on your post") },
+ { L"comment_photo", vkPhoto, vkComment, TranslateT("commented on your photo") },
+ { L"comment_video", vkVideo, vkComment, TranslateT("commented on your video") },
+ { L"reply_comment", vkComment, vkComment, TranslateT("replied to your comment") },
+ { L"reply_comment_photo", vkComment, vkComment, TranslateT("replied to your comment to photo") },
+ { L"reply_comment_video", vkComment, vkComment, TranslateT("replied to your comment to video") },
+ { L"reply_topic", vkTopic, vkComment, TranslateT("replied to your topic") },
+ { L"like_post", vkPost, vkUsers, TranslateT("liked your post") },
+ { L"like_comment", vkComment, vkUsers, TranslateT("liked your comment") },
+ { L"like_photo", vkPhoto, vkUsers, TranslateT("liked your photo") },
+ { L"like_video", vkVideo, vkUsers, TranslateT("liked your video") },
+ { L"like_comment_photo", vkComment, vkUsers, TranslateT("liked your comment to photo") },
+ { L"like_comment_video", vkComment, vkUsers, TranslateT("liked your comment to video" ) },
+ { L"like_comment_topic", vkComment, vkUsers, TranslateT("liked your comment to topic") },
+ { L"copy_post", vkPost, vkCopy, TranslateT("shared your post") },
+ { L"copy_photo", vkPhoto, vkCopy, TranslateT("shared your photo") },
+ { L"copy_video", vkVideo, vkCopy, TranslateT("shared your video") },
+ { L"mention_comments", vkPost, vkComment, L"mentioned you in comment" },
+ { L"mention_comment_photo", vkPhoto, vkComment, L"mentioned you in comment to photo" },
+ { L"mention_comment_video", vkVideo, vkComment, L"mentioned you in comment to video" }
};
CMString tszRes;
@@ -896,7 +896,7 @@ CMString CVkProto::GetVkPhotoItem(const JSONNode &jnPhoto, BBCSupport iBBC)
switch (m_vkOptions.iIMGBBCSupport) {
case imgNo:
- tszPreviewLink = _T("");
+ tszPreviewLink = L"";
break;
case imgFullSize:
tszPreviewLink = tszLink;
@@ -910,12 +910,12 @@ CMString CVkProto::GetVkPhotoItem(const JSONNode &jnPhoto, BBCSupport iBBC)
int iWidth = jnPhoto["width"].as_int();
int iHeight = jnPhoto["height"].as_int();
- tszRes.AppendFormat(_T("%s (%dx%d)"), SetBBCString(TranslateT("Photo"), iBBC, vkbbcUrl, tszLink), iWidth, iHeight);
+ tszRes.AppendFormat(L"%s (%dx%d)", SetBBCString(TranslateT("Photo"), iBBC, vkbbcUrl, tszLink), iWidth, iHeight);
if (m_vkOptions.iIMGBBCSupport && iBBC != bbcNo)
- tszRes.AppendFormat(_T("\n\t%s"), SetBBCString(!tszPreviewLink.IsEmpty() ? tszPreviewLink : (!tszLink.IsEmpty() ? tszLink : _T("")), bbcBasic, vkbbcImg));
+ tszRes.AppendFormat(L"\n\t%s", SetBBCString(!tszPreviewLink.IsEmpty() ? tszPreviewLink : (!tszLink.IsEmpty() ? tszLink : L""), bbcBasic, vkbbcImg));
CMString tszText(jnPhoto["text"].as_mstring());
if (!tszText.IsEmpty())
- tszRes += _T("\n") + tszText;
+ tszRes += L"\n" + tszText;
return tszRes;
}
@@ -923,33 +923,33 @@ CMString CVkProto::GetVkPhotoItem(const JSONNode &jnPhoto, BBCSupport iBBC)
CMString CVkProto::SetBBCString(LPCTSTR ptszString, BBCSupport iBBC, VKBBCType bbcType, LPCTSTR tszAddString)
{
CVKBBCItem bbcItem[] = {
- { vkbbcB, bbcNo, _T("%s") },
- { vkbbcB, bbcBasic, _T("[b]%s[/b]") },
- { vkbbcB, bbcAdvanced, _T("[b]%s[/b]") },
- { vkbbcI, bbcNo, _T("%s") },
- { vkbbcI, bbcBasic, _T("[i]%s[/i]") },
- { vkbbcI, bbcAdvanced, _T("[i]%s[/i]") },
- { vkbbcS, bbcNo, _T("%s") },
- { vkbbcS, bbcBasic, _T("[s]%s[/s]") },
- { vkbbcS, bbcAdvanced, _T("[s]%s[/s]") },
- { vkbbcU, bbcNo, _T("%s") },
- { vkbbcU, bbcBasic, _T("[u]%s[/u]") },
- { vkbbcU, bbcAdvanced, _T("[u]%s[/u]") },
- { vkbbcCode, bbcNo, _T("%s") },
- { vkbbcCode, bbcBasic, _T("%s") },
- { vkbbcCode, bbcAdvanced, _T("[code]%s[/code]") },
- { vkbbcImg, bbcNo, _T("%s") },
- { vkbbcImg, bbcBasic, _T("[img]%s[/img]") },
- { vkbbcImg, bbcAdvanced, _T("[img]%s[/img]") },
- { vkbbcUrl, bbcNo, _T("%s (%s)") },
- { vkbbcUrl, bbcBasic, _T("[i]%s[/i] (%s)") },
- { vkbbcUrl, bbcAdvanced, _T("[url=%s]%s[/url]") },
- { vkbbcSize, bbcNo, _T("%s") },
- { vkbbcSize, bbcBasic, _T("%s") },
- { vkbbcSize, bbcAdvanced, _T("[size=%s]%s[/size]") },
- { vkbbcColor, bbcNo, _T("%s") },
- { vkbbcColor, bbcBasic, _T("%s") },
- { vkbbcColor, bbcAdvanced, _T("[color=%s]%s[/color]") },
+ { vkbbcB, bbcNo, L"%s" },
+ { vkbbcB, bbcBasic, L"[b]%s[/b]" },
+ { vkbbcB, bbcAdvanced, L"[b]%s[/b]" },
+ { vkbbcI, bbcNo, L"%s" },
+ { vkbbcI, bbcBasic, L"[i]%s[/i]" },
+ { vkbbcI, bbcAdvanced, L"[i]%s[/i]" },
+ { vkbbcS, bbcNo, L"%s" },
+ { vkbbcS, bbcBasic, L"[s]%s[/s]" },
+ { vkbbcS, bbcAdvanced, L"[s]%s[/s]" },
+ { vkbbcU, bbcNo, L"%s" },
+ { vkbbcU, bbcBasic, L"[u]%s[/u]" },
+ { vkbbcU, bbcAdvanced, L"[u]%s[/u]" },
+ { vkbbcCode, bbcNo, L"%s" },
+ { vkbbcCode, bbcBasic, L"%s" },
+ { vkbbcCode, bbcAdvanced, L"[code]%s[/code]" },
+ { vkbbcImg, bbcNo, L"%s" },
+ { vkbbcImg, bbcBasic, L"[img]%s[/img]" },
+ { vkbbcImg, bbcAdvanced, L"[img]%s[/img]" },
+ { vkbbcUrl, bbcNo, L"%s (%s)" },
+ { vkbbcUrl, bbcBasic, L"[i]%s[/i] (%s)" },
+ { vkbbcUrl, bbcAdvanced, L"[url=%s]%s[/url]" },
+ { vkbbcSize, bbcNo, L"%s" },
+ { vkbbcSize, bbcBasic, L"%s" },
+ { vkbbcSize, bbcAdvanced, L"[size=%s]%s[/size]" },
+ { vkbbcColor, bbcNo, L"%s" },
+ { vkbbcColor, bbcBasic, L"%s" },
+ { vkbbcColor, bbcAdvanced, L"[color=%s]%s[/color]" },
};
if (IsEmpty(ptszString))
@@ -967,9 +967,9 @@ CMString CVkProto::SetBBCString(LPCTSTR ptszString, BBCSupport iBBC, VKBBCType b
return CMString(ptszString);
if (bbcType == vkbbcUrl && iBBC != bbcAdvanced)
- res.AppendFormat(ptszFormat, ptszString, tszAddString ? tszAddString : _T(""));
+ res.AppendFormat(ptszFormat, ptszString, tszAddString ? tszAddString : L"");
else if (iBBC == bbcAdvanced && bbcType >= vkbbcUrl)
- res.AppendFormat(ptszFormat, tszAddString ? tszAddString : _T(""), ptszString);
+ res.AppendFormat(ptszFormat, tszAddString ? tszAddString : L"", ptszString);
else
res.AppendFormat(ptszFormat, ptszString);
@@ -978,12 +978,12 @@ CMString CVkProto::SetBBCString(LPCTSTR ptszString, BBCSupport iBBC, VKBBCType b
CMString& CVkProto::ClearFormatNick(CMString& tszText)
{
- int iNameEnd = tszText.Find(_T("],")), iNameBeg = tszText.Find(_T("|"));
+ int iNameEnd = tszText.Find(L"],"), iNameBeg = tszText.Find(L"|");
if (iNameEnd != -1 && iNameBeg != -1 && iNameBeg < iNameEnd) {
CMString tszName = tszText.Mid(iNameBeg + 1, iNameEnd - iNameBeg - 1);
CMString tszBody = tszText.Mid(iNameEnd + 2);
if (!tszName.IsEmpty() && !tszBody.IsEmpty())
- tszText = tszName + _T(",") + tszBody;
+ tszText = tszName + L"," + tszBody;
}
return tszText;
@@ -1008,14 +1008,14 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
res.AppendChar('\t');
CMString tszType(jnAttach["type"].as_mstring());
- if (tszType == _T("photo")) {
+ if (tszType == L"photo") {
const JSONNode &jnPhoto = jnAttach["photo"];
if (!jnPhoto)
continue;
res += GetVkPhotoItem(jnPhoto, iBBC);
}
- else if (tszType ==_T("audio")) {
+ else if (tszType ==L"audio") {
const JSONNode &jnAudio = jnAttach["audio"];
if (!jnAudio)
continue;
@@ -1023,17 +1023,17 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
CMString tszArtist(jnAudio["artist"].as_mstring());
CMString tszTitle(jnAudio["title"].as_mstring());
CMString tszUrl(jnAudio["url"].as_mstring());
- CMString tszAudio(FORMAT, _T("%s - %s"), tszArtist, tszTitle);
+ CMString tszAudio(FORMAT, L"%s - %s", tszArtist, tszTitle);
- int iParamPos = tszUrl.Find(_T("?"));
+ int iParamPos = tszUrl.Find(L"?");
if (m_vkOptions.bShortenLinksForAudio && iParamPos != -1)
tszUrl = tszUrl.Left(iParamPos);
- res.AppendFormat(_T("%s: %s"),
+ res.AppendFormat(L"%s: %s",
SetBBCString(TranslateT("Audio"), iBBC, vkbbcB),
SetBBCString(tszAudio, iBBC, vkbbcUrl, tszUrl));
}
- else if (tszType ==_T("video")) {
+ else if (tszType ==L"video") {
const JSONNode &jnVideo = jnAttach["video"];
if (!jnVideo)
continue;
@@ -1041,23 +1041,23 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
CMString tszTitle(jnVideo["title"].as_mstring());
int vid = jnVideo["id"].as_int();
int ownerID = jnVideo["owner_id"].as_int();
- CMString tszUrl(FORMAT, _T("https://vk.com/video%d_%d"), ownerID, vid);
- res.AppendFormat(_T("%s: %s"),
+ CMString tszUrl(FORMAT, L"https://vk.com/video%d_%d", ownerID, vid);
+ res.AppendFormat(L"%s: %s",
SetBBCString(TranslateT("Video"), iBBC, vkbbcB),
SetBBCString(tszTitle, iBBC, vkbbcUrl, tszUrl));
}
- else if (tszType == _T("doc")) {
+ else if (tszType == L"doc") {
const JSONNode &jnDoc = jnAttach["doc"];
if (!jnDoc)
continue;
CMString tszTitle(jnDoc["title"].as_mstring());
CMString tszUrl(jnDoc["url"].as_mstring());
- res.AppendFormat(_T("%s: %s"),
+ res.AppendFormat(L"%s: %s",
SetBBCString(TranslateT("Document"), iBBC, vkbbcB),
SetBBCString(tszTitle, iBBC, vkbbcUrl, tszUrl));
}
- else if (tszType == _T("wall")) {
+ else if (tszType == L"wall") {
const JSONNode &jnWall = jnAttach["wall"];
if (!jnWall)
continue;
@@ -1065,10 +1065,10 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
CMString tszText(jnWall["text"].as_mstring());
int id = jnWall["id"].as_int();
int fromID = jnWall["from_id"].as_int();
- CMString tszUrl(FORMAT, _T("https://vk.com/wall%d_%d"), fromID, id);
- res.AppendFormat(_T("%s: %s"),
+ CMString tszUrl(FORMAT, L"https://vk.com/wall%d_%d", fromID, id);
+ res.AppendFormat(L"%s: %s",
SetBBCString(TranslateT("Wall post"), iBBC, vkbbcUrl, tszUrl),
- tszText.IsEmpty() ? _T(" ") : tszText);
+ tszText.IsEmpty() ? L" " : tszText);
const JSONNode &jnCopyHystory = jnWall["copy_history"];
for (auto aCHit = jnCopyHystory.begin(); aCHit != jnCopyHystory.end(); ++aCHit) {
@@ -1077,18 +1077,18 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
CMString tszCHText(jnCopyHystoryItem["text"].as_mstring());
int iCHid = jnCopyHystoryItem["id"].as_int();
int iCHfromID = jnCopyHystoryItem["from_id"].as_int();
- CMString tszCHUrl(FORMAT, _T("https://vk.com/wall%d_%d"), iCHfromID, iCHid);
- tszCHText.Replace(_T("\n"), _T("\n\t\t"));
- res.AppendFormat(_T("\n\t\t%s: %s"),
+ CMString tszCHUrl(FORMAT, L"https://vk.com/wall%d_%d", iCHfromID, iCHid);
+ tszCHText.Replace(L"\n", L"\n\t\t");
+ res.AppendFormat(L"\n\t\t%s: %s",
SetBBCString(TranslateT("Wall post"), iBBC, vkbbcUrl, tszCHUrl),
- tszCHText.IsEmpty() ? _T(" ") : tszCHText);
+ tszCHText.IsEmpty() ? L" " : tszCHText);
const JSONNode &jnSubAttachments = jnCopyHystoryItem["attachments"];
if (jnSubAttachments) {
debugLogA("CVkProto::GetAttachmentDescr SubAttachments");
CMString tszAttachmentDescr = GetAttachmentDescr(jnSubAttachments, iBBC);
- tszAttachmentDescr.Replace(_T("\n"), _T("\n\t\t"));
- res += _T("\n\t\t") + tszAttachmentDescr;
+ tszAttachmentDescr.Replace(L"\n", L"\n\t\t");
+ res += L"\n\t\t" + tszAttachmentDescr;
}
}
@@ -1096,11 +1096,11 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
if (jnSubAttachments) {
debugLogA("CVkProto::GetAttachmentDescr SubAttachments");
CMString tszAttachmentDescr = GetAttachmentDescr(jnSubAttachments, iBBC);
- tszAttachmentDescr.Replace(_T("\n"), _T("\n\t"));
- res += _T("\n\t") + tszAttachmentDescr;
+ tszAttachmentDescr.Replace(L"\n", L"\n\t");
+ res += L"\n\t" + tszAttachmentDescr;
}
}
- else if (tszType == _T("sticker")) {
+ else if (tszType == L"sticker") {
const JSONNode &jnSticker = jnAttach["sticker"];
if (!jnSticker)
continue;
@@ -1108,7 +1108,7 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
if (m_vkOptions.bStikersAsSmyles) {
int id = jnSticker["id"].as_int();
- res.AppendFormat(_T("[sticker:%d]"), id);
+ res.AppendFormat(L"[sticker:%d]", id);
}
else {
CMString tszLink;
@@ -1119,13 +1119,13 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
break;
}
}
- res.AppendFormat(_T("%s"), tszLink);
+ res.AppendFormat(L"%s", tszLink);
if (m_vkOptions.iIMGBBCSupport && iBBC != bbcNo)
res += SetBBCString(tszLink, iBBC, vkbbcImg);
}
}
- else if (tszType == _T("link")) {
+ else if (tszType == L"link") {
const JSONNode &jnLink = jnAttach["link"];
if (!jnLink)
continue;
@@ -1135,20 +1135,20 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
CMString tszCaption(jnLink["caption"].as_mstring());
CMString tszDescription(jnLink["description"].as_mstring());
- res.AppendFormat(_T("%s: %s"),
+ res.AppendFormat(L"%s: %s",
SetBBCString(TranslateT("Link"), iBBC, vkbbcB),
SetBBCString(tszTitle, iBBC, vkbbcUrl, tszUrl));
if (!tszCaption.IsEmpty())
- res.AppendFormat(_T("\n\t%s"), SetBBCString(tszCaption, iBBC, vkbbcI));
+ res.AppendFormat(L"\n\t%s", SetBBCString(tszCaption, iBBC, vkbbcI));
if (jnLink["photo"])
- res.AppendFormat(_T("\n\t%s"), GetVkPhotoItem(jnLink["photo"], iBBC));
+ res.AppendFormat(L"\n\t%s", GetVkPhotoItem(jnLink["photo"], iBBC));
if (!tszDescription.IsEmpty())
- res.AppendFormat(_T("\n\t%s"), tszDescription);
+ res.AppendFormat(L"\n\t%s", tszDescription);
}
- else if (tszType == _T("market")) {
+ else if (tszType == L"market") {
const JSONNode &jnMarket = jnAttach["market"];
int id = jnMarket["id"].as_int();
@@ -1156,30 +1156,30 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
CMString tszTitle(jnMarket["title"].as_mstring());
CMString tszDescription(jnMarket["description"].as_mstring());
CMString tszPhoto(jnMarket["thumb_photo"].as_mstring());
- CMString tszUrl(FORMAT, _T("https://vk.com/%s%d?w=product%d_%d"),
- ownerID > 0 ? _T("id") : _T("club"),
+ CMString tszUrl(FORMAT, L"https://vk.com/%s%d?w=product%d_%d",
+ ownerID > 0 ? L"id" : L"club",
ownerID > 0 ? ownerID : (-1)*ownerID,
ownerID,
id);
- res.AppendFormat(_T("%s: %s"),
+ res.AppendFormat(L"%s: %s",
SetBBCString(TranslateT("Product"), iBBC, vkbbcB),
SetBBCString(tszTitle, iBBC, vkbbcUrl, tszUrl));
if (!tszPhoto.IsEmpty())
- res.AppendFormat(_T("\n\t%s: %s"),
+ res.AppendFormat(L"\n\t%s: %s",
SetBBCString(TranslateT("Photo"), iBBC, vkbbcB),
SetBBCString(tszPhoto, iBBC, vkbbcImg));
if (jnMarket["price"] && jnMarket["price"]["text"])
- res.AppendFormat(_T("\n\t%s: %s"),
+ res.AppendFormat(L"\n\t%s: %s",
SetBBCString(TranslateT("Price"), iBBC, vkbbcB),
jnMarket["price"]["text"].as_mstring());
if (!tszDescription.IsEmpty())
- res.AppendFormat(_T("\n\t%s"), tszDescription);
+ res.AppendFormat(L"\n\t%s", tszDescription);
}
- else if (tszType == _T("gift")) {
+ else if (tszType == L"gift") {
const JSONNode &jnGift = jnAttach["gift"];
if (!jnGift)
continue;
@@ -1197,7 +1197,7 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
res += SetBBCString(TranslateT("Gift"), iBBC, vkbbcUrl, tszLink);
if (m_vkOptions.iIMGBBCSupport && iBBC != bbcNo)
- res.AppendFormat(_T("\n\t%s"), SetBBCString(tszLink, iBBC, vkbbcImg));
+ res.AppendFormat(L"\n\t%s", SetBBCString(tszLink, iBBC, vkbbcImg));
}
else
res.AppendFormat(TranslateT("Unsupported or unknown attachment type: %s"), SetBBCString(tszType, iBBC, vkbbcB));
@@ -1223,8 +1223,8 @@ CMString CVkProto::GetFwdMessages(const JSONNode &jnMessages, const JSONNode &jn
const JSONNode &jnUser = (*it);
int iUserId = jnUser["id"].as_int();
- CMString tszNick(FORMAT, _T("%s %s"), jnUser["first_name"].as_mstring(), jnUser["last_name"].as_mstring());
- CMString tszLink(FORMAT, _T("https://vk.com/id%d"), iUserId);
+ CMString tszNick(FORMAT, L"%s %s", jnUser["first_name"].as_mstring(), jnUser["last_name"].as_mstring());
+ CMString tszLink(FORMAT, L"https://vk.com/id%d", iUserId);
CVkUserInfo *vkUser = new CVkUserInfo(jnUser["id"].as_int(), false, tszNick, tszLink, FindUser(iUserId));
vkUsers.insert(vkUser);
@@ -1248,13 +1248,13 @@ CMString CVkProto::GetFwdMessages(const JSONNode &jnMessages, const JSONNode &jn
tszNick = ptrT(db_get_tsa(hContact, m_szModuleName, "Nick"));
else
tszNick = TranslateT("(Unknown contact)");
- tszUrl.AppendFormat(_T("https://vk.com/id%d"), uid);
+ tszUrl.AppendFormat(L"https://vk.com/id%d", uid);
}
time_t datetime = (time_t)jnMsg["date"].as_int();
TCHAR ttime[64];
_locale_t locale = _create_locale(LC_ALL, "");
- _tcsftime_l(ttime, _countof(ttime), _T("%x %X"), localtime(&datetime), locale);
+ _tcsftime_l(ttime, _countof(ttime), L"%x %X", localtime(&datetime), locale);
_free_locale(locale);
CMString tszBody(jnMsg["body"].as_mstring());
@@ -1263,7 +1263,7 @@ CMString CVkProto::GetFwdMessages(const JSONNode &jnMessages, const JSONNode &jn
if (jnFwdMessages) {
CMString tszFwdMessages = GetFwdMessages(jnFwdMessages, jnFUsers, iBBC == bbcNo ? iBBC : m_vkOptions.BBCForAttachments());
if (!tszBody.IsEmpty())
- tszFwdMessages = _T("\n") + tszFwdMessages;
+ tszFwdMessages = L"\n" + tszFwdMessages;
tszBody += tszFwdMessages;
}
@@ -1271,13 +1271,13 @@ CMString CVkProto::GetFwdMessages(const JSONNode &jnMessages, const JSONNode &jn
if (jnAttachments) {
CMString tszAttachmentDescr = GetAttachmentDescr(jnAttachments, iBBC == bbcNo ? iBBC : m_vkOptions.BBCForAttachments());
if (!tszBody.IsEmpty())
- tszAttachmentDescr = _T("\n") + tszAttachmentDescr;
+ tszAttachmentDescr = L"\n" + tszAttachmentDescr;
tszBody += tszAttachmentDescr;
}
- tszBody.Replace(_T("\n"), _T("\n\t"));
+ tszBody.Replace(L"\n", L"\n\t");
TCHAR tcSplit = m_vkOptions.bSplitFormatFwdMsg ? '\n' : ' ';
- CMString tszMes(FORMAT, _T("%s %s%c%s %s:\n\n%s\n"),
+ CMString tszMes(FORMAT, L"%s %s%c%s %s:\n\n%s\n",
SetBBCString(TranslateT("Message from"), iBBC, vkbbcB),
SetBBCString(tszNick, iBBC, vkbbcUrl, tszUrl),
tcSplit,
@@ -1313,17 +1313,17 @@ void CVkProto::SetInvisible(MCONTACT hContact)
CMString CVkProto::RemoveBBC(CMString& tszSrc)
{
static const TCHAR *tszSimpleBBCodes[][2] = {
- { _T("[b]"), _T("[/b]") },
- { _T("[u]"), _T("[/u]") },
- { _T("[i]"), _T("[/i]") },
- { _T("[s]"), _T("[/s]") },
+ { L"[b]", L"[/b]" },
+ { L"[u]", L"[/u]" },
+ { L"[i]", L"[/i]" },
+ { L"[s]", L"[/s]" },
};
static const TCHAR *tszParamBBCodes[][2] = {
- { _T("[url="), _T("[/url]") },
- { _T("[img="), _T("[/img]") },
- { _T("[size="), _T("[/size]") },
- { _T("[color="), _T("[/color]") },
+ { L"[url=", L"[/url]" },
+ { L"[img=", L"[/img]" },
+ { L"[size=", L"[/size]" },
+ { L"[color=", L"[/color]" },
};
CMString tszRes(tszSrc);
@@ -1371,7 +1371,7 @@ CMString CVkProto::RemoveBBC(CMString& tszSrc)
if ((posOpen = tszLow.Find(tszOpenTag, posOpen)) < 0)
break;
- if ((posOpen2 = tszLow.Find(_T("]"), posOpen + lenOpen)) < 0)
+ if ((posOpen2 = tszLow.Find(L"]", posOpen + lenOpen)) < 0)
break;
if ((posClose = tszLow.Find(tszCloseTag, posOpen2 + 1)) < 0)
@@ -1393,12 +1393,12 @@ CMString CVkProto::RemoveBBC(CMString& tszSrc)
void CVkProto::ShowCaptchaInBrowser(HBITMAP hBitmap)
{
TCHAR tszTempDir[MAX_PATH];
- if (!GetEnvironmentVariable(_T("TEMP"), tszTempDir, MAX_PATH))
+ if (!GetEnvironmentVariable(L"TEMP", tszTempDir, MAX_PATH))
return;
- CMString tszHTMLPath(FORMAT, _T("%s\\miranda_captcha.html"), tszTempDir);
+ CMString tszHTMLPath(FORMAT, L"%s\\miranda_captcha.html", tszTempDir);
- FILE *pFile = _tfopen(tszHTMLPath, _T("w"));
+ FILE *pFile = _tfopen(tszHTMLPath, L"w");
if (pFile == NULL)
return;
@@ -1417,6 +1417,6 @@ void CVkProto::ShowCaptchaInBrowser(HBITMAP hBitmap)
fwrite(szHTML, 1, szHTML.GetLength(), pFile);
fclose(pFile);
- tszHTMLPath = _T("file://") + tszHTMLPath;
+ tszHTMLPath = L"file://" + tszHTMLPath;
Utils_OpenUrlT(tszHTMLPath);
} \ No newline at end of file
diff --git a/protocols/VKontakte/src/vk_avatars.cpp b/protocols/VKontakte/src/vk_avatars.cpp
index be383afcc9..38cb5d7057 100644
--- a/protocols/VKontakte/src/vk_avatars.cpp
+++ b/protocols/VKontakte/src/vk_avatars.cpp
@@ -27,7 +27,7 @@ void CVkProto::OnReceiveAvatar(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
GetAvatarFileName(param->hContact, ai.filename, _countof(ai.filename));
ai.format = ProtoGetBufferFormat(reply->pData);
- FILE *out = _tfopen(ai.filename, _T("wb"));
+ FILE *out = _tfopen(ai.filename, L"wb");
if (out == NULL) {
ProtoBroadcastAck(param->hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, &ai);
delete param;
@@ -130,7 +130,7 @@ INT_PTR CVkProto::SvcGetMyAvatar(WPARAM wParam, LPARAM lParam)
void CVkProto::GetAvatarFileName(MCONTACT hContact, TCHAR *pszDest, size_t cbLen)
{
- int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
+ int tPathLen = mir_sntprintf(pszDest, cbLen, L"%s\\%S", VARST(L"%miranda_avatarcache%"), m_szModuleName);
DWORD dwAttributes = GetFileAttributes(pszDest);
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
@@ -138,7 +138,7 @@ void CVkProto::GetAvatarFileName(MCONTACT hContact, TCHAR *pszDest, size_t cbLen
pszDest[tPathLen++] = '\\';
- const TCHAR *szFileType = _T(".jpg");
+ const TCHAR *szFileType = L".jpg";
ptrT szUrl(getTStringA(hContact, "AvatarUrl"));
if (szUrl) {
TCHAR *p = _tcsrchr(szUrl, '.');
@@ -147,7 +147,7 @@ void CVkProto::GetAvatarFileName(MCONTACT hContact, TCHAR *pszDest, size_t cbLen
}
LONG id = getDword(hContact, "ID", -1);
- mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%d%s"), id, szFileType);
+ mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, L"%d%s", id, szFileType);
}
void CVkProto::SetAvatarUrl(MCONTACT hContact, CMString &tszUrl)
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index 41eeceb7eb..d931c85be0 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -30,7 +30,7 @@ extern JSONNode nullNode;
CVkChatInfo* CVkProto::AppendChat(int id, const JSONNode &jnDlg)
{
- debugLog(_T("CVkProto::AppendChat"));
+ debugLog(L"CVkProto::AppendChat");
if (id == 0)
return NULL;
@@ -46,11 +46,11 @@ CVkChatInfo* CVkProto::AppendChat(int id, const JSONNode &jnDlg)
c = new CVkChatInfo(id);
if (jnDlg) {
tszTitle = jnDlg["title"].as_mstring();
- c->m_tszTopic = mir_tstrdup(!tszTitle.IsEmpty() ? tszTitle : _T(""));
+ c->m_tszTopic = mir_tstrdup(!tszTitle.IsEmpty() ? tszTitle : L"");
}
CMString sid;
- sid.Format(_T("%S_%d"), m_szModuleName, id);
+ sid.Format(L"%S_%d", m_szModuleName, id);
c->m_tszId = mir_tstrdup(sid);
GCSESSION gcw = { sizeof(gcw) };
@@ -79,7 +79,7 @@ CVkChatInfo* CVkProto::AppendChat(int id, const JSONNode &jnDlg)
setDword(gci.hContact, "vk_chat_id", id);
- CMString tszHomepage(FORMAT, _T("https://vk.com/im?sel=c%d"), id);
+ CMString tszHomepage(FORMAT, L"https://vk.com/im?sel=c%d", id);
setTString(gci.hContact, "Homepage", tszHomepage);
db_unset(gci.hContact, m_szModuleName, "off");
@@ -187,7 +187,7 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
if (tszNick.IsEmpty()) {
CMString fName(jnUser["first_name"].as_mstring());
CMString lName(jnUser["last_name"].as_mstring());
- tszNick = fName.Trim() + _T(" ") + lName.Trim();
+ tszNick = fName.Trim() + L" " + lName.Trim();
}
cu->m_tszNick = mir_tstrdup(tszNick);
cu->m_bUnknown = false;
@@ -217,7 +217,7 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
gce.ptszUID = tszId;
gce.dwFlags = GCEF_REMOVECONTACT | GCEF_NOTNOTIFY;
gce.time = time(NULL);
- gce.ptszNick = mir_tstrdup(CMString(FORMAT, _T("%s (https://vk.com/id%s)"), cu.m_tszNick, tszId));
+ gce.ptszNick = mir_tstrdup(CMString(FORMAT, L"%s (https://vk.com/id%s)", cu.m_tszNick, tszId));
CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
cc->m_users.remove(i);
@@ -268,7 +268,7 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
void CVkProto::SetChatTitle(CVkChatInfo *cc, LPCTSTR tszTopic)
{
- debugLog(_T("CVkProto::SetChatTitle"));
+ debugLog(L"CVkProto::SetChatTitle");
if (!cc)
return;
@@ -308,7 +308,7 @@ void CVkProto::AppendChatMessage(int id, const JSONNode &jnMsg, const JSONNode &
if (jnFwdMessages) {
CMString tszFwdMessages = GetFwdMessages(jnFwdMessages, jnFUsers, bbcNo);
if (!tszBody.IsEmpty())
- tszFwdMessages = _T("\n") + tszFwdMessages;
+ tszFwdMessages = L"\n" + tszFwdMessages;
tszBody += tszFwdMessages;
}
@@ -316,7 +316,7 @@ void CVkProto::AppendChatMessage(int id, const JSONNode &jnMsg, const JSONNode &
if (jnAttachments) {
CMString tszAttachmentDescr = GetAttachmentDescr(jnAttachments, bbcNo);
if (!tszBody.IsEmpty())
- tszAttachmentDescr = _T("\n") + tszAttachmentDescr;
+ tszAttachmentDescr = L"\n" + tszAttachmentDescr;
tszBody += tszAttachmentDescr;
}
@@ -324,75 +324,75 @@ void CVkProto::AppendChatMessage(int id, const JSONNode &jnMsg, const JSONNode &
bIsAction = true;
CMString tszAction = jnMsg["action"].as_mstring();
- if (tszAction == _T("chat_create")) {
+ if (tszAction == L"chat_create") {
CMString tszActionText = jnMsg["action_text"].as_mstring();
- tszBody.AppendFormat(_T("%s \"%s\""), TranslateT("create chat"), tszActionText.IsEmpty() ? _T(" ") : tszActionText);
+ tszBody.AppendFormat(L"%s \"%s\"", TranslateT("create chat"), tszActionText.IsEmpty() ? L" " : tszActionText);
}
- else if (tszAction == _T("chat_kick_user")) {
+ else if (tszAction == L"chat_kick_user") {
CMString tszActionMid = jnMsg["action_mid"].as_mstring();
if (tszActionMid.IsEmpty())
tszBody = TranslateT("kick user");
else {
- CMString tszUid(FORMAT, _T("%d"), uid);
+ CMString tszUid(FORMAT, L"%d", uid);
if (tszUid == tszActionMid) {
if (cc->m_bHistoryRead)
return;
- tszBody.AppendFormat(_T(" (https://vk.com/id%s) %s"), tszUid, TranslateT("left chat"));
+ tszBody.AppendFormat(L" (https://vk.com/id%s) %s", tszUid, TranslateT("left chat"));
}
else {
int a_uid = 0;
- int iReadCount = _stscanf(tszActionMid, _T("%d"), &a_uid);
+ int iReadCount = _stscanf(tszActionMid, L"%d", &a_uid);
if (iReadCount == 1) {
CVkChatUser *cu = cc->m_users.find((CVkChatUser*)&a_uid);
if (cu == NULL)
- tszBody.AppendFormat(_T("%s (https://vk.com/id%d)"), TranslateT("kick user"), a_uid);
+ tszBody.AppendFormat(L"%s (https://vk.com/id%d)", TranslateT("kick user"), a_uid);
else
- tszBody.AppendFormat(_T("%s %s (https://vk.com/id%d)"), TranslateT("kick user"), cu->m_tszNick, a_uid);
+ tszBody.AppendFormat(L"%s %s (https://vk.com/id%d)", TranslateT("kick user"), cu->m_tszNick, a_uid);
}
else
tszBody = TranslateT("kick user");
}
}
}
- else if (tszAction == _T("chat_invite_user")) {
+ else if (tszAction == L"chat_invite_user") {
CMString tszActionMid = jnMsg["action_mid"].as_mstring();
if (tszActionMid.IsEmpty())
tszBody = TranslateT("invite user");
else {
- CMString tszUid(FORMAT, _T("%d"), uid);
+ CMString tszUid(FORMAT, L"%d", uid);
if (tszUid == tszActionMid)
- tszBody.AppendFormat(_T(" (https://vk.com/id%s) %s"), tszUid, TranslateT("returned to chat"));
+ tszBody.AppendFormat(L" (https://vk.com/id%s) %s", tszUid, TranslateT("returned to chat"));
else {
int a_uid = 0;
- int iReadCount = _stscanf(tszActionMid, _T("%d"), &a_uid);
+ int iReadCount = _stscanf(tszActionMid, L"%d", &a_uid);
if (iReadCount == 1) {
CVkChatUser *cu = cc->m_users.find((CVkChatUser*)&a_uid);
if (cu == NULL)
- tszBody.AppendFormat(_T("%s (https://vk.com/id%d)"), TranslateT("invite user"), a_uid);
+ tszBody.AppendFormat(L"%s (https://vk.com/id%d)", TranslateT("invite user"), a_uid);
else
- tszBody.AppendFormat(_T("%s %s (https://vk.com/id%d)"), TranslateT("invite user"), cu->m_tszNick, a_uid);
+ tszBody.AppendFormat(L"%s %s (https://vk.com/id%d)", TranslateT("invite user"), cu->m_tszNick, a_uid);
}
else
tszBody = TranslateT("invite user");
}
}
}
- else if (tszAction == _T("chat_title_update")) {
+ else if (tszAction == L"chat_title_update") {
CMString tszTitle = jnMsg["action_text"].as_mstring();
- tszBody.AppendFormat(_T("%s \"%s\""), TranslateT("change chat title to"), tszTitle.IsEmpty() ? _T(" ") : tszTitle);
+ tszBody.AppendFormat(L"%s \"%s\"", TranslateT("change chat title to"), tszTitle.IsEmpty() ? L" " : tszTitle);
if (!bIsHistory)
SetChatTitle(cc, tszTitle);
}
- else if (tszAction == _T("chat_photo_update"))
+ else if (tszAction == L"chat_photo_update")
tszBody.Replace(TranslateT("Attachments:"), TranslateT("changed chat cover:"));
- else if (tszAction == _T("chat_photo_remove"))
+ else if (tszAction == L"chat_photo_remove")
tszBody = TranslateT("deleted chat cover");
else
- tszBody.AppendFormat(_T(": %s (%s)"), TranslateT("chat action not supported"), tszAction);
+ tszBody.AppendFormat(L": %s (%s)", TranslateT("chat action not supported"), tszAction);
}
- tszBody.Replace(_T("%"), _T("%%"));
+ tszBody.Replace(L"%", L"%%");
if (cc->m_bHistoryRead) {
if (jnMsg["title"])
@@ -434,7 +434,7 @@ void CVkProto::AppendChatMessage(CVkChatInfo *cc, int uid, int msgTime, LPCTSTR
gce.time = msgTime;
gce.dwFlags = (bIsHistory) ? GCEF_NOTNOTIFY : GCEF_ADDTOLOG;
gce.ptszNick = cu->m_tszNick ? mir_tstrdup(cu->m_tszNick) : mir_tstrdup(hContact ? ptrT(db_get_tsa(hContact, m_szModuleName, "Nick")) : TranslateT("Unknown"));
- gce.ptszText = IsEmpty((TCHAR *)ptszBody) ? mir_tstrdup(_T("...")) : mir_tstrdup(ptszBody);
+ gce.ptszText = IsEmpty((TCHAR *)ptszBody) ? mir_tstrdup(L"...") : mir_tstrdup(ptszBody);
CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
StopChatContactTyping(cc->m_chatid, uid);
}
@@ -782,7 +782,7 @@ void CVkProto::NickMenuHook(CVkChatInfo *cc, GCHOOK *gch)
case IDM_VISIT_PROFILE:
hContact = FindUser(cu->m_uid);
if (hContact == NULL)
- Utils_OpenUrlT(CMString(FORMAT, _T("https://vk.com/id%d"), cu->m_uid));
+ Utils_OpenUrlT(CMString(FORMAT, L"https://vk.com/id%d", cu->m_uid));
else
SvcVisitProfile(hContact, 0);
break;
@@ -933,7 +933,7 @@ void CVkProto::StopChatContactTyping(int iChatId, int iUserId)
StatusTextData st = { 0 };
st.cbSize = sizeof(st);
- mir_sntprintf(st.tszText, _T(" "));
+ mir_sntprintf(st.tszText, L" ");
// CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact, NULL) clears statusbar very slowly.
// (1-10 sec(!!!) for me on tabSRMM O_o)
@@ -963,7 +963,7 @@ void CVkProto::CreateNewChat(LPCSTR uids, LPCTSTR ptszTitle)
if (!IsOnline())
return;
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/messages.createChat.json", true, &CVkProto::OnCreateNewChat)
- << TCHAR_PARAM("title", ptszTitle ? ptszTitle : _T(""))
+ << TCHAR_PARAM("title", ptszTitle ? ptszTitle : L"")
<< CHAR_PARAM("user_ids", uids));
}
diff --git a/protocols/VKontakte/src/vk_dialogs.cpp b/protocols/VKontakte/src/vk_dialogs.cpp
index 21fe217e6d..9e6ba15815 100644
--- a/protocols/VKontakte/src/vk_dialogs.cpp
+++ b/protocols/VKontakte/src/vk_dialogs.cpp
@@ -120,7 +120,7 @@ void CVkWallPostForm::OnInitDialog()
{
Window_SetIcon_IcoLib(m_hwnd, GetIconHandle(IDI_WALL));
- CMString tszTitle(FORMAT, _T("%s %s"), TranslateT("Wall message for"), m_param->ptszNick);
+ CMString tszTitle(FORMAT, L"%s %s", TranslateT("Wall message for"), m_param->ptszNick);
SetCaption(tszTitle);
m_btnShare.Disable();
diff --git a/protocols/VKontakte/src/vk_feed.cpp b/protocols/VKontakte/src/vk_feed.cpp
index 4ed9786164..2bc441d403 100644
--- a/protocols/VKontakte/src/vk_feed.cpp
+++ b/protocols/VKontakte/src/vk_feed.cpp
@@ -32,12 +32,12 @@ void CVkProto::AddFeedSpecialUser()
hContact = FindUser(VK_FEED_USER, true);
setTString(hContact, "Nick", TranslateT("VKontakte"));
- CMString tszUrl = _T("https://vk.com/press/Simple.png");
+ CMString tszUrl = L"https://vk.com/press/Simple.png";
SetAvatarUrl(hContact, tszUrl);
ReloadAvatarInfo(hContact);
- setTString(hContact, "domain", _T("feed"));
- setTString(hContact, "Homepage", _T("https://vk.com/feed"));
+ setTString(hContact, "domain", L"feed");
+ setTString(hContact, "Homepage", L"https://vk.com/feed");
}
if (getWord(hContact, "Status") != ID_STATUS_ONLINE)
@@ -103,10 +103,10 @@ CVkUserInfo* CVkProto::GetVkUserInfo(LONG iUserId, OBJLIST<CVkUserInfo> &vkUsers
if (vkUser == NULL) {
CMString tszNick = TranslateT("Unknown");
- CMString tszLink(_T("https://vk.com/"));
+ CMString tszLink(L"https://vk.com/");
if (iUserId) {
tszLink += bIsGroup ? "club" : "id";
- tszLink.AppendFormat(_T("%d"), bIsGroup ? -iUserId : iUserId);
+ tszLink.AppendFormat(L"%d", bIsGroup ? -iUserId : iUserId);
}
vkUser = new CVkUserInfo(iUserId, bIsGroup, tszNick, tszLink, bIsGroup ? NULL : FindUser(iUserId));
vkUsers.insert(vkUser);
@@ -133,10 +133,10 @@ void CVkProto::CreateVkUserInfoList(OBJLIST<CVkUserInfo> &vkUsers, const JSONNod
CMString tszNick(jnProfile["first_name"].as_mstring());
tszNick.AppendChar(' ');
tszNick += jnProfile["last_name"].as_mstring();
- CMString tszLink = _T("https://vk.com/");
+ CMString tszLink = L"https://vk.com/";
CMString tszScreenName(jnProfile["screen_name"].as_mstring());
if (tszScreenName.IsEmpty())
- tszScreenName.AppendFormat(_T("id%d"), UserId);
+ tszScreenName.AppendFormat(L"id%d", UserId);
tszLink += tszScreenName;
CVkUserInfo *vkUser = new CVkUserInfo(UserId, false, tszNick, tszLink, FindUser(UserId));
vkUsers.insert(vkUser);
@@ -151,7 +151,7 @@ void CVkProto::CreateVkUserInfoList(OBJLIST<CVkUserInfo> &vkUsers, const JSONNod
LONG UserId = - jnProfile["id"].as_int();
CMString tszNick(jnProfile["name"].as_mstring());
- CMString tszLink = _T("https://vk.com/");
+ CMString tszLink = L"https://vk.com/";
tszLink += jnProfile["screen_name"].as_mstring();
CVkUserInfo *vkUser = new CVkUserInfo(UserId, true, tszNick, tszLink);
vkUsers.insert(vkUser);
@@ -178,11 +178,11 @@ CVKNewsItem* CVkProto::GetVkNewsItem(const JSONNode &jnItem, OBJLIST<CVkUserInfo
vkNewsItem->tDate = jnItem["date"].as_int();
if (!tszText.IsEmpty())
- tszText += _T("\n");
+ tszText += L"\n";
- debugLog(_T("CVkProto::GetVkNewsItem %d %d %s"), iSourceId, iPostId, vkNewsItem->tszType);
+ debugLog(L"CVkProto::GetVkNewsItem %d %d %s", iSourceId, iPostId, vkNewsItem->tszType);
- if (vkNewsItem->tszType == _T("photo_tag")) {
+ if (vkNewsItem->tszType == L"photo_tag") {
bPostLink = false;
const JSONNode &jnPhotos = jnItem["photo_tags"];
if (jnPhotos) {
@@ -191,11 +191,11 @@ CVKNewsItem* CVkProto::GetVkNewsItem(const JSONNode &jnItem, OBJLIST<CVkUserInfo
tszText = TranslateT("User was tagged in these photos:");
tszPopupText = tszText + TranslateT("(photos)");
for (auto it = jnPhotoItems.begin(); it != jnPhotoItems.end(); ++it)
- tszText += _T("\n") + GetVkPhotoItem((*it), m_vkOptions.BBCForNews());
+ tszText += L"\n" + GetVkPhotoItem((*it), m_vkOptions.BBCForNews());
}
}
}
- else if (vkNewsItem->tszType == _T("photo") || vkNewsItem->tszType == _T("wall_photo")) {
+ else if (vkNewsItem->tszType == L"photo" || vkNewsItem->tszType == L"wall_photo") {
bPostLink = false;
const JSONNode &jnPhotos = jnItem["photos"];
int i = 0;
@@ -205,8 +205,8 @@ CVKNewsItem* CVkProto::GetVkNewsItem(const JSONNode &jnItem, OBJLIST<CVkUserInfo
tszPopupText += TranslateT("(photos)");
for (auto it = jnPhotoItems.begin(); it != jnPhotoItems.end(); ++it) {
const JSONNode &jnPhotoItem = (*it);
- tszText += GetVkPhotoItem(jnPhotoItem, m_vkOptions.BBCForNews()) + _T("\n");
- if (i == 0 && vkNewsItem->tszType == _T("wall_photo")) {
+ tszText += GetVkPhotoItem(jnPhotoItem, m_vkOptions.BBCForNews()) + L"\n";
+ if (i == 0 && vkNewsItem->tszType == L"wall_photo") {
if (jnPhotoItem["post_id"]) {
bPostLink = true;
iPostId = jnPhotoItem["post_id"].as_int();
@@ -218,18 +218,18 @@ CVKNewsItem* CVkProto::GetVkNewsItem(const JSONNode &jnItem, OBJLIST<CVkUserInfo
}
}
}
- else if (vkNewsItem->tszType == _T("post") || vkNewsItem->tszType.IsEmpty()) {
+ else if (vkNewsItem->tszType == L"post" || vkNewsItem->tszType.IsEmpty()) {
bPostLink = true;
const JSONNode &jnRepost = jnItem["copy_history"];
if (jnRepost) {
CVKNewsItem *vkRepost = GetVkNewsItem((*jnRepost.begin()), vkUsers, true);
- vkRepost->tszText.Replace(_T("\n"), _T("\n\t"));
+ vkRepost->tszText.Replace(L"\n", L"\n\t");
tszText += vkRepost->tszText;
- tszText += _T("\n");
+ tszText += L"\n";
- tszPopupText += _T("\t");
+ tszPopupText += L"\t";
tszPopupText += vkRepost->tszPopupTitle;
- tszPopupText += _T("\n\t");
+ tszPopupText += L"\n\t";
tszPopupText += vkRepost->tszPopupText;
vkNewsItem->bIsRepost = true;
delete vkRepost;
@@ -264,14 +264,14 @@ CVKNewsItem* CVkProto::GetVkNewsItem(const JSONNode &jnItem, OBJLIST<CVkUserInfo
vkNewsItem->tszPopupTitle.AppendFormat(tszTitleFormat, vkNewsItem->vkUser->m_tszUserNick);
vkNewsItem->tszPopupText = tszPopupText;
- vkNewsItem->tszId.AppendFormat(_T("%d_%d"), vkNewsItem->vkUser->m_UserId, iPostId);
+ vkNewsItem->tszId.AppendFormat(L"%d_%d", vkNewsItem->vkUser->m_UserId, iPostId);
if (bPostLink) {
- vkNewsItem->tszLink = CMString(_T("https://vk.com/wall")) + vkNewsItem->tszId;
+ vkNewsItem->tszLink = CMString(L"https://vk.com/wall") + vkNewsItem->tszId;
vkNewsItem->tszText.AppendChar(_T('\n'));
vkNewsItem->tszText += SetBBCString(TranslateT("Link"), m_vkOptions.BBCForNews(), vkbbcUrl, vkNewsItem->tszLink);
}
- debugLog(_T("CVkProto::GetVkNewsItem %d %d <\n%s\n>"), iSourceId, iPostId, vkNewsItem->tszText);
+ debugLog(L"CVkProto::GetVkNewsItem %d %d <\n%s\n>", iSourceId, iPostId, vkNewsItem->tszText);
return vkNewsItem;
}
@@ -290,11 +290,11 @@ CMString CVkProto::GetVkFeedback(const JSONNode &jnFeedback, VKObjType vkFeedbac
if (vkFeedbackType == vkComment) {
iUserId = jnFeedback["from_id"].as_int();
- tszFormat = _T("%s %%s %%s\n%s");
+ tszFormat = L"%s %%s %%s\n%s";
}
else if (vkFeedbackType == vkPost) {
iUserId = jnFeedback["owner_id"].as_int();
- tszFormat = _T("%s %%s %%s\n%s");
+ tszFormat = L"%s %%s %%s\n%s";
}
else if (vkFeedbackType == VKObjType::vkUsers || vkFeedbackType == vkCopy) {
const JSONNode &jnUsers = jnFeedback["items"];
@@ -307,10 +307,10 @@ CMString CVkProto::GetVkFeedback(const JSONNode &jnFeedback, VKObjType vkFeedbac
iUserId = jnUserItem["from_id"].as_int();
vkUser = GetVkUserInfo(iUserId, vkUsers);
if (!tszUsers.IsEmpty())
- tszUsers += _T(", ");
+ tszUsers += L", ";
tszUsers += SetBBCString(vkUser->m_tszUserNick, m_vkOptions.BBCForNews(), vkbbcUrl, vkUser->m_tszLink);
}
- tszRes.AppendFormat(_T("%s %%s %%s"), tszUsers);
+ tszRes.AppendFormat(L"%s %%s %%s", tszUsers);
vkUser = NULL;
iUserId = 0;
}
@@ -318,7 +318,7 @@ CMString CVkProto::GetVkFeedback(const JSONNode &jnFeedback, VKObjType vkFeedbac
if (iUserId) {
vkUser = GetVkUserInfo(iUserId, vkUsers);
CMString tszText(jnFeedback["text"].as_mstring());
- tszText.Replace(_T("%"), _T("%%"));
+ tszText.Replace(L"%", L"%%");
tszRes.AppendFormat(tszFormat, SetBBCString(vkUser->m_tszUserNick, m_vkOptions.BBCForNews(), vkbbcUrl, vkUser->m_tszLink), ClearFormatNick(tszText));
}
@@ -338,84 +338,84 @@ CVKNewsItem* CVkProto::GetVkParent(const JSONNode &jnParent, VKObjType vkParentT
CMString tszPhoto = GetVkPhotoItem(jnParent, m_vkOptions.BBCForNews());
LONG iOwnerId = jnParent["owner_id"].as_int();
LONG iId = jnParent["id"].as_int();
- vkNotificationItem->tszId.AppendFormat(_T("%d_%d"), iOwnerId, iId);
- vkNotificationItem->tszLink.AppendFormat(_T("https://vk.com/photo%s"), vkNotificationItem->tszId);
- vkNotificationItem->tszText.AppendFormat(_T("\n%s"), tszPhoto);
+ vkNotificationItem->tszId.AppendFormat(L"%d_%d", iOwnerId, iId);
+ vkNotificationItem->tszLink.AppendFormat(L"https://vk.com/photo%s", vkNotificationItem->tszId);
+ vkNotificationItem->tszText.AppendFormat(L"\n%s", tszPhoto);
if (ptszReplyText) {
- vkNotificationItem->tszText.AppendFormat(_T("\n>> %s"), SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI));
- vkNotificationItem->tszPopupText.AppendFormat(_T(">> %s"), ptszReplyText);
+ vkNotificationItem->tszText.AppendFormat(L"\n>> %s", SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI));
+ vkNotificationItem->tszPopupText.AppendFormat(L">> %s", ptszReplyText);
}
- vkNotificationItem->tszText.AppendFormat(_T("\n%s"), SetBBCString(TranslateT("Link"), m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink));
+ vkNotificationItem->tszText.AppendFormat(L"\n%s", SetBBCString(TranslateT("Link"), m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink));
}
else if (vkParentType == vkVideo) {
LONG iOwnerId = jnParent["owner_id"].as_int();
LONG iId = jnParent["id"].as_int();
CMString tszTitle(jnParent["title"].as_mstring());
- vkNotificationItem->tszId.AppendFormat(_T("%d_%d"), iOwnerId, iId);
- vkNotificationItem->tszLink.AppendFormat(_T("https://vk.com/video%s"), vkNotificationItem->tszId);
+ vkNotificationItem->tszId.AppendFormat(L"%d_%d", iOwnerId, iId);
+ vkNotificationItem->tszLink.AppendFormat(L"https://vk.com/video%s", vkNotificationItem->tszId);
CMString tszText(jnParent["text"].as_mstring());
ClearFormatNick(tszText);
if (!tszText.IsEmpty())
- vkNotificationItem->tszText.AppendFormat(_T("\n%s: %s"), SetBBCString(TranslateT("Video description:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI));
+ vkNotificationItem->tszText.AppendFormat(L"\n%s: %s", SetBBCString(TranslateT("Video description:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI));
if (ptszReplyText) {
- vkNotificationItem->tszText.AppendFormat(_T("\n>> %s"), SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI));
- vkNotificationItem->tszPopupText.AppendFormat(_T(">> %s"), ptszReplyText);
+ vkNotificationItem->tszText.AppendFormat(L"\n>> %s", SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI));
+ vkNotificationItem->tszPopupText.AppendFormat(L">> %s", ptszReplyText);
}
- vkNotificationItem->tszText.AppendFormat(_T("\n%s"), SetBBCString(tszTitle, m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink));
+ vkNotificationItem->tszText.AppendFormat(L"\n%s", SetBBCString(tszTitle, m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink));
}
else if (vkParentType == vkPost) {
LONG iToId = jnParent["to_id"].as_int();
LONG iId = jnParent["id"].as_int();
- vkNotificationItem->tszId.AppendFormat(_T("%d_%d"), iToId, iId);
- vkNotificationItem->tszLink.AppendFormat(_T("https://vk.com/wall%s%s"), vkNotificationItem->tszId, ptszReplyLink ? ptszReplyLink : _T(""));
+ vkNotificationItem->tszId.AppendFormat(L"%d_%d", iToId, iId);
+ vkNotificationItem->tszLink.AppendFormat(L"https://vk.com/wall%s%s", vkNotificationItem->tszId, ptszReplyLink ? ptszReplyLink : L"");
CMString tszText(jnParent["text"].as_mstring());
ClearFormatNick(tszText);
if (!tszText.IsEmpty()) {
- vkNotificationItem->tszText.AppendFormat(_T("\n%s: %s"), SetBBCString(TranslateT("Post text:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI));
- vkNotificationItem->tszPopupText.AppendFormat(_T("%s: %s"), TranslateT("Post text:"), tszText);
+ vkNotificationItem->tszText.AppendFormat(L"\n%s: %s", SetBBCString(TranslateT("Post text:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI));
+ vkNotificationItem->tszPopupText.AppendFormat(L"%s: %s", TranslateT("Post text:"), tszText);
}
if (ptszReplyText) {
- vkNotificationItem->tszText.AppendFormat(_T("\n>> %s"), SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI));
+ vkNotificationItem->tszText.AppendFormat(L"\n>> %s", SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI));
if (!vkNotificationItem->tszPopupText.IsEmpty())
- vkNotificationItem->tszPopupText += _T("\n");
- vkNotificationItem->tszPopupText.AppendFormat(_T(">> %s"), ptszReplyText);
+ vkNotificationItem->tszPopupText += L"\n";
+ vkNotificationItem->tszPopupText.AppendFormat(L">> %s", ptszReplyText);
}
- vkNotificationItem->tszText.AppendFormat(_T("\n%s"), SetBBCString(TranslateT("Link"), m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink));
+ vkNotificationItem->tszText.AppendFormat(L"\n%s", SetBBCString(TranslateT("Link"), m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink));
}
else if (vkParentType == vkTopic) {
LONG iOwnerId = jnParent["owner_id"].as_int();
LONG iId = jnParent["id"].as_int();
CMString tszTitle(jnParent["title"].as_mstring());
- vkNotificationItem->tszId.AppendFormat(_T("%d_%d"), iOwnerId, iId);
- vkNotificationItem->tszLink.AppendFormat(_T("https://vk.com/topic%s%s"),
- vkNotificationItem->tszId, ptszReplyLink ? ptszReplyLink : _T(""));
+ vkNotificationItem->tszId.AppendFormat(L"%d_%d", iOwnerId, iId);
+ vkNotificationItem->tszLink.AppendFormat(L"https://vk.com/topic%s%s",
+ vkNotificationItem->tszId, ptszReplyLink ? ptszReplyLink : L"");
CMString tszText(jnParent["text"].as_mstring());
ClearFormatNick(tszText);
if (!tszText.IsEmpty()) {
- vkNotificationItem->tszText.AppendFormat(_T("\n%s %s"), SetBBCString(TranslateT("Topic text:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI));
- vkNotificationItem->tszPopupText.AppendFormat(_T("%s %s"), TranslateT("Topic text:"), tszText);
+ vkNotificationItem->tszText.AppendFormat(L"\n%s %s", SetBBCString(TranslateT("Topic text:"), m_vkOptions.BBCForNews(), vkbbcB), SetBBCString(tszText, m_vkOptions.BBCForNews(), vkbbcI));
+ vkNotificationItem->tszPopupText.AppendFormat(L"%s %s", TranslateT("Topic text:"), tszText);
}
if (ptszReplyText) {
- vkNotificationItem->tszText.AppendFormat(_T("\n>> %s"), SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI));
+ vkNotificationItem->tszText.AppendFormat(L"\n>> %s", SetBBCString(ptszReplyText, m_vkOptions.BBCForNews(), vkbbcI));
if (!vkNotificationItem->tszPopupText.IsEmpty())
- vkNotificationItem->tszPopupText += _T("\n");
- vkNotificationItem->tszPopupText.AppendFormat(_T(">> %s"), ptszReplyText);
+ vkNotificationItem->tszPopupText += L"\n";
+ vkNotificationItem->tszPopupText.AppendFormat(L">> %s", ptszReplyText);
}
- vkNotificationItem->tszText.AppendFormat(_T("\n%s"), SetBBCString(tszTitle, m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink));
+ vkNotificationItem->tszText.AppendFormat(L"\n%s", SetBBCString(tszTitle, m_vkOptions.BBCForNews(), vkbbcUrl, vkNotificationItem->tszLink));
}
else if (vkParentType == vkComment) {
CMString tszText(jnParent["text"].as_mstring());
@@ -437,14 +437,14 @@ CVKNewsItem* CVkProto::GetVkParent(const JSONNode &jnParent, VKObjType vkParentT
const JSONNode &jnPost = jnParent["post"];
if (jnPost) {
- CMString tszRepl(FORMAT, _T("?reply=%d"), iId);
+ CMString tszRepl(FORMAT, L"?reply=%d", iId);
delete vkNotificationItem;
return GetVkParent(jnPost, vkPost, tszText, tszRepl);
}
const JSONNode &jnTopic = jnParent["topic"];
if (jnTopic) {
- CMString tszRepl(FORMAT, _T("?reply=%d"), iId);
+ CMString tszRepl(FORMAT, L"?reply=%d", iId);
delete vkNotificationItem;
return GetVkParent(jnTopic, vkTopic, tszText, tszRepl);
}
@@ -466,7 +466,7 @@ CVKNewsItem* CVkProto::GetVkNotificationsItem(const JSONNode &jnItem, OBJLIST<CV
const JSONNode &jnFeedback = jnItem["feedback"];
const JSONNode &jnParent = jnItem["parent"];
- if (m_vkOptions.bNotificationFilterAcceptedFriends && tszType == _T("friend_accepted") && jnFeedback && vkFeedbackType == VKObjType::vkUsers) {
+ if (m_vkOptions.bNotificationFilterAcceptedFriends && tszType == L"friend_accepted" && jnFeedback && vkFeedbackType == VKObjType::vkUsers) {
OnFriendAccepted(jnFeedback);
return NULL;
}
@@ -487,12 +487,12 @@ CVKNewsItem* CVkProto::GetVkNotificationsItem(const JSONNode &jnItem, OBJLIST<CV
vkNotification->tszText = tszNotificaton;
tszFeedback = RemoveBBC(tszFeedback);
- int idx = tszFeedback.Find(_T(" %s %s"));
+ int idx = tszFeedback.Find(L" %s %s");
- vkNotification->tszPopupTitle.AppendFormat(_T("%s %s"), tszFeedback.Mid(0, idx), tszNotificationTranslate);
+ vkNotification->tszPopupTitle.AppendFormat(L"%s %s", tszFeedback.Mid(0, idx), tszNotificationTranslate);
if (tszFeedback.GetLength() > idx + 7) {
if (!vkNotification->tszPopupText.IsEmpty())
- vkNotification->tszPopupText += _T("\n>> ");
+ vkNotification->tszPopupText += L"\n>> ";
vkNotification->tszPopupText += tszFeedback.Mid(idx + 7, tszFeedback.GetLength() - idx - 7);
}
@@ -540,7 +540,7 @@ CVKNewsItem* CVkProto::GetVkGroupInvates(const JSONNode &jnItem, OBJLIST<CVkUser
return NULL;
LONG iGroupId = jnItem["id"].as_int();
- CMString tszId(FORMAT, _T("%d,"), iGroupId);
+ CMString tszId(FORMAT, L"%d,", iGroupId);
CMString tszIds(ptrT(db_get_tsa(NULL, m_szModuleName, "InviteGroupIds")));
if (tszIds.Find(tszId, 0) != -1)
@@ -557,13 +557,13 @@ CVKNewsItem* CVkProto::GetVkGroupInvates(const JSONNode &jnItem, OBJLIST<CVkUser
CMString tszGroupName;
CMString tszGName = jnItem["name"].as_mstring();
- CMString tszGLink(FORMAT, _T("https://vk.com/%s"), jnItem["screen_name"].as_mstring());
+ CMString tszGLink(FORMAT, L"https://vk.com/%s", jnItem["screen_name"].as_mstring());
tszGroupName = SetBBCString(tszGName, m_vkOptions.BBCForNews(), vkbbcUrl, tszGLink);
- CMString tszUsers = SetBBCString(iUserId ? vkNotification->vkUser->m_tszUserNick : TranslateT("Unknown"), m_vkOptions.BBCForNews(), vkbbcUrl, iUserId ? vkNotification->vkUser->m_tszLink : _T("https://vk.com/"));
+ CMString tszUsers = SetBBCString(iUserId ? vkNotification->vkUser->m_tszUserNick : TranslateT("Unknown"), m_vkOptions.BBCForNews(), vkbbcUrl, iUserId ? vkNotification->vkUser->m_tszLink : L"https://vk.com/");
- vkNotification->tszText.AppendFormat(_T("%s %s %s"), tszUsers, tszNotificationTranslate, tszGroupName);
- vkNotification->tszPopupTitle.AppendFormat(_T("%s %s %s"), iUserId ? vkNotification->vkUser->m_tszUserNick : TranslateT("Unknown"), tszNotificationTranslate, tszGName);
+ vkNotification->tszText.AppendFormat(L"%s %s %s", tszUsers, tszNotificationTranslate, tszGroupName);
+ vkNotification->tszPopupTitle.AppendFormat(L"%s %s %s", iUserId ? vkNotification->vkUser->m_tszUserNick : TranslateT("Unknown"), tszNotificationTranslate, tszGName);
tszIds += tszId;
setTString("InviteGroupIds", tszIds);
@@ -672,7 +672,7 @@ void CVkProto::OnReceiveUnreadNews(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *p
CVKNewsItem *vkNewsFoundItem = vkNews.find(vkNewsItem);
if (vkNewsFoundItem == NULL)
vkNews.insert(vkNewsItem);
- else if (vkNewsFoundItem->tszType == _T("wall_photo") && vkNewsItem->tszType == _T("post")) {
+ else if (vkNewsFoundItem->tszType == L"wall_photo" && vkNewsItem->tszType == L"post") {
vkNews.remove(vkNewsFoundItem);
vkNews.insert(vkNewsItem);
}
@@ -708,9 +708,9 @@ void CVkProto::RetrieveUnreadNotifications(time_t tLastNotificationsTime)
if (time(NULL) - tLastNotificationsReqTime < 3 * 60)
return;
- CMString code(FORMAT, _T("return{\"notifications\":API.notifications.get({\"count\": 100, \"start_time\":%d})%s"),
+ CMString code(FORMAT, L"return{\"notifications\":API.notifications.get({\"count\": 100, \"start_time\":%d})%s",
(LONG)(tLastNotificationsTime + 1),
- m_vkOptions.bNotificationFilterInvites ? _T(",\"groupinvates\":API.groups.getInvites({\"extended\":1})};") : _T("};"));
+ m_vkOptions.bNotificationFilterInvites ? L",\"groupinvates\":API.groups.getInvites({\"extended\":1})};" : L"};");
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/execute.json", true, &CVkProto::OnReceiveUnreadNotifications)
<< TCHAR_PARAM("code", code) );
@@ -724,9 +724,9 @@ bool CVkProto::FilterNotification(CVKNewsItem* vkNotificationItem, bool& isComme
if (vkNotificationItem->vkParentType == vkNull)
return false;
- if (vkNotificationItem->tszType == _T("mention_comments")
- || vkNotificationItem->tszType == _T("mention_comment_photo")
- || vkNotificationItem->tszType == _T("mention_comment_video")) {
+ if (vkNotificationItem->tszType == L"mention_comments"
+ || vkNotificationItem->tszType == L"mention_comment_photo"
+ || vkNotificationItem->tszType == L"mention_comment_video") {
isCommented = true;
return (m_vkOptions.bNotificationFilterMentions != 0);
}
diff --git a/protocols/VKontakte/src/vk_files.cpp b/protocols/VKontakte/src/vk_files.cpp
index 3e8d78ae2a..cb1e0bc607 100644
--- a/protocols/VKontakte/src/vk_files.cpp
+++ b/protocols/VKontakte/src/vk_files.cpp
@@ -89,7 +89,7 @@ void CVkProto::SendFileFiled(CVkFileUploadParam *fup, int ErrorCode)
tszError = TranslateT("Unknown error occurred");
}
ProtoBroadcastAck(fup->hContact, ACKTYPE_FILE, ErrorCode== VKERR_AUDIO_DEL_COPYRIGHT ? ACKRESULT_DENIED : ACKRESULT_FAILED, (HANDLE)fup);
- debugLog(_T("CVkProto::SendFileFiled error code = %d (%s)"), ErrorCode, tszError);
+ debugLog(L"CVkProto::SendFileFiled error code = %d (%s)", ErrorCode, tszError);
MsgPopup(NULL, tszError, TranslateT("File upload error"), true);
delete fup;
}
@@ -97,7 +97,7 @@ void CVkProto::SendFileFiled(CVkFileUploadParam *fup, int ErrorCode)
void CVkProto::SendFileThread(void *p)
{
CVkFileUploadParam *fup = (CVkFileUploadParam *)p;
- debugLog(_T("CVkProto::SendFileThread %d %s"), fup->GetType(), fup->fileName());
+ debugLog(L"CVkProto::SendFileThread %d %s", fup->GetType(), fup->fileName());
if (!IsOnline()) {
SendFileFiled(fup, VKERR_OFFLINE);
return;
@@ -155,7 +155,7 @@ void CVkProto::OnReciveUploadServer(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *
return;
}
- FILE *pFile = _tfopen(fup->FileName, _T("rb"));
+ FILE *pFile = _tfopen(fup->FileName, L"rb");
if (pFile == NULL) {
SendFileFiled(fup, VKERR_ERR_OPEN_FILE);
return;
@@ -263,7 +263,7 @@ void CVkProto::OnReciveUpload(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
switch (fup->GetType()) {
case CVkFileUploadParam::typeImg:
upload = jnRoot["photo"].as_mstring();
- if (upload == _T("[]")) {
+ if (upload == L"[]") {
SendFileFiled(fup, VKERR_INVALID_PARAMETERS);
return;
}
@@ -274,7 +274,7 @@ void CVkProto::OnReciveUpload(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
break;
case CVkFileUploadParam::typeAudio:
upload = jnRoot["audio"].as_mstring();
- if (upload == _T("[]")) {
+ if (upload == L"[]") {
SendFileFiled(fup, VKERR_INVALID_PARAMETERS);
return;
}
@@ -334,13 +334,13 @@ void CVkProto::OnReciveUploadFile(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pR
switch (fup->GetType()) {
case CVkFileUploadParam::typeImg:
- Attachment.AppendFormat(_T("photo%d_%d"), owner_id, id);
+ Attachment.AppendFormat(L"photo%d_%d", owner_id, id);
break;
case CVkFileUploadParam::typeAudio:
- Attachment.AppendFormat(_T("audio%d_%d"), owner_id, id);
+ Attachment.AppendFormat(L"audio%d_%d", owner_id, id);
break;
case CVkFileUploadParam::typeDoc:
- Attachment.AppendFormat(_T("doc%d_%d"), owner_id, id);
+ Attachment.AppendFormat(L"doc%d_%d", owner_id, id);
break;
default:
SendFileFiled(fup, VKERR_FTYPE_NOT_SUPPORTED);
diff --git a/protocols/VKontakte/src/vk_history.cpp b/protocols/VKontakte/src/vk_history.cpp
index 505b20ca54..ec6ed4100e 100644
--- a/protocols/VKontakte/src/vk_history.cpp
+++ b/protocols/VKontakte/src/vk_history.cpp
@@ -168,7 +168,7 @@ void CVkProto::OnReceiveHistoryMessages(NETLIBHTTPREQUEST *reply, AsyncHttpReque
mir_cslock lck(m_csLoadHistoryTask);
if (m_iLoadHistoryTask > 0)
m_iLoadHistoryTask--;
- debugLog(_T("CVkProto::OnReceiveHistoryMessages error m_iLoadHistoryTask=%d"), m_iLoadHistoryTask);
+ debugLog(L"CVkProto::OnReceiveHistoryMessages error m_iLoadHistoryTask=%d", m_iLoadHistoryTask);
MsgPopup(NULL, TranslateT("Error loading message history from server"), TranslateT("Error"), true);
if (m_iLoadHistoryTask == 0 && m_bNotifyForEndLoadingHistoryAllContact) {
@@ -189,10 +189,10 @@ void CVkProto::OnReceiveHistoryMessages(NETLIBHTTPREQUEST *reply, AsyncHttpReque
m_iLoadHistoryTask--;
ptrT ptszNick(db_get_tsa(param->hContact, m_szModuleName, "Nick"));
- CMString str(FORMAT, _T("%s %s %s"), TranslateT("Error loading message history from server"), TranslateT("for"), ptszNick);
+ CMString str(FORMAT, L"%s %s %s", TranslateT("Error loading message history from server"), TranslateT("for"), ptszNick);
MsgPopup(param->hContact, str, TranslateT("Error"), true);
- debugLog(_T("CVkProto::OnReceiveHistoryMessages error for %s m_iLoadHistoryTask=%d"), ptszNick, m_iLoadHistoryTask);
+ debugLog(L"CVkProto::OnReceiveHistoryMessages error for %s m_iLoadHistoryTask=%d", ptszNick, m_iLoadHistoryTask);
if (m_iLoadHistoryTask == 0 && m_bNotifyForEndLoadingHistoryAllContact) {
MsgPopup(NULL, TranslateT("Loading messages for all contacts is completed"), TranslateT("Loading history"));
@@ -233,7 +233,7 @@ void CVkProto::OnReceiveHistoryMessages(NETLIBHTTPREQUEST *reply, AsyncHttpReque
if (jnFwdMessages) {
CMString tszFwdMessages = GetFwdMessages(jnFwdMessages, jnFUsers, m_vkOptions.BBCForAttachments());
if (!tszBody.IsEmpty())
- tszFwdMessages = _T("\n") + tszFwdMessages;
+ tszFwdMessages = L"\n" + tszFwdMessages;
tszBody += tszFwdMessages;
}
@@ -241,7 +241,7 @@ void CVkProto::OnReceiveHistoryMessages(NETLIBHTTPREQUEST *reply, AsyncHttpReque
if (jnAttachments) {
CMString tszAttachmentDescr = GetAttachmentDescr(jnAttachments, m_vkOptions.BBCForAttachments());
if (!tszBody.IsEmpty())
- tszAttachmentDescr = _T("\n") + tszAttachmentDescr;
+ tszAttachmentDescr = L"\n" + tszAttachmentDescr;
tszBody += tszAttachmentDescr;
}
@@ -282,7 +282,7 @@ void CVkProto::OnReceiveHistoryMessages(NETLIBHTTPREQUEST *reply, AsyncHttpReque
ptrT ptszNick(db_get_tsa(param->hContact, m_szModuleName, "Nick"));
CMString str(FORMAT, TranslateT("Loading messages for %s is completed"), ptszNick);
- debugLog(_T("CVkProto::OnReceiveHistoryMessages for %s m_iLoadHistoryTask=%d"), ptszNick, m_iLoadHistoryTask);
+ debugLog(L"CVkProto::OnReceiveHistoryMessages for %s m_iLoadHistoryTask=%d", ptszNick, m_iLoadHistoryTask);
if (m_bNotifyForEndLoadingHistory)
MsgPopup(param->hContact, str, TranslateT("Loading history"));
diff --git a/protocols/VKontakte/src/vk_messages.cpp b/protocols/VKontakte/src/vk_messages.cpp
index 1a94e372a4..bdb6bdc3b0 100644
--- a/protocols/VKontakte/src/vk_messages.cpp
+++ b/protocols/VKontakte/src/vk_messages.cpp
@@ -104,7 +104,7 @@ void CVkProto::OnSendMessage(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
UINT mid;
if (jnResponse.type() != JSON_STRING)
mid = jnResponse.as_int();
- else if (_stscanf(jnResponse.as_mstring(), _T("%d"), &mid) != 1)
+ else if (_stscanf(jnResponse.as_mstring(), L"%d", &mid) != 1)
mid = 0;
if (param->iMsgID != -1)
@@ -252,7 +252,7 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
if (jnFwdMessages) {
CMString tszFwdMessages = GetFwdMessages(jnFwdMessages, jnFUsers, m_vkOptions.BBCForAttachments());
if (!tszBody.IsEmpty())
- tszFwdMessages = _T("\n") + tszFwdMessages;
+ tszFwdMessages = L"\n" + tszFwdMessages;
tszBody += tszFwdMessages;
}
@@ -261,7 +261,7 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
if (jnAttachments) {
tszAttachmentDescr = GetAttachmentDescr(jnAttachments, m_vkOptions.BBCForAttachments());
if (!tszBody.IsEmpty())
- tszBody += _T("\n");
+ tszBody += L"\n";
tszBody += tszAttachmentDescr;
}
diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp
index 631fe55d41..b2b6d7233a 100644
--- a/protocols/VKontakte/src/vk_options.cpp
+++ b/protocols/VKontakte/src/vk_options.cpp
@@ -36,7 +36,7 @@ CVkAccMgrForm::CVkAccMgrForm(CVkProto *proto, HWND hwndParent):
{
SetParent(hwndParent);
- CreateLink(m_edtLogin, "Login", _T(""));
+ CreateLink(m_edtLogin, "Login", L"");
}
void CVkAccMgrForm::OnInitDialog()
@@ -111,14 +111,14 @@ int CVkProto::OnOptionsInit(WPARAM wParam, LPARAM)
static CVKLang vkLangCodes[] = {
{ NULL, LPGENT("Account language") },
- { _T("en"), LPGENT("English") },
- { _T("ru"), LPGENT("Russian") },
- { _T("be"), LPGENT("Belarusian") },
- { _T("ua"), LPGENT("Ukrainian") },
- { _T("es"), LPGENT("Spanish") },
- { _T("fi"), LPGENT("Finnish") },
- { _T("de"), LPGENT("German") },
- { _T("it"), LPGENT("Italian") },
+ { L"en", LPGENT("English") },
+ { L"ru", LPGENT("Russian") },
+ { L"be", LPGENT("Belarusian") },
+ { L"ua", LPGENT("Ukrainian") },
+ { L"es", LPGENT("Spanish") },
+ { L"fi", LPGENT("Finnish") },
+ { L"de", LPGENT("German") },
+ { L"it", LPGENT("Italian") },
};
static CVKSync vkHistorySyncMethods[] =
@@ -150,7 +150,7 @@ CVkOptionAccountForm::CVkOptionAccountForm(CVkProto *proto):
m_cbxMarkAsRead(this, IDC_COMBO_MARKASREAD),
m_cbxSyncHistory(this, IDC_COMBO_SYNCHISTORY)
{
- CreateLink(m_edtLogin, "Login", _T(""));
+ CreateLink(m_edtLogin, "Login", L"");
CreateLink(m_edtGroupName, m_proto->m_vkOptions.ptszDefaultGroup);
CreateLink(m_cbDelivery, m_proto->m_vkOptions.bServerDelivery);
CreateLink(m_cbUseLocalTime, m_proto->m_vkOptions.bUseLocalTime);
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp
index 10639738c0..f7c5c77900 100644
--- a/protocols/VKontakte/src/vk_proto.cpp
+++ b/protocols/VKontakte/src/vk_proto.cpp
@@ -425,7 +425,7 @@ void CVkProto::InitPopups(void)
ppc.PluginWindowProc = PopupDlgProc;
ppc.lParam = APF_RETURN_HWND;
- mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Errors"));
+ mir_sntprintf(desc, L"%s %s", m_tszUserName, TranslateT("Errors"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Error");
ppc.ptszDescription = desc;
ppc.pszName = name;
@@ -435,7 +435,7 @@ void CVkProto::InitPopups(void)
ppc.iSeconds = 60;
m_hPopupClassError = Popup_RegisterClass(&ppc);
- mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Notification"));
+ mir_sntprintf(desc, L"%s %s", m_tszUserName, TranslateT("Notification"));
mir_snprintf(name, "%s_%s", m_szModuleName, "Notification");
ppc.ptszDescription = desc;
ppc.pszName = name;
diff --git a/protocols/VKontakte/src/vk_search.cpp b/protocols/VKontakte/src/vk_search.cpp
index b016302971..bc5ebb88d2 100644
--- a/protocols/VKontakte/src/vk_search.cpp
+++ b/protocols/VKontakte/src/vk_search.cpp
@@ -69,8 +69,8 @@ void __cdecl CVkProto::SearchThread(void *p)
PROTOSEARCHBYNAME *pParam = (PROTOSEARCHBYNAME *)p;
TCHAR arg[200];
- mir_sntprintf(arg, _T("%s %s %s"), pParam->pszFirstName, pParam->pszNick, pParam->pszLastName);
- debugLog(_T("CVkProto::SearchThread %s"), arg);
+ mir_sntprintf(arg, L"%s %s %s", pParam->pszFirstName, pParam->pszNick, pParam->pszLastName);
+ debugLog(L"CVkProto::SearchThread %s", arg);
if (!IsOnline())
return;
@@ -120,7 +120,7 @@ void CVkProto::OnSearch(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_TCHAR;
- CMString Id(FORMAT, _T("%d"), jnRecord["id"].as_int());
+ CMString Id(FORMAT, L"%d", jnRecord["id"].as_int());
CMString FirstName(jnRecord["first_name"].as_mstring());
CMString LastName(jnRecord["last_name"].as_mstring());
CMString Nick(jnRecord["nickname"].as_mstring());
@@ -178,7 +178,7 @@ void CVkProto::OnSearchByMail(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_TCHAR;
- CMString Id(FORMAT, _T("%d"), jnRecord["id"].as_int());
+ CMString Id(FORMAT, L"%d", jnRecord["id"].as_int());
CMString FirstName(jnRecord["first_name"].as_mstring());
CMString LastName(jnRecord["last_name"].as_mstring());
CMString Nick(jnRecord["nickname"].as_mstring());
diff --git a/protocols/VKontakte/src/vk_status.cpp b/protocols/VKontakte/src/vk_status.cpp
index ef7d83b874..8a3566270c 100644
--- a/protocols/VKontakte/src/vk_status.cpp
+++ b/protocols/VKontakte/src/vk_status.cpp
@@ -240,11 +240,11 @@ INT_PTR __cdecl CVkProto::SvcSetListeningTo(WPARAM, LPARAM lParam)
db_unset(NULL, m_szModuleName, "ListeningTo");
else if (pliInfo->dwFlags & LTI_UNICODE) {
if (ServiceExists(MS_LISTENINGTO_GETPARSEDTEXT))
- tszListeningTo = ptrT((LPWSTR)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)_T("%artist% - %title%"), (LPARAM)pliInfo));
+ tszListeningTo = ptrT((LPWSTR)CallService(MS_LISTENINGTO_GETPARSEDTEXT, (WPARAM)L"%artist% - %title%", (LPARAM)pliInfo));
else
- tszListeningTo.Format(_T("%s - %s"),
- pliInfo->ptszArtist ? pliInfo->ptszArtist : _T(""),
- pliInfo->ptszTitle ? pliInfo->ptszTitle : _T(""));
+ tszListeningTo.Format(L"%s - %s",
+ pliInfo->ptszArtist ? pliInfo->ptszArtist : L"",
+ pliInfo->ptszTitle ? pliInfo->ptszTitle : L"");
setTString("ListeningTo", tszListeningTo);
}
RetrieveStatusMusic(tszListeningTo);
diff --git a/protocols/VKontakte/src/vk_struct.cpp b/protocols/VKontakte/src/vk_struct.cpp
index eff1800b1a..ad7ff94525 100644
--- a/protocols/VKontakte/src/vk_struct.cpp
+++ b/protocols/VKontakte/src/vk_struct.cpp
@@ -125,8 +125,8 @@ CVkFileUploadParam::VKFileType CVkFileUploadParam::GetType()
if (fname)
mir_free(fname);
- TCHAR img[] = _T(".jpg .jpeg .png .bmp");
- TCHAR audio[] = _T(".mp3");
+ TCHAR img[] = L".jpg .jpeg .png .bmp";
+ TCHAR audio[] = L".mp3";
TCHAR DRIVE[3], DIR[256], FNAME[256], EXT[256];
_tsplitpath(FileName, DRIVE, DIR, FNAME, EXT);
@@ -233,7 +233,7 @@ CVKOptions::CVKOptions(PROTO_INTERFACE *proto) :
iInvisibleInterval(proto, "InvisibleInterval", 10),
iMaxFriendsCount(proto, "MaxFriendsCount", 1000),
- ptszDefaultGroup(proto, "ProtoGroup", _T("VKontakte")),
+ ptszDefaultGroup(proto, "ProtoGroup", L"VKontakte"),
ptszReturnChatMessage(proto, "ReturnChatMessage", TranslateT("I\'m back")),
ptszVKLang(proto, "VKLang", NULL)
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index e2985504b8..2f2dcdae8b 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -297,7 +297,7 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, bool self)
tszValue = jnItem["bdate"].as_mstring();
if (!tszValue.IsEmpty()) {
int d, m, y, iReadCount;
- iReadCount = _stscanf(tszValue, _T("%d.%d.%d"), &d, &m, &y);
+ iReadCount = _stscanf(tszValue, L"%d.%d.%d", &d, &m, &y);
if (iReadCount > 1) {
if (iReadCount == 3)
setWord(hContact, "BirthYear", y);
@@ -362,7 +362,7 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, bool self)
CMString tszOldListeningTo(ptrT(db_get_tsa(hContact, m_szModuleName, "ListeningTo")));
const JSONNode &jnAudio = jnItem["status_audio"];
if (jnAudio) {
- CMString tszListeningTo(FORMAT, _T("%s - %s"), jnAudio["artist"].as_mstring(), jnAudio["title"].as_mstring());
+ CMString tszListeningTo(FORMAT, L"%s - %s", jnAudio["artist"].as_mstring(), jnAudio["title"].as_mstring());
if (tszListeningTo != tszOldListeningTo) {
setTString(hContact, "ListeningTo", tszListeningTo);
setTString(hContact, "AudioUrl", jnAudio["url"].as_mstring());
@@ -461,7 +461,7 @@ void CVkProto::RetrieveUserInfo(LONG userID)
if (userID == VK_FEED_USER || !IsOnline())
return;
- CMString code(FORMAT, _T("var userIDs=\"%i\";var res=API.users.get({\"user_ids\":userIDs,\"fields\":\"%s\",\"name_case\":\"nom\"});return{\"freeoffline\":0,\"norepeat\":1,\"usercount\":res.length,\"users\":res};"),
+ CMString code(FORMAT, L"var userIDs=\"%i\";var res=API.users.get({\"user_ids\":userIDs,\"fields\":\"%s\",\"name_case\":\"nom\"});return{\"freeoffline\":0,\"norepeat\":1,\"usercount\":res.length,\"users\":res};",
userID, CMString(fieldsName));
Push(new AsyncHttpRequest(this, REQUEST_POST, "/method/execute.json", true, &CVkProto::OnReceiveUserInfo)
<< TCHAR_PARAM("code", code));
@@ -481,7 +481,7 @@ void CVkProto::RetrieveUsersInfo(bool bFreeOffline, bool bRepeat)
continue;
if (!userIDs.IsEmpty())
userIDs.AppendChar(',');
- userIDs.AppendFormat(_T("%i"), userID);
+ userIDs.AppendFormat(L"%i", userID);
if (i == MAX_CONTACTS_PER_REQUEST)
break;
@@ -491,7 +491,7 @@ void CVkProto::RetrieveUsersInfo(bool bFreeOffline, bool bRepeat)
CMString codeformat("var userIDs=\"%s\";var _fields=\"%s\";");
if (m_bNeedSendOnline)
- codeformat += _T("API.account.setOnline();");
+ codeformat += L"API.account.setOnline();";
if (bFreeOffline && !m_vkOptions.bLoadFullCList)
codeformat += CMString("var US=[];var res=[];var t=10;while(t>0){"
@@ -774,8 +774,8 @@ INT_PTR __cdecl CVkProto::SvcBanUser(WPARAM hContact, LPARAM)
ptrT ptszNick(db_get_tsa(hContact, m_szModuleName, "Nick"));
CMString ptszMsg(FORMAT, TranslateT("Are you sure to ban %s? %s%sContinue?"),
IsEmpty(ptszNick) ? TranslateT("(Unknown contact)") : ptszNick,
- tszVarWarning.IsEmpty() ? _T(" ") : TranslateT("\nIt will also"),
- tszVarWarning.IsEmpty() ? _T("\n") : tszVarWarning);
+ tszVarWarning.IsEmpty() ? L" " : TranslateT("\nIt will also"),
+ tszVarWarning.IsEmpty() ? L"\n" : tszVarWarning);
if (IDNO == MessageBox(NULL, ptszMsg, TranslateT("Attention!"), MB_ICONWARNING | MB_YESNO))
return 1;
@@ -836,7 +836,7 @@ INT_PTR __cdecl CVkProto::SvcVisitProfile(WPARAM hContact, LPARAM)
if (tszDomain)
tszUrl.Append(tszDomain);
else
- tszUrl.AppendFormat(_T("id%i"), userID);
+ tszUrl.AppendFormat(L"id%i", userID);
Utils_OpenUrlT(tszUrl);
return 0;