summaryrefslogtreecommitdiff
path: root/plugins/MetaContacts/src/meta_menu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MetaContacts/src/meta_menu.cpp')
-rw-r--r--plugins/MetaContacts/src/meta_menu.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/plugins/MetaContacts/src/meta_menu.cpp b/plugins/MetaContacts/src/meta_menu.cpp
index 30ab1750a6..853dc18394 100644
--- a/plugins/MetaContacts/src/meta_menu.cpp
+++ b/plugins/MetaContacts/src/meta_menu.cpp
@@ -42,7 +42,7 @@ INT_PTR Meta_Convert(WPARAM wParam, LPARAM lParam)
char *group = 0;
// Get some information about the selected contact.
- if ( !db_get_utf((MCONTACT)wParam, "CList", "Group", &dbv)) {
+ if ( !db_get_utf(wParam, "CList", "Group", &dbv)) {
group = _strdup(dbv.pszVal);
db_free(&dbv);
}
@@ -61,7 +61,7 @@ INT_PTR Meta_Convert(WPARAM wParam, LPARAM lParam)
db_set_utf(hMetaContact, "CList", "Group", group);
// Assign the contact to the MetaContact just created (and make default).
- if ( !Meta_Assign((MCONTACT)wParam, hMetaContact, TRUE)) {
+ if ( !Meta_Assign(wParam, hMetaContact, TRUE)) {
MessageBox(0, TranslateT("There was a problem in assigning the contact to the MetaContact"), TranslateT("Error"), MB_ICONEXCLAMATION);
CallService(MS_DB_CONTACT_DELETE, (WPARAM)hMetaContact, 0);
return 0;
@@ -207,7 +207,7 @@ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam)
DWORD metaID;
// The wParam is a metacontact
- if ((metaID = db_get_dw((MCONTACT)wParam, META_PROTO, META_ID, (DWORD)-1)) != (DWORD)-1) {
+ if ((metaID = db_get_dw(wParam, META_PROTO, META_ID, (DWORD)-1)) != (DWORD)-1) {
if ( !lParam) { // check from recursion - see second half of this function
if ( MessageBox((HWND)CallService(MS_CLUI_GETHWND,0,0),
TranslateT("This will remove the MetaContact permanently.\n\nProceed Anyway?"),
@@ -237,7 +237,7 @@ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam)
CallService(MS_DB_CONTACT_DELETE,wParam,0);
}
else {
- MCONTACT hMeta = (MCONTACT)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle", 0);
+ MCONTACT hMeta = (MCONTACT)db_get_dw(wParam, META_PROTO, "Handle", 0);
DWORD num_contacts = db_get_dw(hMeta, META_PROTO, "NumContacts", -1);
if (num_contacts == 1) {
@@ -247,7 +247,7 @@ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam)
return 0;
}
- Meta_RemoveContactNumber(hMeta, db_get_dw((MCONTACT)wParam, META_PROTO, "ContactNumber", -1));
+ Meta_RemoveContactNumber(hMeta, db_get_dw(wParam, META_PROTO, "ContactNumber", -1));
}
return 0;
}
@@ -265,8 +265,8 @@ INT_PTR Meta_Default(WPARAM wParam,LPARAM lParam)
MCONTACT hMeta;
// the wParam is a subcontact
- if ((hMeta = (MCONTACT)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle",0)) != 0) {
- db_set_dw(hMeta, META_PROTO, "Default", (DWORD)Meta_GetContactNumber((MCONTACT)wParam));
+ if ((hMeta = (MCONTACT)db_get_dw(wParam, META_PROTO, "Handle",0)) != 0) {
+ db_set_dw(hMeta, META_PROTO, "Default", (DWORD)Meta_GetContactNumber(wParam));
NotifyEventHooks(hEventDefaultChanged, (WPARAM)hMeta, (LPARAM)wParam);
}
return 0;
@@ -284,15 +284,15 @@ INT_PTR Meta_Default(WPARAM wParam,LPARAM lParam)
INT_PTR Meta_ForceDefault(WPARAM wParam,LPARAM lParam)
{
// the wParam is a MetaContact
- if (db_get_dw((MCONTACT)wParam, META_PROTO, META_ID, (DWORD)-1) != (DWORD)-1) {
- BOOL current = db_get_b((MCONTACT)wParam, META_PROTO, "ForceDefault", 0);
+ if (db_get_dw(wParam, META_PROTO, META_ID, (DWORD)-1) != (DWORD)-1) {
+ BOOL current = db_get_b(wParam, META_PROTO, "ForceDefault", 0);
current = !current;
- db_set_b((MCONTACT)wParam, META_PROTO, "ForceDefault", (BYTE)current);
+ db_set_b(wParam, META_PROTO, "ForceDefault", (BYTE)current);
- db_set_dw((MCONTACT)wParam, META_PROTO, "ForceSend", 0);
+ db_set_dw(wParam, META_PROTO, "ForceSend", 0);
if (current)
- NotifyEventHooks(hEventForceSend, wParam, (LPARAM)Meta_GetContactHandle((MCONTACT)wParam, db_get_dw((MCONTACT)wParam, META_PROTO, "Default", -1)));
+ NotifyEventHooks(hEventForceSend, wParam, (LPARAM)Meta_GetContactHandle(wParam, db_get_dw(wParam, META_PROTO, "Default", -1)));
else
NotifyEventHooks(hEventUnforceSend, wParam, 0);
}
@@ -317,7 +317,7 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam)
WORD status;
CLISTMENUITEM mi = { sizeof(mi) };
- if (db_get_dw((MCONTACT)wParam, META_PROTO, META_ID,-1) != (DWORD)-1) {
+ if (db_get_dw(wParam, META_PROTO, META_ID,-1) != (DWORD)-1) {
// save the mouse pos in case they open a subcontact menu
GetCursorPos(&menuMousePoint);
@@ -333,14 +333,14 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam)
Menu_ModifyItem(hMenuDelete, &mi);
//show subcontact menu items
- int num_contacts = db_get_dw((MCONTACT)wParam, META_PROTO, "NumContacts", 0);
+ int num_contacts = db_get_dw(wParam, META_PROTO, "NumContacts", 0);
for (int i = 0; i < MAX_CONTACTS; i++) {
if (i >= num_contacts) {
Menu_ShowItem(hMenuContact[i], false);
continue;
}
- MCONTACT hContact = Meta_GetContactHandle((MCONTACT)wParam, i);
+ MCONTACT hContact = Meta_GetContactHandle(wParam, i);
char *szProto = GetContactProto(hContact);
if ( !szProto)
status = ID_STATUS_OFFLINE;
@@ -351,7 +351,7 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam)
strcpy(buf, "Login");
strcat(buf, _itoa(i, idStr, 10));
- db_get((MCONTACT)wParam, META_PROTO, buf, &dbv);
+ db_get(wParam, META_PROTO, buf, &dbv);
switch(dbv.type) {
case DBVT_ASCIIZ:
mir_snprintf(buf,512,"%s",dbv.pszVal);
@@ -391,7 +391,7 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam)
// wParam = char *szProto
// lParam = BOOL show
char serviceFunc[256];
- mir_snprintf(serviceFunc, 256, "%s%s", GetContactProto( Meta_GetMostOnline((MCONTACT)wParam)), PS_SEND_NUDGE);
+ mir_snprintf(serviceFunc, 256, "%s%s", GetContactProto( Meta_GetMostOnline(wParam)), PS_SEND_NUDGE);
CallService(MS_NUDGE_SHOWMENU, (WPARAM)META_PROTO, (LPARAM)ServiceExists(serviceFunc));
}
else { // This is a simple contact
@@ -403,7 +403,7 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam)
Menu_ShowItem(hMenuConvert, false);
Menu_ShowItem(hMenuEdit, false);
}
- else if (db_get_dw((MCONTACT)wParam, META_PROTO, META_LINK,(DWORD)-1)!=(DWORD)-1) {
+ else if (db_get_dw(wParam, META_PROTO, META_LINK,(DWORD)-1)!=(DWORD)-1) {
// The contact is affected to a metacontact.
Menu_ShowItem(hMenuDefault, true);