diff options
author | George Hazan <ghazan@miranda.im> | 2020-06-29 18:50:53 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-06-29 18:50:53 +0300 |
commit | 61884f90293ee814791f0594d4388a8244b3511e (patch) | |
tree | 45e9cc5b99fb9331040e490656104b0de54e3781 /protocols | |
parent | 8b654ebcea0e70b228513b45bedfda08042cfb7b (diff) |
PROTO_INTERFACE::GetMenuItem - unified access to all protocol menu items
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Discord/src/menus.cpp | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_menus.cpp | 4 | ||||
-rw-r--r-- | protocols/Steam/src/steam_menus.cpp | 4 | ||||
-rw-r--r-- | protocols/Tox/src/tox_menus.cpp | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/protocols/Discord/src/menus.cpp b/protocols/Discord/src/menus.cpp index 434e99792b..3cc43fc6ab 100644 --- a/protocols/Discord/src/menus.cpp +++ b/protocols/Discord/src/menus.cpp @@ -110,7 +110,7 @@ int CDiscordProto::OnMenuPrebuild(WPARAM hContact, LPARAM) Menu_ShowItem(m_hMenuToggleSync, bIsGuild); if (!bIsGuild && getWord(hContact, "ApparentMode") != 0) - Menu_ShowItem(m_hmiReqAuth, true); + Menu_ShowItem(GetMenuItem(PROTO_MENU_REQ_AUTH), true); if (getByte(hContact, "EnableSync")) Menu_ModifyItem(m_hMenuToggleSync, LPGENW("Disable sync"), Skin_GetIconHandle(SKINICON_CHAT_LEAVE)); diff --git a/protocols/SkypeWeb/src/skype_menus.cpp b/protocols/SkypeWeb/src/skype_menus.cpp index a0d96be1ca..d0ea71ac0a 100644 --- a/protocols/SkypeWeb/src/skype_menus.cpp +++ b/protocols/SkypeWeb/src/skype_menus.cpp @@ -35,8 +35,8 @@ int CSkypeProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) bool isGrantNeed = getByte(hContact, "Grant", 0) > 0;
bool isBlocked = getBool(hContact, "IsBlocked", false);
- Menu_ShowItem(m_hmiReqAuth, isCtrlPressed || isAuthNeed);
- Menu_ShowItem(m_hmiGrantAuth, isCtrlPressed || isGrantNeed);
+ Menu_ShowItem(GetMenuItem(PROTO_MENU_REQ_AUTH), isCtrlPressed || isAuthNeed);
+ Menu_ShowItem(GetMenuItem(PROTO_MENU_GRANT_AUTH), isCtrlPressed || isGrantNeed);
Menu_ShowItem(ContactMenuItems[CMI_BLOCK], true);
Menu_ShowItem(ContactMenuItems[CMI_UNBLOCK], isCtrlPressed || isBlocked);
diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp index c2e3e997ae..b421cdc120 100644 --- a/protocols/Steam/src/steam_menus.cpp +++ b/protocols/Steam/src/steam_menus.cpp @@ -74,8 +74,8 @@ int CSteamProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) bool ctrlPressed = (GetKeyState(VK_CONTROL) & 0x8000) != 0;
bool authNeeded = getBool(hContact, "Auth", 0);
- Menu_ShowItem(m_hmiReqAuth, authNeeded || ctrlPressed);
- Menu_ShowItem(m_hmiRevokeAuth, !authNeeded || ctrlPressed);
+ Menu_ShowItem(GetMenuItem(PROTO_MENU_REQ_AUTH), authNeeded || ctrlPressed);
+ Menu_ShowItem(GetMenuItem(PROTO_MENU_REVOKE_AUTH), !authNeeded || ctrlPressed);
bool isBlocked = getBool(hContact, "Block", 0);
Menu_ShowItem(contactMenuItems[CMI_BLOCK], !isBlocked || ctrlPressed);
diff --git a/protocols/Tox/src/tox_menus.cpp b/protocols/Tox/src/tox_menus.cpp index 2ea767b0e4..761f8a1320 100644 --- a/protocols/Tox/src/tox_menus.cpp +++ b/protocols/Tox/src/tox_menus.cpp @@ -14,10 +14,10 @@ int CToxProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) bool isCtrlPressed = (GetKeyState(VK_CONTROL) & 0x8000) != 0;
bool isAuthNeed = getByte(hContact, "Auth", 0) > 0;
- Menu_ShowItem(m_hmiReqAuth, isCtrlPressed || isAuthNeed);
+ Menu_ShowItem(GetMenuItem(PROTO_MENU_REQ_AUTH), isCtrlPressed || isAuthNeed);
bool isGrantNeed = getByte(hContact, "Grant", 0) > 0;
- Menu_ShowItem(m_hmiGrantAuth, isCtrlPressed || isGrantNeed);
+ Menu_ShowItem(GetMenuItem(PROTO_MENU_GRANT_AUTH), isCtrlPressed || isGrantNeed);
return 0;
}
|