From 28f6bfdc3ea1f2d34a05855f0459caa96c8fe2b6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 2 Jun 2015 21:38:16 +0000 Subject: minor cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@13976 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_nicer/src/clcidents.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'plugins/Clist_nicer/src/clcidents.cpp') diff --git a/plugins/Clist_nicer/src/clcidents.cpp b/plugins/Clist_nicer/src/clcidents.cpp index 228cccae1d..bf2200cec5 100644 --- a/plugins/Clist_nicer/src/clcidents.cpp +++ b/plugins/Clist_nicer/src/clcidents.cpp @@ -48,7 +48,7 @@ int FindItem(HWND hwnd, struct ClcData *dat, HANDLE hItem, ClcContact **contact, ClcGroup *group = &dat->list; group->scanIndex = 0; - for (; ;) { + for (;;) { if (group->scanIndex == group->cl.count) { ClcGroup *tgroup; group = group->parent; @@ -56,7 +56,7 @@ int FindItem(HWND hwnd, struct ClcData *dat, HANDLE hItem, ClcContact **contact, break; nowVisible = 1; for (tgroup = group; tgroup; tgroup = tgroup->parent) { - if ( !(group->expanded)) { + if (!(group->expanded)) { nowVisible = 0; break; } } @@ -65,23 +65,19 @@ int FindItem(HWND hwnd, struct ClcData *dat, HANDLE hItem, ClcContact **contact, } if (nowVisible) index++; - if ((IsHContactGroup(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_GROUP && ((UINT_PTR) hItem & ~HCONTACT_ISGROUP) == group->cl.items[group->scanIndex]->groupId) || - (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_CONTACT && group->cl.items[group->scanIndex]->hContact == (MCONTACT)hItem) || - (IsHContactInfo(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_INFO && group->cl.items[group->scanIndex]->hContact == (MCONTACT)((UINT_PTR) hItem & ~HCONTACT_ISINFO))) - { + if ((IsHContactGroup(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_GROUP && ((UINT_PTR)hItem & ~HCONTACT_ISGROUP) == group->cl.items[group->scanIndex]->groupId) || + (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_CONTACT && group->cl.items[group->scanIndex]->hContact == (MCONTACT)hItem) || + (IsHContactInfo(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_INFO && group->cl.items[group->scanIndex]->hContact == (MCONTACT)((UINT_PTR)hItem & ~HCONTACT_ISINFO))) { if (isVisible) { - if ( !nowVisible) + if (!nowVisible) *isVisible = 0; else { - int posy = RowHeight::getItemTopY(dat,index+1); - if (posyyScroll) - *isVisible=0; - //if ((index + 1) * dat->rowHeight< dat->yScroll) - // *isVisible = 0; + int posy = RowHeight::getItemTopY(dat, index + 1); + if (posy < dat->yScroll) + *isVisible = 0; else { RECT clRect; GetClientRect(hwnd, &clRect); - //if (index * dat->rowHeight >= dat->yScroll + clRect.bottom) if (posy >= dat->yScroll + clRect.bottom) *isVisible = 0; else -- cgit v1.2.3