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/visibility/visibility.cpp | |
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/visibility/visibility.cpp')
-rw-r--r-- | src/modules/visibility/visibility.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/modules/visibility/visibility.cpp b/src/modules/visibility/visibility.cpp index 9a09bc9bed..88f43b4a3c 100644 --- a/src/modules/visibility/visibility.cpp +++ b/src/modules/visibility/visibility.cpp @@ -48,13 +48,14 @@ static void SetListGroupIcons(HWND hwndList, HANDLE hFirstItem, HANDLE hParentIt for (i=0; i < SIZEOF(iconOn); i++) {
iImage = SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, i);
if (iconOn[i] && iImage == 0) iconOn[i] = 0;
- if (iImage != 0xFF) childCount[i]++;
+ if (iImage != EMPTY_EXTRA_ICON)
+ childCount[i]++;
}
hItem = (HANDLE)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXTCONTACT, (LPARAM)hItem);
}
//set icons
for (i=0; i < SIZEOF(iconOn); i++) {
- SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hParentItem, MAKELPARAM(i, childCount[i]?(iconOn[i]?i+1:0):0xFF));
+ SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hParentItem, MAKELPARAM(i, childCount[i]?(iconOn[i]?i+1:0):EMPTY_EXTRA_ICON));
if (groupChildCount) groupChildCount[i]+=childCount[i];
}
}
@@ -78,7 +79,8 @@ static void SetAllChildIcons(HWND hwndList, HANDLE hFirstItem, int iColumn, int else hItem = (HANDLE)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXTCONTACT, (LPARAM)hFirstItem);
while (hItem) {
iOldIcon = SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, iColumn);
- if (iOldIcon != 0xFF && iOldIcon != iImage) SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(iColumn, iImage));
+ if (iOldIcon != EMPTY_EXTRA_ICON && iOldIcon != iImage)
+ SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(iColumn, iImage));
hItem = (HANDLE)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXTCONTACT, (LPARAM)hItem);
}
}
@@ -114,12 +116,12 @@ static void SetAllContactIcons(HWND hwndList) flags = CallProtoServiceInt(NULL,szProto, PS_GETCAPS, PFLAGNUM_1, 0);
status = DBGetContactSettingWord(hContact, szProto, "ApparentMode", 0);
}
- if (flags&PF1_INVISLIST) {
- if (SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(0, 0)) == 0xFF)
+ if (flags & PF1_INVISLIST) {
+ if (SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(0, 0)) == EMPTY_EXTRA_ICON)
SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(0, status == ID_STATUS_ONLINE?1:0));
}
- if (flags&PF1_VISLIST) {
- if (SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(1, 0)) == 0xFF)
+ if (flags & PF1_VISLIST) {
+ if (SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(1, 0)) == EMPTY_EXTRA_ICON)
SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(1, status == ID_STATUS_OFFLINE?2:0));
}
}
@@ -210,7 +212,7 @@ static INT_PTR CALLBACK DlgProcVisibilityOpts(HWND hwndDlg, UINT msg, WPARAM, LP // Update list, making sure that the options are mutually exclusive
if (itemType == CLCIT_CONTACT) { // A contact
SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(nm->iColumn, iImage));
- if (iImage && SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(nm->iColumn?0:1, 0)) != 0xFF)
+ if (iImage && SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(nm->iColumn?0:1, 0)) != EMPTY_EXTRA_ICON)
SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(nm->iColumn?0:1, 0));
}
else if (itemType == CLCIT_INFO) { // All Contacts
|