diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2016-02-02 09:12:46 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2016-02-02 09:12:46 +0000 |
commit | 4b3935850e8e30e1d2a2d9d7c13296efc83db3de (patch) | |
tree | d52d7525612dd81e592b18ca3f7efa8d5729f5ea /protocols/VKontakte/src/misc.cpp | |
parent | 2c8efde364e6dc3e3ad2da9e99b667c1b56c1585 (diff) |
VKontakte:
add ‘Mark messages as read’contact menuitem
add copy_history processing in wall attachment type
version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@16211 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 8298b8de2c..eaf5ba5e44 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -69,7 +69,8 @@ static IconItem iconList[] = { LPGEN("Ban user icon"), "ban", IDI_BAN },
{ LPGEN("Broadcast icon"), "broadcast", IDI_BROADCAST },
{ LPGEN("Status icon"), "status", IDI_STATUS },
- { LPGEN("Wall message icon"), "wall", IDI_WALL }
+ { LPGEN("Wall message icon"), "wall", IDI_WALL },
+ { LPGEN("Mark messages as read icon"), "markread", IDI_MARKMESSAGESASREAD }
};
void InitIcons()
@@ -981,6 +982,28 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport res.AppendFormat(_T("%s: %s"),
SetBBCString(TranslateT("Wall post"), iBBC, vkbbcUrl, tszUrl),
tszText.IsEmpty() ? _T(" ") : tszText);
+
+ const JSONNode &jnCopyHystory = jnWall["copy_history"];
+ for (auto aCHit = jnCopyHystory.begin(); aCHit != jnCopyHystory.end(); ++aCHit) {
+ const JSONNode &jnCopyHystoryItem = (*aCHit);
+
+ CMString tszCHText(jnCopyHystoryItem["text"].as_mstring());
+ int iCHid = jnCopyHystoryItem["id"].as_int();
+ int iCHfromID = jnCopyHystoryItem["from_id"].as_int();
+ CMString tszCHUrl(FORMAT, _T("http://vk.com/wall%d_%d"), iCHfromID, iCHid);
+ tszCHText.Replace(_T("\n"), _T("\n\t\t"));
+ res.AppendFormat(_T("\n\t\t%s: %s"),
+ SetBBCString(TranslateT("Wall post"), iBBC, vkbbcUrl, tszCHUrl),
+ tszCHText.IsEmpty() ? _T(" ") : 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;
+ }
+ }
const JSONNode &jnSubAttachments = jnWall["attachments"];
if (jnSubAttachments) {
|