summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_nicer')
-rw-r--r--plugins/Clist_nicer/src/clc.cpp4
-rw-r--r--plugins/Clist_nicer/src/clcitems.cpp7
2 files changed, 5 insertions, 6 deletions
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp
index d49cd4a0e7..97748297a4 100644
--- a/plugins/Clist_nicer/src/clc.cpp
+++ b/plugins/Clist_nicer/src/clc.cpp
@@ -325,7 +325,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
if (!pcli->pfnFindItem(hwnd, dat, hContact, &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 = (UINT_PTR)pcli->pfnContactToHItem(selcontact);
+ hSelItem = Clist_ContactToHItem(selcontact);
pcli->pfnAddContactToTree(hwnd, dat, hContact, 0, 0);
recalcScrollBar = 1;
pcli->pfnFindItem(hwnd, dat, hContact, &contact, NULL, NULL);
@@ -342,7 +342,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
break;
if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline || cfg::dat.bFilterEffective)) { // CLVM changed
if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
- hSelItem = (UINT_PTR)pcli->pfnContactToHItem(selcontact);
+ hSelItem = Clist_ContactToHItem(selcontact);
pcli->pfnRemoveItemFromGroup(hwnd, group, contact, 0);
contactRemoved = TRUE;
recalcScrollBar = 1;
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp
index 82c614643d..452fc2863d 100644
--- a/plugins/Clist_nicer/src/clcitems.cpp
+++ b/plugins/Clist_nicer/src/clcitems.cpp
@@ -45,11 +45,10 @@ static void TZ_LoadTimeZone(MCONTACT hContact, struct TExtraCache *c)
ClcContact* CreateClcContact(void)
{
- ClcContact* p = (ClcContact*)mir_alloc(sizeof(ClcContact));
- if (p != NULL) {
- memset(p, 0, sizeof(ClcContact));
+ ClcContact* p = (ClcContact*)mir_calloc(sizeof(ClcContact));
+ if (p != NULL)
p->avatarLeft = p->extraIconRightBegin = p->xStatusIcon = -1;
- }
+
return p;
}