summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/UserInfoEx')
-rw-r--r--plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp8
-rw-r--r--plugins/UserInfoEx/src/classPsTreeItem.cpp10
-rw-r--r--plugins/UserInfoEx/src/mir_icolib.cpp16
3 files changed, 17 insertions, 17 deletions
diff --git a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp
index 61fab1365b..9774ac2f42 100644
--- a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp
+++ b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp
@@ -388,15 +388,15 @@ void InitIcons()
phIconHandles = (HANDLE*)mir_alloc(nCountriesCount*sizeof(HANDLE));
if (phIconHandles != NULL) {
char szId[20];
- SKINICONDESC sid = { sizeof(sid) };
- sid.ptszSection = LPGENT("Country flags");
+ SKINICONDESC sid = { 0 };
+ sid.section.t = LPGENT("Country flags");
sid.pszName = szId; // name to refer to icon when playing and in db
sid.cx = GetSystemMetrics(SM_CXSMICON);
sid.cy = GetSystemMetrics(SM_CYSMICON);
sid.flags = SIDF_SORTED | SIDF_TCHAR;
for (int i=0; i < nCountriesCount; i++) {
- sid.ptszDescription = mir_a2t(LPGEN(countries[i].szName));
+ sid.description.t = mir_a2t(LPGEN(countries[i].szName));
/* create identifier */
mir_snprintf(szId, SIZEOF(szId), (countries[i].id == 0xFFFF) ? "%s0x%X" : "%s%i", "flags_", countries[i].id); /* buffer safe */
int index = CountryNumberToBitmapIndex(countries[i].id);
@@ -406,7 +406,7 @@ void InitIcons()
phIconHandles[index] = Skin_AddIcon(&sid);
if (sid.hDefaultIcon!=NULL) DestroyIcon(sid.hDefaultIcon);
- mir_free(sid.ptszDescription); sid.ptszDescription = NULL;
+ mir_free(sid.description.t); sid.description.t = NULL;
}
}
ImageList_Destroy(himl);
diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp
index 32ffb499fd..4aab90ed26 100644
--- a/plugins/UserInfoEx/src/classPsTreeItem.cpp
+++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp
@@ -318,13 +318,13 @@ int CPsTreeItem::Icon(HIMAGELIST hIml, OPTIONSDIALOGPAGE *odp, BYTE bInitIconsOn
if (!(hIcon = Skin_GetIcon(pszIconName))) {
bool bNeedFree = false;
- SKINICONDESC sid = { sizeof(sid) };
+ SKINICONDESC sid = { 0 };
sid.flags = SIDF_ALL_TCHAR;
sid.cx = GetSystemMetrics(SM_CXSMICON);
sid.cy = GetSystemMetrics(SM_CYSMICON);
sid.pszName = (LPSTR)pszIconName;
- sid.ptszDescription = _ptszLabel;
- sid.ptszSection = LPGENT(SECT_TREE);
+ sid.description.t = _ptszLabel;
+ sid.section.t = LPGENT(SECT_TREE);
// the item to insert brings along an icon?
if (odp->flags & ODPF_ICON) {
@@ -332,10 +332,10 @@ int CPsTreeItem::Icon(HIMAGELIST hIml, OPTIONSDIALOGPAGE *odp, BYTE bInitIconsOn
if (odp->hInstance == ghInst) {
// the pszGroup holds the iconfile for items added by uinfoex
- sid.ptszDefaultFile = odp->ptszGroup;
+ sid.defaultFile.t = odp->ptszGroup;
// icon library exists?
- if (sid.ptszDefaultFile)
+ if (sid.defaultFile.t)
sid.iDefaultIndex = (INT_PTR)odp->hIcon;
// no valid icon library
else {
diff --git a/plugins/UserInfoEx/src/mir_icolib.cpp b/plugins/UserInfoEx/src/mir_icolib.cpp
index 4b8388382f..2154abdc46 100644
--- a/plugins/UserInfoEx/src/mir_icolib.cpp
+++ b/plugins/UserInfoEx/src/mir_icolib.cpp
@@ -226,13 +226,13 @@ static HANDLE IcoLib_RegisterIconHandleEx(LPSTR szIconID, LPSTR szDescription, L
HANDLE hIconHandle = NULL;
if (szIconID && szDescription && szSection) {
- SKINICONDESC sid = { sizeof(sid) };
+ SKINICONDESC sid = { 0 };
sid.flags = SIDF_ALL_TCHAR;
sid.pszName = szIconID;
- sid.ptszDescription = mir_a2t(szDescription);
- sid.ptszSection = mir_a2t(szSection);
+ sid.description.t = mir_a2t(szDescription);
+ sid.section.t = mir_a2t(szSection);
- if (sid.ptszDescription && sid.ptszSection) {
+ if (sid.description.t && sid.section.t) {
switch (Size) {
// small icons (16x16)
case 0:
@@ -252,8 +252,8 @@ static HANDLE IcoLib_RegisterIconHandleEx(LPSTR szIconID, LPSTR szDescription, L
break;
}
- sid.ptszDefaultFile = szDefaultFile;
- if (sid.ptszDefaultFile && sid.ptszDefaultFile[0])
+ sid.defaultFile.t = szDefaultFile;
+ if (sid.defaultFile.t && sid.defaultFile.t[0])
sid.iDefaultIndex = -idIcon;
else {
sid.hDefaultIcon = hDefIcon;
@@ -261,8 +261,8 @@ static HANDLE IcoLib_RegisterIconHandleEx(LPSTR szIconID, LPSTR szDescription, L
}
hIconHandle = Skin_AddIcon(&sid);
}
- MIR_FREE(sid.ptszDescription);
- MIR_FREE(sid.ptszSection);
+ MIR_FREE(sid.description.t);
+ MIR_FREE(sid.section.t);
}
return hIconHandle;
}