From b947df9fed0907995842d4c7121157508feac65e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 30 May 2012 13:01:44 +0000 Subject: Weather Unicode git-svn-id: http://svn.miranda-ng.org/main/trunk@230 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Weather/weather_icons.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'protocols/Weather/weather_icons.cpp') diff --git a/protocols/Weather/weather_icons.cpp b/protocols/Weather/weather_icons.cpp index e1b95c4405..ada253bb07 100644 --- a/protocols/Weather/weather_icons.cpp +++ b/protocols/Weather/weather_icons.cpp @@ -45,33 +45,29 @@ static iconList[] = void InitIcons(void) { - char szFile[MAX_PATH]; char szSettingName[100]; - SKINICONDESC sid = {0}; - unsigned i; - + TCHAR szFile[MAX_PATH]; GetModuleFileName(hInst, szFile, MAX_PATH); - sid.cbSize = sizeof(SKINICONDESC); - sid.pszDefaultFile = szFile; + SKINICONDESC sid = {0}; + sid.cbSize = sizeof(sid); + sid.ptszDefaultFile = szFile; sid.pszName = szSettingName; sid.pszSection = WEATHERPROTONAME; + sid.flags = SIDF_PATH_TCHAR; - for (i = 0; i < SIZEOF(iconList); i++) - { - mir_snprintf(szSettingName, sizeof( szSettingName ), "%s_%s", WEATHERPROTONAME, iconList[i].szName); + for (int i = 0; i < SIZEOF(iconList); i++) { + mir_snprintf(szSettingName, SIZEOF( szSettingName ), "%s_%s", WEATHERPROTONAME, iconList[i].szName); sid.pszDescription = iconList[i].szDescr; sid.iDefaultIndex = -iconList[i].defIconID; iconList[i].hIconLibItem = ( HANDLE )CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid); - } -} - +} } HICON LoadIconEx(const char* name, BOOL big) { char szSettingName[100]; - mir_snprintf(szSettingName, sizeof(szSettingName), "%s_%s", WEATHERPROTONAME, name); + mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", WEATHERPROTONAME, name); return (HICON)CallService(MS_SKIN2_GETICON, big, (LPARAM)szSettingName); } -- cgit v1.2.3