diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/clist/clc.h | 1 | ||||
-rw-r--r-- | src/modules/clist/clistcore.cpp | 2 | ||||
-rw-r--r-- | src/modules/clist/clistmod.cpp | 11 |
3 files changed, 10 insertions, 4 deletions
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;
|