summaryrefslogtreecommitdiff
path: root/src/modules/skin
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-12-01 21:07:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-12-01 21:07:34 +0000
commit66ddfd87a0e55b9534b8669392bb0cdee2e9fa3b (patch)
tree6075890e2ba60622069d5179f280d64b225c9be9 /src/modules/skin
parent1860018b201d995ed051c0affb72d5a1d09fa02e (diff)
SKINICONDESC initialization - end-II :)
git-svn-id: http://svn.miranda-ng.org/main/trunk@2599 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/skin')
-rw-r--r--src/modules/skin/skinicons.cpp14
1 files changed, 6 insertions, 8 deletions
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;