summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/icq_menu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_menu.cpp')
-rw-r--r--protocols/IcqOscarJ/src/icq_menu.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp
index 93e85a6965..5538103a41 100644
--- a/protocols/IcqOscarJ/src/icq_menu.cpp
+++ b/protocols/IcqOscarJ/src/icq_menu.cpp
@@ -39,7 +39,7 @@ static int sttCompareProtocols(const CIcqProto *p1, const CIcqProto *p2)
LIST<CIcqProto> g_Instances(1, sttCompareProtocols);
-static CIcqProto* IcqGetInstanceByHContact(HANDLE hContact)
+static CIcqProto* IcqGetInstanceByHContact(HCONTACT hContact)
{
char* szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -54,37 +54,37 @@ static CIcqProto* IcqGetInstanceByHContact(HANDLE hContact)
static INT_PTR IcqMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((HANDLE)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact((HCONTACT)wParam);
return (ppro) ? ppro->RequestAuthorization(wParam, lParam) : 0;
}
static INT_PTR IcqMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((HANDLE)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact((HCONTACT)wParam);
return (ppro) ? ppro->GrantAuthorization(wParam, lParam) : 0;
}
static INT_PTR IcqMenuHandleRevokeAuth(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((HANDLE)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact((HCONTACT)wParam);
return (ppro) ? ppro->RevokeAuthorization(wParam, lParam) : 0;
}
static INT_PTR IcqMenuHandleAddServContact(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((HANDLE)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact((HCONTACT)wParam);
return (ppro) ? ppro->AddServerContact(wParam, lParam) : 0;
}
static INT_PTR IcqMenuHandleXStatusDetails(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((HANDLE)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact((HCONTACT)wParam);
return (ppro) ? ppro->ShowXStatusDetails(wParam, lParam) : 0;
}
static INT_PTR IcqMenuHandleOpenProfile(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((HANDLE)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact((HCONTACT)wParam);
return (ppro) ? ppro->OpenWebProfile(wParam, lParam) : 0;
}
@@ -97,7 +97,7 @@ static int IcqPrebuildContactMenu( WPARAM wParam, LPARAM lParam )
Menu_ShowItem(g_hContactMenuItems[ICMI_XSTATUS_DETAILS], FALSE);
Menu_ShowItem(g_hContactMenuItems[ICMI_OPEN_PROFILE], FALSE);
- CIcqProto* ppro = IcqGetInstanceByHContact((HANDLE)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact((HCONTACT)wParam);
return (ppro) ? ppro->OnPreBuildContactMenu(wParam, lParam) : 0;
}
@@ -177,7 +177,7 @@ void g_MenuUninit(void)
INT_PTR CIcqProto::OpenWebProfile(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
DWORD dwUin = getContactUin(hContact);
char url[256];
mir_snprintf(url, sizeof(url), "http://www.icq.com/people/%d",dwUin);
@@ -187,7 +187,7 @@ INT_PTR CIcqProto::OpenWebProfile(WPARAM wParam, LPARAM lParam)
int CIcqProto::OnPreBuildContactMenu(WPARAM wParam, LPARAM)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -197,18 +197,18 @@ int CIcqProto::OnPreBuildContactMenu(WPARAM wParam, LPARAM)
DWORD dwUin = getContactUin(hContact);
Menu_ShowItem(g_hContactMenuItems[ICMI_AUTH_REQUEST],
- dwUin && (bCtrlPressed || (getByte((HANDLE)wParam, "Auth", 0) && getWord((HANDLE)wParam, DBSETTING_SERVLIST_ID, 0))));
- Menu_ShowItem(g_hContactMenuItems[ICMI_AUTH_GRANT], dwUin && (bCtrlPressed || getByte((HANDLE)wParam, "Grant", 0)));
+ dwUin && (bCtrlPressed || (getByte(hContact, "Auth", 0) && getWord(hContact, DBSETTING_SERVLIST_ID, 0))));
+ Menu_ShowItem(g_hContactMenuItems[ICMI_AUTH_GRANT], dwUin && (bCtrlPressed || getByte(hContact, "Grant", 0)));
Menu_ShowItem(g_hContactMenuItems[ICMI_AUTH_REVOKE],
- dwUin && (bCtrlPressed || (getByte("PrivacyItems", 0) && !getByte((HANDLE)wParam, "Grant", 0))));
+ dwUin && (bCtrlPressed || (getByte("PrivacyItems", 0) && !getByte(hContact, "Grant", 0))));
Menu_ShowItem(g_hContactMenuItems[ICMI_ADD_TO_SERVLIST],
- m_bSsiEnabled && !getWord((HANDLE)wParam, DBSETTING_SERVLIST_ID, 0) &&
- !getWord((HANDLE)wParam, DBSETTING_SERVLIST_IGNORE, 0) &&
+ m_bSsiEnabled && !getWord(hContact, DBSETTING_SERVLIST_ID, 0) &&
+ !getWord(hContact, DBSETTING_SERVLIST_IGNORE, 0) &&
!db_get_b(hContact, "CList", "NotOnList", 0));
}
Menu_ShowItem(g_hContactMenuItems[ICMI_OPEN_PROFILE],getContactUin(hContact) != 0);
- BYTE bXStatus = getContactXStatus((HANDLE)wParam);
+ BYTE bXStatus = getContactXStatus(hContact);
Menu_ShowItem(g_hContactMenuItems[ICMI_XSTATUS_DETAILS], m_bHideXStatusUI ? 0 : bXStatus != 0);
if (bXStatus && !m_bHideXStatusUI) {