From 274cffbbffa950ddf286092b52f03f76ec61a301 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 11 Sep 2012 19:28:53 +0000 Subject: slightly refactored MRA git-svn-id: http://svn.miranda-ng.org/main/trunk@1564 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MRA/MraIcons.cpp | 156 ++++++++++++++++++--------------------------- 1 file changed, 62 insertions(+), 94 deletions(-) (limited to 'protocols/MRA/MraIcons.cpp') diff --git a/protocols/MRA/MraIcons.cpp b/protocols/MRA/MraIcons.cpp index 0da6ee011e..d45e03bd73 100644 --- a/protocols/MRA/MraIcons.cpp +++ b/protocols/MRA/MraIcons.cpp @@ -1,148 +1,116 @@ #include "Mra.h" #include "MraIcons.h" - - - -void AddIcoLibItems(LPWSTR lpwszRootSectionName,LPWSTR lpwszSubSectionName,const GUI_DISPLAY_ITEM *pgdiItems,SIZE_T dwCount,HANDLE *hResult) +void CMraProto::AddIcoLibItems(LPWSTR lpwszRootSectionName, LPWSTR lpwszSubSectionName, const GUI_DISPLAY_ITEM *pgdiItems, size_t dwCount, HANDLE *hResult) { char szBuff[MAX_PATH]; - WCHAR wszSection[MAX_PATH],wszPath[MAX_FILEPATH]; + WCHAR wszSection[MAX_PATH], wszPath[MAX_FILEPATH]; - SKINICONDESC sid={0}; + SKINICONDESC sid = {0}; sid.cbSize = sizeof(sid); sid.pwszSection = wszSection; sid.pwszDefaultFile = wszPath; 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"%s%s%s",lpwszRootSectionName,PROTOCOL_NAMEW,lpwszSubSectionName); - - for (SIZE_T i=0;i