From d15bd517fb0eb4bbdb1b118b44398b00bc8f6d6a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 9 Feb 2018 16:13:50 +0300 Subject: all duplicate "Request auth", "Grant auth" & "Revoke auth" menu items eliminated --- protocols/SkypeWeb/src/skype_menus.cpp | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_menus.cpp') diff --git a/protocols/SkypeWeb/src/skype_menus.cpp b/protocols/SkypeWeb/src/skype_menus.cpp index bcf3f98315..55c4a4288f 100644 --- a/protocols/SkypeWeb/src/skype_menus.cpp +++ b/protocols/SkypeWeb/src/skype_menus.cpp @@ -35,8 +35,9 @@ int CSkypeProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) bool isGrantNeed = getByte(hContact, "Grant", 0) > 0; bool isBlocked = getBool(hContact, "IsBlocked", false); - Menu_ShowItem(ContactMenuItems[CMI_AUTH_REQUEST], isCtrlPressed || isAuthNeed); - Menu_ShowItem(ContactMenuItems[CMI_AUTH_GRANT], isCtrlPressed || isGrantNeed); + Menu_ShowItem(m_hmiReqAuth, isCtrlPressed || isAuthNeed); + Menu_ShowItem(m_hmiGrantAuth, isCtrlPressed || isGrantNeed); + Menu_ShowItem(ContactMenuItems[CMI_BLOCK], true); Menu_ShowItem(ContactMenuItems[CMI_UNBLOCK], isCtrlPressed || isBlocked); Menu_ShowItem(ContactMenuItems[CMI_GETSERVERHISTORY], true); @@ -60,24 +61,6 @@ void CSkypeProto::InitMenus() CMenuItem mi; mi.flags = CMIF_UNICODE; - // Request authorization - mi.pszService = MODULE"/RequestAuth"; - mi.name.w = LPGENW("Request authorization"); - mi.position = CMI_POSITION + CMI_AUTH_REQUEST; - mi.hIcolibItem = ::Skin_GetIconHandle(SKINICON_AUTH_REQUEST); - SET_UID(mi, 0x36375a1f, 0xc142, 0x4d6e, 0xa6, 0x57, 0xe4, 0x76, 0x5d, 0xbc, 0x59, 0x8e); - ContactMenuItems[CMI_AUTH_REQUEST] = Menu_AddContactMenuItem(&mi); - CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::OnRequestAuth>); - - // Grant authorization - mi.pszService = MODULE"/GrantAuth"; - mi.name.w = LPGENW("Grant authorization"); - mi.position = CMI_POSITION + CMI_AUTH_GRANT; - mi.hIcolibItem = ::Skin_GetIconHandle(SKINICON_AUTH_GRANT); - SET_UID(mi, 0x4c90452a, 0x869a, 0x4a81, 0xaf, 0xa8, 0x28, 0x34, 0xaf, 0x2b, 0x6b, 0x30); - ContactMenuItems[CMI_AUTH_GRANT] = Menu_AddContactMenuItem(&mi); - CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::OnGrantAuth>); - mi.pszService = MODULE"/GetHistory"; mi.name.w = LPGENW("Get server history"); mi.position = CMI_POSITION + CMI_GETSERVERHISTORY; -- cgit v1.2.3