summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-02-23 16:14:06 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-02-23 16:14:06 +0000
commit2e711d104e232f6e957cf2dcd6954f659c980f02 (patch)
tree2bc5e957690ffb17550014577d4fcebca0a2505b /src/modules
parentee8802d8809f2effd5ae827cba7137f2dd684b6d (diff)
correct Jabber account icon calculation
git-svn-id: http://svn.miranda-ng.org/main/trunk@3734 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/protocols/protoopts.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/modules/protocols/protoopts.cpp b/src/modules/protocols/protoopts.cpp
index 636a316222..80471da93f 100644
--- a/src/modules/protocols/protoopts.cpp
+++ b/src/modules/protocols/protoopts.cpp
@@ -547,9 +547,8 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM
case WM_DRAWITEM:
{
- int tmp, size, length;
+ int tmp;
TCHAR *text;
- HICON hIcon;
HBRUSH hbrBack;
SIZE sz;
@@ -584,7 +583,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM
else
tmp = acc->bIsEnabled ? SKINICON_OTHER_TICK : SKINICON_OTHER_NOTICK;
- hIcon = LoadSkinnedIcon(tmp);
+ HICON hIcon = LoadSkinnedIcon(tmp);
DrawIconEx(lps->hDC, lps->rcItem.left, lps->rcItem.top, hIcon, cxIcon, cyIcon, 0, hbrBack, DI_NORMAL);
IcoLib_ReleaseIcon(hIcon, 0);
@@ -597,8 +596,8 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM
}
lps->rcItem.left += cxIcon + 2;
- length = SendDlgItemMessage(hwndDlg, IDC_ACCLIST, LB_GETTEXTLEN, lps->itemID, 0);
- size = max(length+1, 256);
+ int length = SendDlgItemMessage(hwndDlg, IDC_ACCLIST, LB_GETTEXTLEN, lps->itemID, 0);
+ int size = max(length+1, 256);
text = (TCHAR *)_alloca(sizeof(TCHAR) * size);
SendDlgItemMessage(hwndDlg, IDC_ACCLIST, LB_GETTEXT, lps->itemID, (LPARAM)text);