diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-16 09:15:31 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-16 09:15:31 +0000 |
commit | 1f53603a20c3cccc23f001f5e9fcabee97afd100 (patch) | |
tree | 6b94e2d5e3498149057d124f41f5f25ffe57bb84 /protocols/VKontakte/src/vk_proto.cpp | |
parent | f71c05fadaa38b0719f75d8ba5fc26ea230b478e (diff) |
VKontakte:
add destroy options for offline chats
more processing for kick and invite
git-svn-id: http://svn.miranda-ng.org/main/trunk@10795 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_proto.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index d8ad1d70d8..cabf6d9c84 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -131,6 +131,7 @@ void CVkProto::InitMenus() CreateProtoService(PS_DELETEFRIEND, &CVkProto::SvcDeleteFriend);
CreateProtoService(PS_BANUSER, &CVkProto::SvcBanUser);
CreateProtoService(PS_REPORTABUSE, &CVkProto::SvcReportAbuse);
+ CreateProtoService(PS_DESTROYKICKCHAT, &CVkProto::SvcDestroyKickChat);
CLISTMENUITEM mi = { sizeof(mi) };
char szService[100];
@@ -195,6 +196,13 @@ void CVkProto::InitMenus() mi.ptszName = LPGENT("Report abuse");
mi.pszService = szService;
g_hContactMenuItems[CMI_REPORTABUSE] = Menu_AddContactMenuItem(&mi);
+
+ mir_snprintf(szService, sizeof(szService), "%s%s", m_szModuleName, PS_DESTROYKICKCHAT);
+ mi.position = -200001000 + CMI_DESTROYKICKCHAT;
+ mi.icolibItem = Skin_GetIconByHandle(GetIconHandle(IDI_FRIENDDEL));
+ mi.ptszName = LPGENT("Destroy room");
+ mi.pszService = szService;
+ g_hContactMenuItems[CMI_DESTROYKICKCHAT] = Menu_AddContactMenuItem(&mi);
}
int CVkProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM)
@@ -207,7 +215,7 @@ int CVkProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM) Menu_ShowItem(g_hContactMenuItems[CMI_DELETEFRIEND], bisFriend);
Menu_ShowItem(g_hContactMenuItems[CMI_BANUSER], !isChatRoom(hContact));
Menu_ShowItem(g_hContactMenuItems[CMI_REPORTABUSE], !isChatRoom(hContact));
-
+ Menu_ShowItem(g_hContactMenuItems[CMI_DESTROYKICKCHAT], isChatRoom(hContact)&&getBool(hContact, "off", false));
return 0;
}
|