diff options
author | George Hazan <george.hazan@gmail.com> | 2013-02-12 18:08:33 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-02-12 18:08:33 +0000 |
commit | 36fd7d44957934f4fe6ddc1bb9597ae42519ad9d (patch) | |
tree | f1254ab95742d50baa4c026dbfd529d26dc7c60e /plugins | |
parent | 64d6ba3286ecbf7f833e7aea52cd55487c95f9ef (diff) |
various PS_GETCUSTOMSTATUSICON-related issues
git-svn-id: http://svn.miranda-ng.org/main/trunk@3577 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Clist_nicer/src/clui.cpp | 11 | ||||
-rw-r--r-- | plugins/MyDetails/src/frame.cpp | 4 |
2 files changed, 8 insertions, 7 deletions
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 7a5ff0a196..d9639080cf 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -1757,7 +1757,8 @@ buttons_done: char szBuffer[128];
mir_snprintf(szBuffer, 128, "%s_conn", pd->RealName);
hIcon = Skin_GetIcon(szBuffer);
- } else if (cfg::dat.bShowXStatusOnSbar && status > ID_STATUS_OFFLINE) {
+ }
+ else if (cfg::dat.bShowXStatusOnSbar && status > ID_STATUS_OFFLINE) {
CUSTOM_STATUS cst = {0};
char szServiceName[128];
int xStatus;
@@ -1766,12 +1767,12 @@ buttons_done: cst.cbSize = sizeof(CUSTOM_STATUS);
cst.flags = CSSF_MASK_STATUS;
cst.status = &xStatus;
- if (ServiceExists(szServiceName) && !CallService(szServiceName, 0, (LPARAM)&cst) && xStatus > 0) {
+ if (ServiceExists(szServiceName) && !CallService(szServiceName, 0, (LPARAM)&cst) && xStatus > 0)
hIcon = (HICON)CallProtoService(pd->RealName, PS_GETCUSTOMSTATUSICON, 0, LR_SHARED); // get OWN xStatus icon (if set)
- } else
+ else
hIcon = LoadSkinnedProtoIcon(szProto, status);
- } else
- hIcon = LoadSkinnedProtoIcon(szProto, status);
+ }
+ else hIcon = LoadSkinnedProtoIcon(szProto, status);
if ( !(showOpts & 6) && cfg::dat.bEqualSections)
x = (dis->rcItem.left + dis->rcItem.right - 16) >> 1;
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp index 2922ff537e..b741c2fb4d 100644 --- a/plugins/MyDetails/src/frame.cpp +++ b/plugins/MyDetails/src/frame.cpp @@ -1265,13 +1265,13 @@ void Draw(HWND hwnd, HDC hdc_orig) HICON status_icon;
if (proto->custom_status != 0 && ProtoServiceExists(proto->name, PS_GETCUSTOMSTATUSICON))
- status_icon = (HICON) CallProtoService(proto->name, PS_GETCUSTOMSTATUSICON, proto->custom_status, 0);
+ status_icon = (HICON)CallProtoService(proto->name, PS_GETCUSTOMSTATUSICON, proto->custom_status, LR_SHARED);
else
status_icon = LoadSkinnedProtoIcon(proto->name, proto->status);
if (status_icon != NULL) {
DrawIconEx(hdc, data->status_icon_rect.left, data->status_icon_rect.top, status_icon, ICON_SIZE, ICON_SIZE, 0, NULL, DI_NORMAL);
- DeleteObject(status_icon);
+ Skin_ReleaseIcon(status_icon);
}
SelectClipRgn(hdc, NULL);
|