From 7c63d57169b30a5397fb8e1d0929eec600372652 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Fri, 11 Mar 2016 19:17:47 +0000 Subject: userinfoex: add display for vk-specific MaritalStatus git-svn-id: http://svn.miranda-ng.org/main/trunk@16466 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/version.h | 2 +- protocols/VKontakte/src/vk.h | 2 +- protocols/VKontakte/src/vk_messages.cpp | 2 +- protocols/VKontakte/src/vk_thread.cpp | 15 +++------------ 4 files changed, 6 insertions(+), 15 deletions(-) (limited to 'protocols') diff --git a/protocols/VKontakte/src/version.h b/protocols/VKontakte/src/version.h index 47165280c4..6aec70d8c1 100644 --- a/protocols/VKontakte/src/version.h +++ b/protocols/VKontakte/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 1 #define __RELEASE_NUM 1 -#define __BUILD_NUM 24 +#define __BUILD_NUM 25 #include diff --git a/protocols/VKontakte/src/vk.h b/protocols/VKontakte/src/vk.h index 1431b8b53f..59caa0dbf3 100644 --- a/protocols/VKontakte/src/vk.h +++ b/protocols/VKontakte/src/vk.h @@ -80,7 +80,7 @@ along with this program. If not, see . #define VKERR_INVALID_URL 10106 // Upload server returned empty URL #define VKERR_INVALID_USER 10107 // Invalid or unknown recipient user ID -#define VK_API_VER "5.45" +#define VK_API_VER "5.50" #define VER_API CHAR_PARAM("v", VK_API_VER) #define VK_FEED_USER 2147483647L diff --git a/protocols/VKontakte/src/vk_messages.cpp b/protocols/VKontakte/src/vk_messages.cpp index dcdc52d11b..94f4db627e 100644 --- a/protocols/VKontakte/src/vk_messages.cpp +++ b/protocols/VKontakte/src/vk_messages.cpp @@ -57,7 +57,7 @@ int CVkProto::SendMsg(MCONTACT hContact, int, const char *szMsg) ULONG uMsgId = ::InterlockedIncrement(&m_msgId); AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_POST, "/method/messages.send.json", true, bIsChat? &CVkProto::OnSendChatMsg : &CVkProto::OnSendMessage, AsyncHttpRequest::rpHigh) << INT_PARAM(bIsChat ? "chat_id" : "user_id", iUserID) - << INT_PARAM("guid", ((LONG) time(NULL)) * 100 + uMsgId % 100) + << INT_PARAM("random_id", ((LONG) time(NULL)) * 100 + uMsgId % 100) << VER_API; pReq->AddHeader("Content-Type", "application/x-www-form-urlencoded"); diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 45f9862ff6..d6932c6dc2 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -387,19 +387,10 @@ MCONTACT CVkProto::SetContactInfo(const JSONNode &jnItem, bool flag, bool self) } // MaritalStatus - TCHAR * ptszMaritalStatus[] = { - TranslateT(""), - TranslateT("single"), - TranslateT("in a relationship"), - TranslateT("engaged"), - TranslateT("married"), - TranslateT("it\'s complicated"), - TranslateT("actively searching"), - TranslateT("in love") - }; + BYTE cMaritalStatus[] = {0, 10, 11, 12, 20, 70, 50, 60}; - if (jnItem["relation"] && jnItem["relation"].as_int() < _countof(ptszMaritalStatus)) - setTString(hContact, "MaritalStatus", ptszMaritalStatus[jnItem["relation"].as_int()]); + if (jnItem["relation"] && jnItem["relation"].as_int() < _countof(cMaritalStatus)) + setByte(hContact, "MaritalStatus", cMaritalStatus[jnItem["relation"].as_int()]); // interests, activities, music, movies, tv, books, games, quotes CVKInteres vkInteres[] = { -- cgit v1.2.3