summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_menus.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-28 16:34:30 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-28 16:34:30 +0300
commit81ce57622c3166830b23eae534dacc6b008c659d (patch)
tree6d6ac74667f733a20b94fa27cc01c2f45688c533 /protocols/Steam/src/steam_menus.cpp
parentc2bb7727483b9b5620e8cc0ce6adae35ee78d0a4 (diff)
common protocol instance management code went into template
Diffstat (limited to 'protocols/Steam/src/steam_menus.cpp')
-rw-r--r--protocols/Steam/src/steam_menus.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp
index 30b6550293..40f84551d1 100644
--- a/protocols/Steam/src/steam_menus.cpp
+++ b/protocols/Steam/src/steam_menus.cpp
@@ -4,10 +4,10 @@ int CSteamProto::hChooserMenu;
HGENMENU CSteamProto::contactMenuItems[CMI_MAX];
template<int(__cdecl CSteamProto::*Service)(WPARAM, LPARAM)>
-INT_PTR GlobalService(WPARAM wParam, LPARAM lParam)
+INT_PTR GlobalService(WPARAM hContact, LPARAM lParam)
{
- CSteamProto *ppro = CSteamProto::GetContactAccount((MCONTACT)wParam);
- return ppro ? (ppro->*Service)(wParam, lParam) : 0;
+ CSteamProto *ppro = CMPlugin::getInstance((MCONTACT)hContact);
+ return ppro ? (ppro->*Service)(hContact, lParam) : 0;
}
INT_PTR CSteamProto::AuthRequestCommand(WPARAM hContact, LPARAM)
@@ -81,9 +81,8 @@ INT_PTR CSteamProto::OpenBlockListCommand(WPARAM, LPARAM)
return 0;
}
-int CSteamProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
+int CSteamProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = (MCONTACT)wParam;
if (!hContact)
return 0;
@@ -106,13 +105,13 @@ int CSteamProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
return 0;
}
-int CSteamProto::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
+int CSteamProto::PrebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
for (int i = 0; i < CMI_MAX; i++)
Menu_ShowItem(CSteamProto::contactMenuItems[i], false);
- CSteamProto* ppro = CSteamProto::GetContactAccount((MCONTACT)wParam);
- return (ppro) ? ppro->OnPrebuildContactMenu(wParam, lParam) : 0;
+ CSteamProto* ppro = CMPlugin::getInstance((MCONTACT)hContact);
+ return (ppro) ? ppro->OnPrebuildContactMenu(hContact, lParam) : 0;
}
void CSteamProto::OnInitStatusMenu()