From c67ee19b7db5bd93c5dbc11865834ff8dd1db924 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 7 Jun 2013 19:34:51 +0000 Subject: - clist_modern: we don't redeclare code services anymore; - new CLIST_INTERFACE member: pfnGetContactIcon - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@4898 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/clist/clc.h | 1 + src/modules/clist/clistcore.cpp | 2 ++ src/modules/clist/clistmod.cpp | 11 +++++++---- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/modules/clist/clc.h b/src/modules/clist/clc.h index 1e259be92d..215e0eaec7 100644 --- a/src/modules/clist/clc.h +++ b/src/modules/clist/clc.h @@ -146,6 +146,7 @@ int fnGetImlIconIndex(HICON hIcon); int fnRemoveEvent(HANDLE hContact, HANDLE dbEvent); /* clistmod.c */ +int fnGetContactIcon(HANDLE hContact); int fnIconFromStatusMode(const char *szProto, int status, HANDLE hContact); int fnShowHide(WPARAM wParam, LPARAM lParam); HICON fnGetIconFromStatusMode(HANDLE hContact, const char *szProto, int status); diff --git a/src/modules/clist/clistcore.cpp b/src/modules/clist/clistcore.cpp index 3979e73cfc..31d7ab129b 100644 --- a/src/modules/clist/clistcore.cpp +++ b/src/modules/clist/clistcore.cpp @@ -211,6 +211,8 @@ static INT_PTR srvRetrieveInterface(WPARAM, LPARAM) cli.pfnReloadExtraIcons = fnReloadExtraIcons; cli.pfnSetAllExtraIcons = fnSetAllExtraIcons; + cli.pfnGetContactIcon = fnGetContactIcon; + rc = LoadContactListModule2(); if (rc == 0) rc = LoadCLCModule(); diff --git a/src/modules/clist/clistmod.cpp b/src/modules/clist/clistmod.cpp index e25dcad0d3..75e63a242f 100644 --- a/src/modules/clist/clistmod.cpp +++ b/src/modules/clist/clistmod.cpp @@ -181,15 +181,18 @@ int fnIconFromStatusMode(const char *szProto, int status, HANDLE) return 1; } -static INT_PTR GetContactIcon(WPARAM wParam, LPARAM) +int fnGetContactIcon(HANDLE hContact) { - char *szProto = GetContactProto((HANDLE)wParam); - HANDLE hContact = (HANDLE)wParam; - + char *szProto = GetContactProto(hContact); return cli.pfnIconFromStatusMode(szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact); } +static INT_PTR GetContactIcon(WPARAM wParam, LPARAM) +{ + return cli.pfnGetContactIcon((HANDLE)wParam); +} + static void AddProtoIconIndex(PROTOACCOUNT* pa) { ProtoIconIndex *pii = new ProtoIconIndex; -- cgit v1.2.3