summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_menus.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-04-27 18:45:52 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-04-27 18:45:52 +0000
commit822984e1ca88ec5afaa905b59e8be811dfec4e1d (patch)
tree02b70ef46605d256bb581e32b1e066729c391c75 /protocols/SkypeWeb/src/skype_menus.cpp
parent965897721ef32f0b6150f467b8ea34c53473d749 (diff)
SkypeWeb: Contacts blocking support.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13200 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_menus.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_menus.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/skype_menus.cpp b/protocols/SkypeWeb/src/skype_menus.cpp
index 0d530c703c..e0adcf681c 100644
--- a/protocols/SkypeWeb/src/skype_menus.cpp
+++ b/protocols/SkypeWeb/src/skype_menus.cpp
@@ -35,9 +35,12 @@ int CSkypeProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
bool isCtrlPressed = (GetKeyState(VK_CONTROL) & 0x8000) != 0;
bool isAuthNeed = getByte(hContact, "Auth", 0) > 0;
bool isGrantNeed = getByte(hContact, "Grant", 0) > 0;
+ bool isBlocked = getByte(hContact, "IsBlocked", 0);
Menu_ShowItem(ContactMenuItems[CMI_AUTH_REQUEST], isCtrlPressed || isAuthNeed);
Menu_ShowItem(ContactMenuItems[CMI_AUTH_GRANT], isCtrlPressed || isGrantNeed);
+ Menu_ShowItem(ContactMenuItems[CMI_BLOCK], true);
+ Menu_ShowItem(ContactMenuItems[CMI_UNBLOCK], isCtrlPressed || isBlocked);
Menu_ShowItem(ContactMenuItems[CMI_GETSERVERHISTORY], true);
return 0;
@@ -82,6 +85,20 @@ void CSkypeProto::InitMenus()
mi.icolibItem = GetIconHandle("synchistory");
ContactMenuItems[CMI_GETSERVERHISTORY] = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::GetContactHistory>);
+
+ mi.pszService = MODULE"/BlockContact";
+ mi.ptszName = LPGENT("Block contact");
+ mi.position = CMI_POSITION + CMI_GETSERVERHISTORY;
+ mi.icolibItem = LoadSkinnedIcon(SKINICON_OTHER_DELETE);
+ ContactMenuItems[CMI_BLOCK] = Menu_AddContactMenuItem(&mi);
+ CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::BlockContact>);
+
+ mi.pszService = MODULE"/UnblockContact";
+ mi.ptszName = LPGENT("Unblock contact");
+ mi.position = CMI_POSITION + CMI_GETSERVERHISTORY;
+ mi.icolibItem = LoadSkinnedIcon(SKINICON_OTHER_DELETE);
+ ContactMenuItems[CMI_UNBLOCK] = Menu_AddContactMenuItem(&mi);
+ CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::UnblockContact>);
}
void CSkypeProto::UninitMenus()