diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-09-29 09:09:40 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-09-29 09:09:40 +0000 |
commit | 9f8f51ae8bc32ba91d98a2fbd6a652a55241a7d7 (patch) | |
tree | db4f3e5029dfd049e1e832069b701ec7c115f35b /protocols/VKontakte/src/vk_proto.cpp | |
parent | e77a3c5664bf839e5e94d27a9fbc8c8a6e2da51d (diff) |
VKontakte:
replace icons for add/remove frendlist menuitems
fix ‘Add as frend’ menuitem for chats
add ‘Report abuse’ and ‘Ban user’ support
version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@10621 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 6741d315c6..c867bf0c65 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -69,6 +69,10 @@ CVkProto::CVkProto(const char *szModuleName, const TCHAR *ptszUserName) : m_bMarkReadOnTyping = getBool("MarkReadOnTyping", false) && m_bMarkReadOnReply;
m_bAutoSyncHistory = getBool("AutoSyncHistory", true);
m_bUseLocalTime = getBool("LocalTime", false);
+ m_bReportAbuse = getBool("ReportAbuseOnBanUser", false);
+ m_bClearServerHistory = getBool("ClearServerHistoryOnBanUser", false);
+ m_bRemoveFromFrendlist = getBool("RemoveFromFrendlistOnBanUser", false);
+ m_bRemoveFromClist = getBool("RemoveFromClistOnBanUser", false);
// Set all contacts offline -- in case we crashed
SetAllContactStatuses(ID_STATUS_OFFLINE);
@@ -118,6 +122,8 @@ void CVkProto::InitMenus() CreateProtoService(PS_CREATECHAT, &CVkProto::SvcCreateChat);
CreateProtoService(PS_ADDASFRIEND, &CVkProto::SvcAddAsFriend);
CreateProtoService(PS_DELETEFRIEND, &CVkProto::SvcDeleteFriend);
+ CreateProtoService(PS_BANUSER, &CVkProto::SvcBanUser);
+ CreateProtoService(PS_REPORTABUSE, &CVkProto::SvcReportAbuse);
CLISTMENUITEM mi = { sizeof(mi) };
char szService[100];
@@ -157,18 +163,31 @@ void CVkProto::InitMenus() mir_snprintf(szService, sizeof(szService), "%s%s", m_szModuleName, PS_ADDASFRIEND);
mi.position = -200001000 + CMI_ADDASFRIEND;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_ADDCONTACT);
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_ADD);
mi.ptszName = LPGENT("Add as friend");
mi.pszService = szService;
g_hContactMenuItems[CMI_ADDASFRIEND] = Menu_AddContactMenuItem(&mi);
mir_snprintf(szService, sizeof(szService), "%s%s", m_szModuleName, PS_DELETEFRIEND);
mi.position = -200001000 + CMI_DELETEFRIEND;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_DELETE);
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REVOKE);
mi.ptszName = LPGENT("Delete from friend list");
mi.pszService = szService;
g_hContactMenuItems[CMI_DELETEFRIEND] = Menu_AddContactMenuItem(&mi);
+ mir_snprintf(szService, sizeof(szService), "%s%s", m_szModuleName, PS_BANUSER);
+ mi.position = -200001000 + CMI_BANUSER;
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_DELETE);
+ mi.ptszName = LPGENT("Ban user");
+ mi.pszService = szService;
+ g_hContactMenuItems[CMI_BANUSER] = Menu_AddContactMenuItem(&mi);
+
+ mir_snprintf(szService, sizeof(szService), "%s%s", m_szModuleName, PS_REPORTABUSE);
+ mi.position = -200001000 + CMI_REPORTABUSE;
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MIRANDA);
+ mi.ptszName = LPGENT("Report abuse");
+ mi.pszService = szService;
+ g_hContactMenuItems[CMI_REPORTABUSE] = Menu_AddContactMenuItem(&mi);
}
int CVkProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM)
@@ -177,8 +196,10 @@ int CVkProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM) Menu_ShowItem(g_hContactMenuItems[CMI_GETALLSERVERHISTORY], !isChatRoom(hContact));
Menu_ShowItem(g_hContactMenuItems[CMI_VISITPROFILE], !isChatRoom(hContact));
- Menu_ShowItem(g_hContactMenuItems[CMI_ADDASFRIEND], !bisFriend);
+ Menu_ShowItem(g_hContactMenuItems[CMI_ADDASFRIEND], !bisFriend&&!isChatRoom(hContact));
Menu_ShowItem(g_hContactMenuItems[CMI_DELETEFRIEND], bisFriend);
+ Menu_ShowItem(g_hContactMenuItems[CMI_BANUSER], !isChatRoom(hContact));
+ Menu_ShowItem(g_hContactMenuItems[CMI_REPORTABUSE], !isChatRoom(hContact));
return 0;
}
|