From 08a1f78e2cede8d75667dd321ff8589d0b7ab5a8 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Thu, 25 Sep 2014 06:03:04 +0000 Subject: VKontakte: delete from friend list support git-svn-id: http://svn.miranda-ng.org/main/trunk@10577 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_proto.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'protocols/VKontakte/src/vk_proto.cpp') 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; } -- cgit v1.2.3