summaryrefslogtreecommitdiff
path: root/src/modules/clist/clc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 20:47:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 20:47:51 +0000
commit68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (patch)
treefcc340ad7067561e57733b287f193a7dbed93dd4 /src/modules/clist/clc.cpp
parent7193759b046338c6f47ff2edb34743a1465791cd (diff)
HCONTACT is not needed anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/clist/clc.cpp')
-rw-r--r--src/modules/clist/clc.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/modules/clist/clc.cpp b/src/modules/clist/clc.cpp
index f087f87039..b2f3bad3fb 100644
--- a/src/modules/clist/clc.cpp
+++ b/src/modules/clist/clc.cpp
@@ -78,7 +78,7 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam)
if (!strcmp(cws->szModule, "CList")) {
if (!strcmp(cws->szSetting, "MyHandle")) {
- cli.pfnInvalidateDisplayNameCacheEntry((HCONTACT)wParam);
+ cli.pfnInvalidateDisplayNameCacheEntry((MCONTACT)wParam);
cli.pfnClcBroadcast(INTM_NAMECHANGED, wParam, lParam);
}
else if (!strcmp(cws->szSetting, "Group"))
@@ -93,7 +93,7 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam)
cli.pfnClcBroadcast(INTM_NAMEORDERCHANGED, 0, 0);
}
else {
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto != NULL) {
if (!strcmp(cws->szModule, "Protocol") && !strcmp(cws->szSetting, "p"))
cli.pfnClcBroadcast(INTM_PROTOCHANGED, wParam, lParam);
@@ -443,13 +443,13 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam,
break;
case INTM_CONTACTADDED:
- cli.pfnAddContactToTree(hwnd, dat, (HCONTACT)wParam, 1, 1);
- cli.pfnNotifyNewContact(hwnd, (HCONTACT)wParam);
+ cli.pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, 1, 1);
+ cli.pfnNotifyNewContact(hwnd, (MCONTACT)wParam);
SortClcByTimer(hwnd);
break;
case INTM_CONTACTDELETED:
- cli.pfnDeleteItemFromTree(hwnd, (HCONTACT)wParam);
+ cli.pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam);
SortClcByTimer(hwnd);
break;
@@ -461,10 +461,10 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam,
if (dbcws->value.type == DBVT_DELETED || dbcws->value.bVal == 0) {
if (cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, NULL, NULL, NULL))
break;
- cli.pfnAddContactToTree(hwnd, dat, (HCONTACT)wParam, 1, 1);
- cli.pfnNotifyNewContact(hwnd, (HCONTACT)wParam);
+ cli.pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, 1, 1);
+ cli.pfnNotifyNewContact(hwnd, (MCONTACT)wParam);
}
- else cli.pfnDeleteItemFromTree(hwnd, (HCONTACT)wParam);
+ else cli.pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam);
dat->needsResort = 1;
SortClcByTimer(hwnd);
@@ -481,10 +481,10 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam,
memcpy(iExtraImage, contact->iExtraImage, sizeof(iExtraImage));
flags = contact->flags;
}
- cli.pfnDeleteItemFromTree(hwnd, (HCONTACT)wParam);
- if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !db_get_b((HCONTACT)wParam, "CList", "Hidden", 0)) {
+ cli.pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam);
+ if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !db_get_b((MCONTACT)wParam, "CList", "Hidden", 0)) {
NMCLISTCONTROL nm;
- cli.pfnAddContactToTree(hwnd, dat, (HCONTACT)wParam, 1, 1);
+ cli.pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, 1, 1);
if (cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) {
memcpy(contact->iExtraImage, iExtraImage, sizeof(iExtraImage));
if (flags & CONTACTF_CHECKED)
@@ -506,18 +506,18 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam,
{
int recalcScrollBar = 0, shouldShow;
WORD status;
- HCONTACT hSelItem = NULL;
+ MCONTACT hSelItem = NULL;
ClcContact *selcontact = NULL;
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto == NULL)
status = ID_STATUS_OFFLINE;
else
- status = db_get_w((HCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE);
+ status = db_get_w((MCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE);
// this means an offline msg is flashing, so the contact should be shown
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
- shouldShow = (style & CLS_SHOWHIDDEN || !db_get_b((HCONTACT)wParam, "CList", "Hidden", 0))
+ shouldShow = (style & CLS_SHOWHIDDEN || !db_get_b((MCONTACT)wParam, "CList", "Hidden", 0))
&& (!cli.pfnIsHiddenMode(dat, status) || CallService(MS_CLIST_GETCONTACTICON, wParam, 0) != lParam);
contact = NULL;
@@ -525,13 +525,13 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam,
if (!cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, &group, NULL)) {
if (shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0)) {
if (dat->selection >= 0 && cli.pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
- hSelItem = (HCONTACT)cli.pfnContactToHItem(selcontact);
- cli.pfnAddContactToTree(hwnd, dat, (HCONTACT)wParam, (style & CLS_CONTACTLIST) == 0, 0);
+ hSelItem = (MCONTACT)cli.pfnContactToHItem(selcontact);
+ cli.pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, (style & CLS_CONTACTLIST) == 0, 0);
recalcScrollBar = 1;
cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL);
if (contact) {
contact->iImage = (WORD) lParam;
- cli.pfnNotifyNewContact(hwnd, (HCONTACT)wParam);
+ cli.pfnNotifyNewContact(hwnd, (MCONTACT)wParam);
dat->needsResort = 1;
}
}
@@ -541,7 +541,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam,
break;
if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline)) {
if (dat->selection >= 0 && cli.pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
- hSelItem = (HCONTACT)cli.pfnContactToHItem(selcontact);
+ hSelItem = (MCONTACT)cli.pfnContactToHItem(selcontact);
cli.pfnRemoveItemFromGroup(hwnd, group, contact, (style & CLS_CONTACTLIST) == 0);
recalcScrollBar = 1;
}
@@ -569,7 +569,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam,
if (!cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL))
break;
- lstrcpyn(contact->szText, cli.pfnGetContactDisplayName((HCONTACT)wParam, 0), SIZEOF(contact->szText));
+ lstrcpyn(contact->szText, cli.pfnGetContactDisplayName((MCONTACT)wParam, 0), SIZEOF(contact->szText));
dat->needsResort = 1;
SortClcByTimer(hwnd);
break;
@@ -578,9 +578,9 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam,
if (!cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL))
break;
- contact->proto = GetContactProto((HCONTACT)wParam);
- cli.pfnInvalidateDisplayNameCacheEntry((HCONTACT)wParam);
- lstrcpyn(contact->szText, cli.pfnGetContactDisplayName((HCONTACT)wParam, 0), SIZEOF(contact->szText));
+ contact->proto = GetContactProto((MCONTACT)wParam);
+ cli.pfnInvalidateDisplayNameCacheEntry((MCONTACT)wParam);
+ lstrcpyn(contact->szText, cli.pfnGetContactDisplayName((MCONTACT)wParam, 0), SIZEOF(contact->szText));
SortClcByTimer(hwnd);
break;
@@ -604,11 +604,11 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam,
case INTM_APPARENTMODECHANGED:
if (cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) {
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto == NULL)
break;
- WORD apparentMode = db_get_w((HCONTACT)wParam, szProto, "ApparentMode", 0);
+ WORD apparentMode = db_get_w((MCONTACT)wParam, szProto, "ApparentMode", 0);
contact->flags &= ~(CONTACTF_INVISTO | CONTACTF_VISTO);
if (apparentMode == ID_STATUS_OFFLINE)
contact->flags |= CONTACTF_INVISTO;
@@ -626,11 +626,11 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam,
case INTM_IDLECHANGED:
if (cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) {
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto == NULL)
break;
contact->flags &= ~CONTACTF_IDLE;
- if (db_get_dw((HCONTACT)wParam, szProto, "IdleTS", 0))
+ if (db_get_dw((MCONTACT)wParam, szProto, "IdleTS", 0))
contact->flags |= CONTACTF_IDLE;
cli.pfnInvalidateRect(hwnd, NULL, FALSE);