From e5cb033463036b182fb6e5e3eed50a14987f5300 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 7 Jun 2015 18:19:34 +0000 Subject: SKINICONDESC -> MAllStrings git-svn-id: http://svn.miranda-ng.org/main/trunk@14054 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/icolib/skin2icons.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/modules/icolib') diff --git a/src/modules/icolib/skin2icons.cpp b/src/modules/icolib/skin2icons.cpp index 2f5bfed191..5b41b14e36 100644 --- a/src/modules/icolib/skin2icons.cpp +++ b/src/modules/icolib/skin2icons.cpp @@ -499,17 +499,14 @@ static void IcoLib_FreeIcon(IcolibItem* icon) ///////////////////////////////////////////////////////////////////////////////////////// // IcoLib_AddNewIcon -HANDLE IcoLib_AddNewIcon(int hLangpack, SKINICONDESC* sid) +HANDLE IcoLib_AddNewIcon(int hLangpack, SKINICONDESC *sid) { - if (sid->cbSize != sizeof(SKINICONDESC)) - return NULL; - bool utf = (sid->flags & SIDF_UNICODE) != 0; bool utf_path = (sid->flags & SIDF_PATH_UNICODE) != 0; mir_cslock lck(csIconList); - IcolibItem* item = IcoLib_FindIcon(sid->pszName); + IcolibItem *item = IcoLib_FindIcon(sid->pszName); if (!item) { item = (IcolibItem*)mir_calloc(sizeof(IcolibItem)); item->name = sid->pszName; @@ -519,12 +516,12 @@ HANDLE IcoLib_AddNewIcon(int hLangpack, SKINICONDESC* sid) item->name = mir_strdup(sid->pszName); if (utf) { - item->description = mir_u2t(sid->pwszDescription); - item->section = IcoLib_AddSection(sid->pwszSection, TRUE); + item->description = mir_u2t(sid->description.w); + item->section = IcoLib_AddSection(sid->section.w, TRUE); } else { - item->description = mir_a2t(sid->pszDescription); - WCHAR* pwszSection = sid->pszSection ? mir_a2u(sid->pszSection) : NULL; + item->description = mir_a2t(sid->description.a); + WCHAR *pwszSection = sid->section.a ? mir_a2u(sid->section.a) : NULL; item->section = IcoLib_AddSection(pwszSection, TRUE); SAFE_FREE((void**)&pwszSection); } @@ -535,12 +532,12 @@ HANDLE IcoLib_AddNewIcon(int hLangpack, SKINICONDESC* sid) } else item->orderID = 0; - if (sid->pszDefaultFile) { + if (sid->defaultFile.a) { WCHAR fileFull[ MAX_PATH ]; if (utf_path) - PathToAbsoluteT(sid->pwszDefaultFile, fileFull); + PathToAbsoluteT(sid->defaultFile.w, fileFull); else - PathToAbsoluteT(_A2T(sid->pszDefaultFile), fileFull); + PathToAbsoluteT(_A2T(sid->defaultFile.a), fileFull); item->default_file = mir_wstrdup(fileFull); } item->default_indx = sid->iDefaultIndex; -- cgit v1.2.3