From f3bd86cba781bb179169419de8101ab32ba0760e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 7 Nov 2012 14:29:43 +0000 Subject: fix for extra icons in the Visibility & Events Ignore options' dialogs git-svn-id: http://svn.miranda-ng.org/main/trunk@2231 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/clist/clcitems.cpp | 2 +- src/modules/clist/clcmsgs.cpp | 16 ++++++---------- src/modules/clist/clcutils.cpp | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) (limited to 'src/modules/clist') diff --git a/src/modules/clist/clcitems.cpp b/src/modules/clist/clcitems.cpp index c39f5cf5a6..ce8b744a88 100644 --- a/src/modules/clist/clcitems.cpp +++ b/src/modules/clist/clcitems.cpp @@ -158,7 +158,7 @@ int fnAddInfoItemToGroup(ClcGroup *group, int flags, const TCHAR *pszText) if (group->cl.items[i]->type != CLCIT_INFO) break; i = cli.pfnAddItemToGroup(group, i); - iInfoItemUniqueHandle = (iInfoItemUniqueHandle + 1) & 0xFFFF; + iInfoItemUniqueHandle = LOWORD(iInfoItemUniqueHandle+1); if (iInfoItemUniqueHandle == 0) ++iInfoItemUniqueHandle; group->cl.items[i]->type = CLCIT_INFO; diff --git a/src/modules/clist/clcmsgs.cpp b/src/modules/clist/clcmsgs.cpp index b35c7b0d64..c27564729c 100644 --- a/src/modules/clist/clcmsgs.cpp +++ b/src/modules/clist/clcmsgs.cpp @@ -160,16 +160,12 @@ LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPAR return dat->extraColumnsCount; case CLM_GETEXTRAIMAGE: - { - if (LOWORD(lParam) >= dat->extraColumnsCount) - return 0xFFFF; - - ClcContact *contact; - if ( !cli.pfnFindItem(hwnd, dat, (HANDLE) wParam, &contact, NULL, NULL)) - return 0xFFFF; - - return contact->iExtraImage[LOWORD(lParam)]; - } + if (LOWORD(lParam) < dat->extraColumnsCount) { + ClcContact *contact; + if ( cli.pfnFindItem(hwnd, dat, (HANDLE) wParam, &contact, NULL, NULL)) + return contact->iExtraImage[LOWORD(lParam)]; + } + return EMPTY_EXTRA_ICON; case CLM_GETEXTRAIMAGELIST: return (LRESULT) dat->himlExtraColumns; diff --git a/src/modules/clist/clcutils.cpp b/src/modules/clist/clcutils.cpp index 97b0db6abb..9c1fb44956 100644 --- a/src/modules/clist/clcutils.cpp +++ b/src/modules/clist/clcutils.cpp @@ -154,7 +154,7 @@ int fnHitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact * } for (i=0; i < dat->extraColumnsCount; i++) { - if (hitcontact->iExtraImage[i] == 0xFFFF) + if (hitcontact->iExtraImage[i] == EMPTY_EXTRA_ICON) continue; if (testx >= clRect.right - dat->extraColumnSpacing * (dat->extraColumnsCount - i) && testx < clRect.right - dat->extraColumnSpacing * (dat->extraColumnsCount - i) + g_IconWidth) { -- cgit v1.2.3