summaryrefslogtreecommitdiff
path: root/plugins/Gender/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-02 14:11:01 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-02 14:11:01 +0000
commit75b1ff75c42644eb36552762652e4b0c9ff071bc (patch)
tree238f026ef373d30a395846f38c302a81961b14ac /plugins/Gender/src
parent2caba72d51b09368801f23dd8951d589ab4dc809 (diff)
final switch to the typed icolib api
git-svn-id: http://svn.miranda-ng.org/main/trunk@2152 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Gender/src')
-rw-r--r--plugins/Gender/src/main.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/Gender/src/main.cpp b/plugins/Gender/src/main.cpp
index f778fa11f6..9f8c46f623 100644
--- a/plugins/Gender/src/main.cpp
+++ b/plugins/Gender/src/main.cpp
@@ -141,9 +141,9 @@ int onExtraImageListRebuild(WPARAM wParam, LPARAM lParam)
{
if(hIcoLibIconsChanged)
{
- g_IECMale.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_hIconMale), (LPARAM)0);
- g_IECFemale.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_hIconFemale), (LPARAM)0);
- g_IECUndef.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_hIconMenu), (LPARAM)0);
+ g_IECMale.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)Skin_GetIconByHandle(g_hIconMale), 0);
+ g_IECFemale.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)Skin_GetIconByHandle(g_hIconFemale), 0);
+ g_IECUndef.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)Skin_GetIconByHandle(g_hIconMenu), 0);
}
}
@@ -156,10 +156,11 @@ INT_PTR GetIcon(WPARAM wParam, LPARAM lParam)
char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
unsigned short gender = DBGetContactSettingByte((HANDLE)wParam, "UserInfo", "Gender", DBGetContactSettingByte((HANDLE)wParam, proto, "Gender", 0));
- if (gender > 0)
- {
- if (gender == 77) return CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_hIconMale);
- else if (gender == 70) return CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_hIconFemale);
+ if (gender > 0) {
+ if (gender == 77)
+ return (INT_PTR)Skin_GetIconByHandle(g_hIconMale);
+ if (gender == 70)
+ return (INT_PTR)Skin_GetIconByHandle(g_hIconFemale);
}
return 0;
@@ -376,19 +377,18 @@ int onSystemOKToExit(WPARAM wParam,LPARAM lParam)
UnhookEvent(hHookPrebuildContactMenu);
UnhookEvent(hOptInitialise);
UnhookEvent(hSystemOKToExit);
- if (hIcoLibIconsChanged) UnhookEvent(hIcoLibIconsChanged);
-
+ if (hIcoLibIconsChanged)
+ UnhookEvent(hIcoLibIconsChanged);
DestroyServiceFunction(hSetMale);
DestroyServiceFunction(hSetFemale);
DestroyServiceFunction(hSetUndef);
DestroyServiceFunction(hGenderGetIcon);
- if (hIcoLibIconsChanged)
- {
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)"menu_icon");
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)"male_icon");
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)"female_icon");
+ if (hIcoLibIconsChanged) {
+ Skin_ReleaseIcon("menu_icon");
+ Skin_ReleaseIcon("male_icon");
+ Skin_ReleaseIcon("female_icon");
}
return 0;