From 854959cbc0a1bad2c086214be4d1a829b17a61f3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 1 Dec 2012 13:25:11 +0000 Subject: icolib: icon creation quirks git-svn-id: http://svn.miranda-ng.org/main/trunk@2588 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MRA/src/MraIcons.cpp | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) (limited to 'protocols/MRA/src/MraIcons.cpp') diff --git a/protocols/MRA/src/MraIcons.cpp b/protocols/MRA/src/MraIcons.cpp index be4790745f..a7bf1d446b 100644 --- a/protocols/MRA/src/MraIcons.cpp +++ b/protocols/MRA/src/MraIcons.cpp @@ -38,7 +38,7 @@ GUI_DISPLAY_ITEM gdiContactMenuItems[] = GUI_DISPLAY_ITEM gdiExtraStatusIconsItems[] = { - { ADV_ICON_DELETED_ID, ADV_ICON_DELETED_STR, (INT_PTR)IDI_ERROR, NULL }, + { ADV_ICON_DELETED_ID, ADV_ICON_DELETED_STR, IDI_DELETED, NULL }, { ADV_ICON_NOT_ON_SERVER_ID, ADV_ICON_NOT_ON_SERVER_STR, IDI_AUTHGRANT, NULL }, { ADV_ICON_NOT_AUTHORIZED_ID, ADV_ICON_NOT_AUTHORIZED_STR, IDI_AUTHRUGUEST, NULL }, { ADV_ICON_PHONE_ID, ADV_ICON_PHONE_STR, IDI_MRA_PHONE, NULL }, @@ -47,30 +47,28 @@ GUI_DISPLAY_ITEM gdiExtraStatusIconsItems[] = ////////////////////////////////////////////////////////////////////////////////////// -static void AddIcoLibItems(LPWSTR lpwszSubSectionName, GUI_DISPLAY_ITEM *pgdiItems, size_t dwCount) +static void AddIcoLibItems(LPWSTR lptszSubSectionName, GUI_DISPLAY_ITEM *pgdiItems, size_t dwCount) { - char szBuff[MAX_PATH]; - WCHAR wszSection[MAX_PATH], wszPath[MAX_FILEPATH]; + TCHAR tszSection[MAX_PATH], tszPath[MAX_FILEPATH]; + GetModuleFileName(masMraSettings.hInstance, tszPath, SIZEOF(tszPath)); + mir_sntprintf(tszSection, SIZEOF(tszSection), L"Protocols/MRA/%s", lptszSubSectionName); - SKINICONDESC sid = {0}; - sid.cbSize = sizeof(sid); - sid.pwszSection = wszSection; - sid.pwszDefaultFile = wszPath; + SKINICONDESC sid = { sizeof(sid) }; + sid.ptszSection = tszSection; + sid.ptszDefaultFile = tszPath; sid.cx = sid.cy = 16; sid.flags = SIDF_ALL_UNICODE; - if (lpwszSubSectionName == NULL) lpwszSubSectionName = L""; - GetModuleFileName(masMraSettings.hInstance, wszPath, SIZEOF(wszPath)); - mir_sntprintf(wszSection, SIZEOF(wszSection), L"Protocols/MRA/%s", lpwszSubSectionName); + if (lptszSubSectionName == NULL) + lptszSubSectionName = _T(""); for (size_t i = 0;i