From 18448e7014c32235db05465f1bf76b30f9954029 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 10 Jan 2014 23:33:35 +0000 Subject: GCDEST::pszModule and GCDEST::ptszID must be constant git-svn-id: http://svn.miranda-ng.org/main/trunk@7586 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_chats.cpp | 4 ++-- protocols/VKontakte/src/vk_proto.cpp | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'protocols/VKontakte/src') diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index 1935fb7b73..4fac52e913 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -59,7 +59,7 @@ CVkChatInfo* CVkProto::AppendChat(int id, JSONNODE *pDlg) c->m_hContact = gci.hContact; m_chats.insert(c); - GCDEST gcd = { m_szModuleName, sid.GetBuffer(), GC_EVENT_ADDGROUP }; + GCDEST gcd = { m_szModuleName, sid, GC_EVENT_ADDGROUP }; GCEVENT gce = { sizeof(gce), &gcd }; for (int i = SIZEOF(sttStatuses)-1; i >= 0; i--) { gce.ptszStatus = TranslateTS(sttStatuses[i]); @@ -88,7 +88,7 @@ void CVkProto::RetrieveChatInfo(CVkChatInfo *cc) szQuery.AppendFormat("\"users\": API.messages.getChatUsers({\"chat_id\":%d, \"fields\":\"uid,first_name,last_name\"})", cc->m_chatid); if (!cc->m_bHistoryRead) - szQuery.AppendFormat(",\"msgs\": API.messages.getHistory({\"chat_id\":%d, \"count\":\"20\", \"rev\":\"1\"})", cc->m_chatid); + szQuery.AppendFormat(",\"msgs\": API.messages.getHistory({\"chat_id\":%d, \"count\":\"20\", \"rev\":\"0\"})", cc->m_chatid); szQuery.Append("};"); diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 69f9e54c63..9a0c122eaf 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -17,6 +17,8 @@ along with this program. If not, see . #include "stdafx.h" +static COLORREF sttColors[] = { 0, 1, 2, 3, 4, 5, 6 }; + CVkProto::CVkProto(const char *szModuleName, const TCHAR *ptszUserName) : PROTO(szModuleName, ptszUserName), m_arRequestsQueue(10), @@ -57,6 +59,8 @@ CVkProto::CVkProto(const char *szModuleName, const TCHAR *ptszUserName) : GCREGISTER gcr = { sizeof(gcr) }; gcr.ptszDispName = m_tszUserName; gcr.pszModule = m_szModuleName; + gcr.nColors = SIZEOF(sttColors); + gcr.pColors = sttColors; CallServiceSync(MS_GC_REGISTER, NULL, (LPARAM)&gcr); // Set all contacts offline -- in case we crashed -- cgit v1.2.3