summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_clcitems.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 14:42:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 14:42:51 +0000
commit33953cc6a0fab6a91af293c6838f8a46dd7922da (patch)
tree2dbbe718ad42545bde6c9f7672387827c530550a /plugins/Clist_modern/src/modern_clcitems.cpp
parente190a7fde521bd6af9ea485cc730f854aaf38e11 (diff)
HCONTACT, part 3
git-svn-id: http://svn.miranda-ng.org/main/trunk@8081 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clcitems.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp
index b01e397d01..dcb0d89b10 100644
--- a/plugins/Clist_modern/src/modern_clcitems.cpp
+++ b/plugins/Clist_modern/src/modern_clcitems.cpp
@@ -314,18 +314,14 @@ int RestoreSelection(ClcData *dat, HCONTACT hSelected)
ClcContact *selcontact = NULL;
ClcGroup *selgroup = NULL;
- if (!hSelected || !pcli->pfnFindItem( dat->hWnd, dat, hSelected, &selcontact, &selgroup, NULL))
- {
+ if (!hSelected || !pcli->pfnFindItem(dat->hWnd, dat, (HANDLE)hSelected, &selcontact, &selgroup, NULL)) {
dat->selection = -1;
return dat->selection;
}
if (!selcontact->isSubcontact )
- {
dat->selection = pcli->pfnGetRowsPriorTo( &dat->list, selgroup, List_IndexOf((SortedList*)&selgroup->cl, selcontact ));
- }
- else
- {
+ else {
dat->selection = pcli->pfnGetRowsPriorTo(&dat->list, selgroup, List_IndexOf((SortedList*)&selgroup->cl, selcontact->subcontacts ));
if (dat->selection != -1 )
@@ -583,7 +579,7 @@ void cli_SaveStateAndRebuildList(HWND hwnd, ClcData *dat)
if (savedInfo[i].parentId == -1)
group = &dat->list;
else {
- if (!pcli->pfnFindItem(hwnd, dat, (HCONTACT)(savedInfo[i].parentId | HCONTACT_ISGROUP), &contact, NULL, NULL))
+ if (!pcli->pfnFindItem(hwnd, dat, HANDLE(savedInfo[i].parentId | HCONTACT_ISGROUP), &contact, NULL, NULL))
continue;
group = contact->group;
}
@@ -640,7 +636,7 @@ ClcCacheEntry* cliCreateCacheItem(HCONTACT hContact )
void cliInvalidateDisplayNameCacheEntry(HCONTACT hContact)
{
- if (hContact == INVALID_HANDLE_VALUE)
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
corecli.pfnInvalidateDisplayNameCacheEntry((HCONTACT)INVALID_HANDLE_VALUE);
else {
ClcCacheEntry *p = pcli->pfnGetCacheEntry(hContact);