diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-07 19:34:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-07 19:34:51 +0000 |
commit | c67ee19b7db5bd93c5dbc11865834ff8dd1db924 (patch) | |
tree | 801930cd5de7bdbde4341d14cf7baf3b72ecca37 /src/modules/clist | |
parent | 5c7d4293bec3c872c11ace6b0d0ac02c95dd3ac7 (diff) |
- 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
Diffstat (limited to 'src/modules/clist')
-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;
|