summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_menus.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-09 16:13:50 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-09 16:13:50 +0300
commitd15bd517fb0eb4bbdb1b118b44398b00bc8f6d6a (patch)
treeead9ec16a070ed6237975fe00a368fec2491e1ad /protocols/SkypeWeb/src/skype_menus.cpp
parentb407cbb7ad5cf00f0420fd91b82969ffcbaba5b5 (diff)
all duplicate "Request auth", "Grant auth" & "Revoke auth" menu items eliminated
Diffstat (limited to 'protocols/SkypeWeb/src/skype_menus.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_menus.cpp23
1 files changed, 3 insertions, 20 deletions
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;