diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-07 14:29:43 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-07 14:29:43 +0000 |
commit | f3bd86cba781bb179169419de8101ab32ba0760e (patch) | |
tree | bede0aabe2fff0c1441e965b3a972a5928b7f387 /src/modules/clist | |
parent | 2ff97d940cc269e7466ea95354e80f04c9483df7 (diff) |
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
Diffstat (limited to 'src/modules/clist')
-rw-r--r-- | src/modules/clist/clcitems.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/clcmsgs.cpp | 16 | ||||
-rw-r--r-- | src/modules/clist/clcutils.cpp | 2 |
3 files changed, 8 insertions, 12 deletions
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) {
|