diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-04 21:07:46 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-04 21:07:46 +0300 |
commit | d4b6de0fb4ca58063eb2f424c77e74e703022b63 (patch) | |
tree | 831c18be8048b34ddacf132c1bb204e92cd9cb92 /plugins/Clist_modern | |
parent | 53156bdc6edde511dbdf5e999756cd80d0a97e13 (diff) |
static function CLIST_INTERFACE::pfnGetContactIcon exported as Clist_GetContactIcon (history++ to be recompiled)
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/init.cpp | 1 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clc.cpp | 8 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clcitems.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clistevents.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clistmod.cpp | 8 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_commonprototypes.h | 1 |
6 files changed, 9 insertions, 19 deletions
diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp index 03be2402e9..553f41a45a 100644 --- a/plugins/Clist_modern/src/init.cpp +++ b/plugins/Clist_modern/src/init.cpp @@ -174,7 +174,6 @@ static HRESULT SubclassClistInterface() pcli->pfnGetContactHiddenStatus = CLVM_GetContactHiddenStatus;
// partialy overloaded - call default handlers from inside
- pcli->pfnGetContactIcon = cli_GetContactIcon;
pcli->pfnIconFromStatusMode = cli_IconFromStatusMode;
pcli->pfnLoadCluiGlobalOpts = CLUI_cli_LoadCluiGlobalOpts;
pcli->pfnLoadClcOptions = cli_LoadCLCOptions;
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 090f7c5284..7cfbdaeddd 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -1317,7 +1317,7 @@ static LRESULT clcOnIntmGroupChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wPara static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM lParam)
{
bool needRepaint = false;
- int contacticon = corecli.pfnGetContactIcon(wParam);
+ int contacticon = Clist_GetContactIcon(wParam);
MCONTACT hSelItem = 0;
ClcGroup *selgroup;
@@ -1333,7 +1333,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam bool isVisiblebyFilter = (((style & CLS_SHOWHIDDEN) && nHiddenStatus != -1) || !nHiddenStatus);
bool ifVisibleByClui = !pcli->pfnIsHiddenMode(dat, status);
bool isVisible = (g_CluiData.bFilterEffective & CLVM_FILTER_STATUS) ? TRUE : ifVisibleByClui;
- bool isIconChanged = cli_GetContactIcon(wParam) != LOWORD(lParam);
+ bool isIconChanged = Clist_GetContactIcon(wParam) != LOWORD(lParam);
int shouldShow = isVisiblebyFilter && (isVisible || isIconChanged);
@@ -1513,11 +1513,11 @@ static LRESULT clcOnIntmStatusChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM Cache_GetNthLineText(dat, pdnce, 3);
}
- SendMessage(hwnd, INTM_ICONCHANGED, wParam, corecli.pfnGetContactIcon(wParam));
+ SendMessage(hwnd, INTM_ICONCHANGED, wParam, Clist_GetContactIcon(wParam));
if (contact->type == CLCIT_CONTACT) {
if (!contact->bImageIsSpecial && pdnce->getStatus() > ID_STATUS_OFFLINE)
- contact->iImage = corecli.pfnGetContactIcon(wParam);
+ contact->iImage = Clist_GetContactIcon(wParam);
if (contact->iSubNumber && contact->subcontacts && contact->subcontacts->type == CLCIT_CONTACT)
Clist_Broadcast(INTM_STATUSCHANGED, contact->subcontacts->hContact, 0); //forward status changing to host meta contact
}
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index 557f4edbe3..9dfe3505b6 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -61,7 +61,7 @@ void AddSubcontacts(ClcData *dat, ClcContact *cont, BOOL showOfflineHereGroup) p.avatar_pos = AVATAR_POS_DONT_HAVE;
Cache_GetAvatar(dat, &p);
- p.iImage = corecli.pfnGetContactIcon(pdnce->hContact);
+ p.iImage = Clist_GetContactIcon(pdnce->hContact);
memset(p.iExtraImage, 0xFF, sizeof(p.iExtraImage));
p.proto = pdnce->szProto;
p.type = CLCIT_CONTACT;
@@ -163,7 +163,7 @@ static void _LoadDataToContact(ClcContact *cont, ClcCacheEntry *pdnce, ClcGroup Cache_GetAvatar(dat, cont);
Cache_GetText(dat, cont);
Cache_GetTimezone(dat, cont->hContact);
- cont->iImage = corecli.pfnGetContactIcon(hContact);
+ cont->iImage = Clist_GetContactIcon(hContact);
cont->bContactRate = db_get_b(hContact, "CList", "Rate", 0);
}
diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp index a336f326f9..bfc45dcb56 100644 --- a/plugins/Clist_modern/src/modern_clistevents.cpp +++ b/plugins/Clist_modern/src/modern_clistevents.cpp @@ -288,7 +288,7 @@ static int EventArea_DrawWorker(HWND hWnd, HDC hDC) rc.left += 26;
if (g_CluiData.hUpdateContact != 0) {
wchar_t *szName = pcli->pfnGetContactDisplayName(g_CluiData.hUpdateContact, 0);
- int iIcon = cli_GetContactIcon(g_CluiData.hUpdateContact);
+ int iIcon = Clist_GetContactIcon(g_CluiData.hUpdateContact);
ske_ImageList_DrawEx(g_himlCListClc, iIcon, hDC, rc.left, (rc.bottom + rc.top - GetSystemMetrics(SM_CYSMICON)) / 2, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), CLR_NONE, CLR_NONE, ILD_NORMAL);
rc.left += 18;
@@ -303,7 +303,7 @@ static int EventArea_DrawWorker(HWND hWnd, HDC hDC) NotifyMenuItemExData *nmi = (struct NotifyMenuItemExData *) mii.dwItemData;
wchar_t *szName = pcli->pfnGetContactDisplayName(nmi->hContact, 0);
- int iIcon = cli_GetContactIcon(nmi->hContact);
+ int iIcon = Clist_GetContactIcon(nmi->hContact);
ske_ImageList_DrawEx(g_himlCListClc, iIcon, hDC, rc.left, (rc.bottom + rc.top - GetSystemMetrics(SM_CYSMICON)) / 2, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), CLR_NONE, CLR_NONE, ILD_NORMAL);
rc.left += 18;
ske_ImageList_DrawEx(g_himlCListClc, nmi->iIcon, hDC, 4, (rc.bottom + rc.top) / 2 - 8, 16, 16, CLR_NONE, CLR_NONE, ILD_NORMAL);
@@ -366,7 +366,7 @@ static LRESULT CALLBACK EventArea_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LP if (GetMenuItemInfoA(g_CluiData.hMenuNotify, (UINT)dis->itemID, FALSE, &mii) != 0) {
NotifyMenuItemExData *nmi = (NotifyMenuItemExData *)mii.dwItemData;
if (nmi) {
- int iIcon = cli_GetContactIcon(nmi->hContact);
+ int iIcon = Clist_GetContactIcon(nmi->hContact);
ske_ImageList_DrawEx(g_himlCListClc, nmi->iIcon, dis->hDC, 2, (dis->rcItem.bottom + dis->rcItem.top - GetSystemMetrics(SM_CYSMICON)) / 2, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), CLR_NONE, CLR_NONE, ILD_NORMAL);
ske_ImageList_DrawEx(g_himlCListClc, iIcon, dis->hDC, 2 + GetSystemMetrics(SM_CXSMICON) + 2, (dis->rcItem.bottom + dis->rcItem.top - GetSystemMetrics(SM_CYSMICON)) / 2, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), CLR_NONE, CLR_NONE, ILD_NORMAL);
return TRUE;
diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index 650bd4181a..7d1bf35620 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -105,14 +105,6 @@ int cli_IconFromStatusMode(const char *szProto, int nStatus, MCONTACT hContact) return corecli.pfnIconFromStatusMode(szProto, nStatus, 0);
}
-int cli_GetContactIcon(MCONTACT hContact)
-{
- int res = corecli.pfnGetContactIcon(hContact);
- if (res != -1)
- res &= 0xFFFF;
- return res;
-}
-
int GetContactIconC(ClcCacheEntry *p)
{
return pcli->pfnIconFromStatusMode(p->szProto, p->szProto == nullptr ? ID_STATUS_OFFLINE : p->m_iStatus, p->hContact);
diff --git a/plugins/Clist_modern/src/modern_commonprototypes.h b/plugins/Clist_modern/src/modern_commonprototypes.h index d1cdfe9726..0a3245518b 100644 --- a/plugins/Clist_modern/src/modern_commonprototypes.h +++ b/plugins/Clist_modern/src/modern_commonprototypes.h @@ -233,7 +233,6 @@ int cliGetGroupContentsCount(ClcGroup *group, int visibleOnly); int cliFindRowByText(HWND hwnd, ClcData *dat, const wchar_t *text, int prefixOk);
int cliGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex);
int cli_IconFromStatusMode(const char *szProto, int nStatus, MCONTACT hContact);
-int cli_GetContactIcon(MCONTACT hContact);
int cli_RemoveEvent(MCONTACT hContact, MEVENT hDbEvent);
void cli_FreeContact(ClcContact*);
void cli_SetContactCheckboxes(ClcContact*, int);
|