diff options
author | George Hazan <george.hazan@gmail.com> | 2016-05-28 12:41:49 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-05-28 12:41:49 +0000 |
commit | dcab83811dfb2d8f2a64c606995cd8ca35c1f6bb (patch) | |
tree | 3806b1c86a1791ce8b406672765ff4abeffa5a80 /plugins/Clist_modern | |
parent | 19e55c9c066703b870c116740821cc6727e72697 (diff) |
2 static functions removed from CLIST_INTERFACE.
git-svn-id: http://svn.miranda-ng.org/main/trunk@16881 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/modern_clc.cpp | 12 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clcitems.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clcmsgs.cpp | 24 |
3 files changed, 23 insertions, 15 deletions
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 187c06b76d..914cc0d175 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -784,7 +784,7 @@ static LRESULT clcOnLButtonDown(ClcData *dat, HWND hwnd, UINT, WPARAM, LPARAM lP nm.hdr.hwndFrom = hwnd;
nm.hdr.idFrom = GetDlgCtrlID(hwnd);
nm.flags = 0;
- nm.hItem = pcli->pfnContactToItemHandle(contact, &nm.flags);
+ nm.hItem = Clist_ContactToItemHandle(contact, &nm.flags);
SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)&nm);
}
@@ -794,7 +794,7 @@ static LRESULT clcOnLButtonDown(ClcData *dat, HWND hwnd, UINT, WPARAM, LPARAM lP nm.hdr.hwndFrom = hwnd;
nm.hdr.idFrom = GetDlgCtrlID(hwnd);
nm.flags = 0;
- nm.hItem = (hit == -1 || hitFlags & CLCHT_NOWHERE) ? NULL : pcli->pfnContactToItemHandle(contact, &nm.flags);
+ nm.hItem = (hit == -1 || hitFlags & CLCHT_NOWHERE) ? NULL : Clist_ContactToItemHandle(contact, &nm.flags);
nm.iColumn = hitFlags & CLCHT_ONITEMEXTRA ? HIBYTE(HIWORD(hitFlags)) : -1;
nm.pt = dat->ptDragStart;
SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)&nm);
@@ -945,7 +945,7 @@ static LRESULT clcOnMouseMove(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPAR nm.hdr.hwndFrom = hwnd;
nm.hdr.idFrom = GetDlgCtrlID(hwnd);
nm.flags = 0;
- nm.hItem = pcli->pfnContactToItemHandle(contact, &nm.flags);
+ nm.hItem = Clist_ContactToItemHandle(contact, &nm.flags);
SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)&nm);
dat->dragStage &= ~DRAGSTAGEF_OUTSIDE;
}
@@ -1025,7 +1025,7 @@ static LRESULT clcOnMouseMove(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPAR nm.hdr.hwndFrom = hwnd;
nm.hdr.idFrom = GetDlgCtrlID(hwnd);
nm.flags = 0;
- nm.hItem = pcli->pfnContactToItemHandle(contact, &nm.flags);
+ nm.hItem = Clist_ContactToItemHandle(contact, &nm.flags);
nm.pt = pt;
if (SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)&nm))
return 0;
@@ -1359,7 +1359,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam if (!pcli->pfnFindItem(hwnd, dat, wParam, &contact, &group, NULL)) {
if (shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0)) {
if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
- hSelItem = (DWORD_PTR)pcli->pfnContactToHItem(selcontact);
+ hSelItem = Clist_ContactToHItem(selcontact);
pcli->pfnAddContactToTree(hwnd, dat, wParam, (style & CLS_CONTACTLIST) == 0, 0);
needRepaint = TRUE;
pcli->pfnFindItem(hwnd, dat, wParam, &contact, NULL, NULL);
@@ -1381,7 +1381,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && ((style & CLS_HIDEOFFLINE) || group->hideOffline || g_CluiData.bFilterEffective)) { // CLVM changed
if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
- hSelItem = (DWORD_PTR)pcli->pfnContactToHItem(selcontact);
+ hSelItem = Clist_ContactToHItem(selcontact);
pcli->pfnRemoveItemFromGroup(hwnd, group, contact, (style & CLS_CONTACTLIST) == 0);
needRepaint = TRUE;
dat->bNeedsResort = true;
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index 08f2aed6fe..4f47e2b360 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -214,7 +214,7 @@ MCONTACT SaveSelection(ClcData *dat) if (pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) == -1)
return NULL;
- return (DWORD_PTR)pcli->pfnContactToHItem(selcontact);
+ return Clist_ContactToHItem(selcontact);
}
int RestoreSelection(ClcData *dat, MCONTACT hSelected)
diff --git a/plugins/Clist_modern/src/modern_clcmsgs.cpp b/plugins/Clist_modern/src/modern_clcmsgs.cpp index 8d540bf13b..22a130250d 100644 --- a/plugins/Clist_modern/src/modern_clcmsgs.cpp +++ b/plugins/Clist_modern/src/modern_clcmsgs.cpp @@ -114,37 +114,43 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wP switch (wParam) {
case CLGN_ROOT:
if (dat->list.cl.getCount())
- return (LRESULT)pcli->pfnContactToHItem(dat->list.cl[0]);
+ return Clist_ContactToHItem(dat->list.cl[0]);
else
return NULL;
+
case CLGN_CHILD:
if (contact->type != CLCIT_GROUP)
return NULL;
group = contact->group;
if (group->cl.getCount() == 0)
return NULL;
- return (LRESULT)pcli->pfnContactToHItem(group->cl[0]);
+ return Clist_ContactToHItem(group->cl[0]);
+
case CLGN_PARENT:
return group->groupId | HCONTACT_ISGROUP;
+
case CLGN_NEXT:
do {
if (++i >= group->cl.getCount())
return NULL;
} while (group->cl[i]->type == CLCIT_DIVIDER);
- return (LRESULT)pcli->pfnContactToHItem(group->cl[i]);
+ return Clist_ContactToHItem(group->cl[i]);
+
case CLGN_PREVIOUS:
do {
if (--i < 0)
return NULL;
} while (group->cl[i]->type == CLCIT_DIVIDER);
- return (LRESULT)pcli->pfnContactToHItem(group->cl[i]);
+ return Clist_ContactToHItem(group->cl[i]);
+
case CLGN_NEXTCONTACT:
for (i++; i < group->cl.getCount(); i++)
if (group->cl[i]->type == CLCIT_CONTACT)
break;
if (i >= group->cl.getCount())
return NULL;
- return (LRESULT)pcli->pfnContactToHItem(group->cl[i]);
+ return Clist_ContactToHItem(group->cl[i]);
+
case CLGN_PREVIOUSCONTACT:
if (i >= group->cl.getCount())
return NULL;
@@ -153,14 +159,16 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wP break;
if (i < 0)
return NULL;
- return (LRESULT)pcli->pfnContactToHItem(group->cl[i]);
+ return Clist_ContactToHItem(group->cl[i]);
+
case CLGN_NEXTGROUP:
for (i++; i < group->cl.getCount(); i++)
if (group->cl[i]->type == CLCIT_GROUP)
break;
if (i >= group->cl.getCount())
return NULL;
- return (LRESULT)pcli->pfnContactToHItem(group->cl[i]);
+ return Clist_ContactToHItem(group->cl[i]);
+
case CLGN_PREVIOUSGROUP:
if (i >= group->cl.getCount())
return NULL;
@@ -169,7 +177,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wP break;
if (i < 0)
return NULL;
- return (LRESULT)pcli->pfnContactToHItem(group->cl[i]);
+ return Clist_ContactToHItem(group->cl[i]);
}
}
return NULL;
|