summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_proto.cpp
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2014-09-25 06:03:04 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2014-09-25 06:03:04 +0000
commit08a1f78e2cede8d75667dd321ff8589d0b7ab5a8 (patch)
tree9351711f167207057f9eb2ef7d111320169f816a /protocols/VKontakte/src/vk_proto.cpp
parenta7b73722232516aa22a8c00621dec72d3c18a93f (diff)
VKontakte: delete from friend list support
git-svn-id: http://svn.miranda-ng.org/main/trunk@10577 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.cpp')
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp
index 6d1a51c6bf..26d114c810 100644
--- a/protocols/VKontakte/src/vk_proto.cpp
+++ b/protocols/VKontakte/src/vk_proto.cpp
@@ -114,6 +114,7 @@ void CVkProto::InitMenus()
CreateProtoService(PS_VISITPROFILE, &CVkProto::SvcVisitProfile);
CreateProtoService(PS_CREATECHAT, &CVkProto::SvcCreateChat);
CreateProtoService(PS_ADDASFRIEND, &CVkProto::SvcAddAsFriend);
+ CreateProtoService(PS_DELETEFRIEND, &CVkProto::SvcDeleteFriend);
CLISTMENUITEM mi = { sizeof(mi) };
char szService[100];
@@ -158,6 +159,13 @@ void CVkProto::InitMenus()
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.ptszName = LPGENT("Delete from friend list");
+ mi.pszService = szService;
+ g_hContactMenuItems[CMI_DELETEFRIEND] = Menu_AddContactMenuItem(&mi);
+
}
int CVkProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM)
@@ -167,6 +175,7 @@ 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], !isFriend);
+ Menu_ShowItem(g_hContactMenuItems[CMI_DELETEFRIEND], isFriend);
return 0;
}