From 54c8105a8c651821638340c25ebf1028d92d06fb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 22 Jan 2014 20:32:54 +0000 Subject: calls of MS_CLIST_GETCONTACTICON replaced with the direct CLIST_INTERFACE calls git-svn-id: http://svn.miranda-ng.org/main/trunk@7831 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_mw/src/clc.cpp | 4 +++- plugins/Clist_mw/src/clcitems.cpp | 10 +++++----- plugins/Clist_mw/src/clistmod.cpp | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/plugins/Clist_mw/src/clc.cpp b/plugins/Clist_mw/src/clc.cpp index 1743f33926..e11b858931 100644 --- a/plugins/Clist_mw/src/clc.cpp +++ b/plugins/Clist_mw/src/clc.cpp @@ -156,7 +156,9 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L else status = cacheEntry->status; - shouldShow = (GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_SHOWHIDDEN || !cacheEntry->bIsHidden) && (!pcli->pfnIsHiddenMode(dat,status)||cacheEntry->noHiddenOffline || CallService(MS_CLIST_GETCONTACTICON,wParam,0) != LOWORD(lParam)); //this means an offline msg is flashing, so the contact should be shown + // this means an offline msg is flashing, so the contact should be shown + shouldShow = (GetWindowLongPtr(hwnd,GWL_STYLE) & CLS_SHOWHIDDEN || !cacheEntry->bIsHidden) && + (!pcli->pfnIsHiddenMode(dat,status) || cacheEntry->noHiddenOffline || pcli->pfnGetContactIcon((HANDLE)wParam) != LOWORD(lParam)); ClcContact *contact; ClcGroup *group; diff --git a/plugins/Clist_mw/src/clcitems.cpp b/plugins/Clist_mw/src/clcitems.cpp index 6f66fec4c2..16e09c18c0 100644 --- a/plugins/Clist_mw/src/clcitems.cpp +++ b/plugins/Clist_mw/src/clcitems.cpp @@ -58,7 +58,7 @@ void AddSubcontacts(struct ClcContact * cont) cacheEntry->status != ID_STATUS_OFFLINE ) { cont->subcontacts[i].hContact = cacheEntry->hContact; - cont->subcontacts[i].iImage = CallService(MS_CLIST_GETCONTACTICON,(WPARAM)cacheEntry->hContact,0); + cont->subcontacts[i].iImage = pcli->pfnGetContactIcon(cacheEntry->hContact); memset(cont->subcontacts[i].iExtraImage, 0xFF, sizeof(cont->subcontacts[i].iExtraImage)); cont->subcontacts[i].proto = cacheEntry->szProto; lstrcpyn(cont->subcontacts[i].szText,cacheEntry->tszName,SIZEOF(cont->subcontacts[i].szText)); @@ -110,7 +110,7 @@ int AddInfoItemToGroup(ClcGroup *group,int flags,const TCHAR *pszText) return i; } -static struct ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group,ClcCacheEntry *cacheEntry) +static struct ClcContact* AddContactToGroup(struct ClcData *dat,ClcGroup *group,ClcCacheEntry *cacheEntry) { char *szProto; WORD apparentMode; @@ -135,11 +135,11 @@ static struct ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group group->cl.items[i]->isSubcontact = 0; group->cl.items[i]->subcontacts = NULL; - if ( ProtoServiceExists(cacheEntry->szProto, PS_GETADVANCEDSTATUSICON)) + if (ProtoServiceExists(cacheEntry->szProto, PS_GETADVANCEDSTATUSICON)) img = ProtoCallService(cacheEntry->szProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hContact, 0); if (img == -1 || !(LOWORD(img))) - img = CallService(MS_CLIST_GETCONTACTICON,(WPARAM)hContact,0); + img = pcli->pfnGetContactIcon(hContact); group->cl.items[i]->iImage = img; @@ -150,7 +150,7 @@ static struct ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group //SetClcContactCacheItem(dat,hContact,&(group->cl.items[i])); szProto = cacheEntry->szProto; - if (szProto != NULL&&!pcli->pfnIsHiddenMode(dat,cacheEntry->status)) + if (szProto != NULL && !pcli->pfnIsHiddenMode(dat,cacheEntry->status)) group->cl.items[i]->flags |= CONTACTF_ONLINE; apparentMode = szProto != NULL?cacheEntry->ApparentMode:0; if (apparentMode == ID_STATUS_OFFLINE) group->cl.items[i]->flags |= CONTACTF_INVISTO; diff --git a/plugins/Clist_mw/src/clistmod.cpp b/plugins/Clist_mw/src/clistmod.cpp index 99e6edef66..9beb827e1d 100644 --- a/plugins/Clist_mw/src/clistmod.cpp +++ b/plugins/Clist_mw/src/clistmod.cpp @@ -63,11 +63,11 @@ int cli_IconFromStatusMode(const char *szProto,int nStatus, HANDLE hContact) } } - if ( ProtoServiceExists(szActProto, PS_GETADVANCEDSTATUSICON)) + if (ProtoServiceExists(szActProto, PS_GETADVANCEDSTATUSICON)) result = ProtoCallService(szActProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hActContact, 0); + // result == -1 means no Advanced icon. LOWORD(result) == 0 happens when Advanced icon returned by ICQ (i.e. no transpot) if (result == -1 || !(LOWORD(result))) - // result == -1 means no Advanced icon. LOWORD(result) == 0 happens when Advanced icon returned by ICQ (i.e. no transpot) result = saveIconFromStatusMode(szActProto,nActStatus,NULL); } else result = saveIconFromStatusMode(szProto,nStatus,NULL); -- cgit v1.2.3