diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-07 18:19:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-07 18:19:34 +0000 |
commit | e5cb033463036b182fb6e5e3eed50a14987f5300 (patch) | |
tree | c1e0c20c1fb1808f658f4aadf624a57474576eb4 /src/modules/icolib/skin2icons.cpp | |
parent | e2d81fead804c1d7dd557af5d3082ba0399a38c1 (diff) |
SKINICONDESC -> MAllStrings
git-svn-id: http://svn.miranda-ng.org/main/trunk@14054 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/icolib/skin2icons.cpp')
-rw-r--r-- | src/modules/icolib/skin2icons.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
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;
|