summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/classPsTreeItem.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-12-01 13:25:11 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-12-01 13:25:11 +0000
commit854959cbc0a1bad2c086214be4d1a829b17a61f3 (patch)
treeee3de50f4b4e57f54ae20d139f97fa469ff90d34 /plugins/UserInfoEx/src/classPsTreeItem.cpp
parent73ddc73d92675399e4619758d4b0881418de0a6d (diff)
icolib: icon creation quirks
git-svn-id: http://svn.miranda-ng.org/main/trunk@2588 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/classPsTreeItem.cpp')
-rw-r--r--plugins/UserInfoEx/src/classPsTreeItem.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp
index c9da4f453d..47d161e573 100644
--- a/plugins/UserInfoEx/src/classPsTreeItem.cpp
+++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp
@@ -361,12 +361,8 @@ INT CPsTreeItem::Icon(HIMAGELIST hIml, OPTIONSDIALOGPAGE *odp, BOOLEAN bInitIcon
LPCSTR pszIconName = IconKey();
// use icolib to handle icons
- if (!(hIcon = IcoLib_GetIcon(pszIconName)))
- {
- SKINICONDESC sid;
-
- ZeroMemory(&sid, sizeof(sid));
- sid.cbSize = sizeof(sid);
+ if (!(hIcon = IcoLib_GetIcon(pszIconName))) {
+ SKINICONDESC sid = { sizeof(sid) };
sid.flags = SIDF_ALL_TCHAR;
sid.cx = GetSystemMetrics(SM_CXSMICON);
sid.cy = GetSystemMetrics(SM_CYSMICON);
@@ -402,7 +398,8 @@ INT CPsTreeItem::Icon(HIMAGELIST hIml, OPTIONSDIALOGPAGE *odp, BOOLEAN bInitIcon
else {
sid.iDefaultIndex = -1;
sid.hDefaultIcon = ProtoIcon();
- if (!sid.hDefaultIcon) sid.hDefaultIcon = ImageList_GetIcon(hIml, 0, ILD_NORMAL);
+ if (!sid.hDefaultIcon)
+ sid.hDefaultIcon = ImageList_GetIcon(hIml, 0, ILD_NORMAL);
}
// add file to icolib
Skin_AddIcon(&sid);