From 66ddfd87a0e55b9534b8669392bb0cdee2e9fa3b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 1 Dec 2012 21:07:34 +0000 Subject: SKINICONDESC initialization - end-II :) git-svn-id: http://svn.miranda-ng.org/main/trunk@2599 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/skin/skinicons.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/modules/skin/skinicons.cpp b/src/modules/skin/skinicons.cpp index 02b7d141f1..141dab3e58 100644 --- a/src/modules/skin/skinicons.cpp +++ b/src/modules/skin/skinicons.cpp @@ -257,19 +257,18 @@ HICON LoadSkinProtoIcon(const char* szProto, int status, bool big) PROTOACCOUNT* pa = Proto_GetAccount(szProto); if (pa) { TCHAR szPath[MAX_PATH], szFullPath[MAX_PATH], *str; - SKINICONDESC sid = { 0 }; + GetModuleFileName(hInst, szPath, MAX_PATH); // // Queried protocol isn't in list, adding // TCHAR tszSection[MAX_PATH]; mir_sntprintf(tszSection, SIZEOF(tszSection), _T("%s%s"), _T(PROTOCOLS_PREFIX), pa->tszAccountName); - sid.ptszSection = tszSection; - sid.cbSize = sizeof(sid); + SKINICONDESC sid = { sizeof(sid) }; + sid.ptszSection = tszSection; sid.flags = SIDF_ALL_TCHAR; - GetModuleFileName(hInst, szPath, MAX_PATH); str = _tcsrchr(szPath, '\\'); if (str != NULL) *str = 0; @@ -394,10 +393,8 @@ static INT_PTR sttLoadSkinProtoIconBig(WPARAM wParam, LPARAM lParam) int LoadSkinIcons(void) { - SKINICONDESC sid; int i, j = 0; char iconName[MAX_PATH], moduleName[MAX_PATH]; - TCHAR modulePath[MAX_PATH]; DBVARIANT dbv; // @@ -442,9 +439,10 @@ int LoadSkinIcons(void) CreateServiceFunction(MS_SKIN_LOADPROTOICON, sttLoadSkinProtoIcon); CreateServiceFunction(MS_SKIN_LOADPROTOICONBIG, sttLoadSkinProtoIconBig); - ZeroMemory(&sid, sizeof(sid)); - sid.cbSize = sizeof(sid); + TCHAR modulePath[MAX_PATH]; GetModuleFileName(NULL, modulePath, SIZEOF(modulePath)); + + SKINICONDESC sid = { sizeof(sid) }; sid.ptszDefaultFile = modulePath; sid.flags = SIDF_PATH_TCHAR; sid.pszName = iconName; -- cgit v1.2.3