summaryrefslogtreecommitdiff
path: root/src/core/stduserinfo
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-10-28 16:18:50 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-10-28 16:18:50 +0300
commitcf9de21af3073e29cb7b149fbd8427241de70729 (patch)
tree2a0b17f49d14d4a51bc942f15bf3747509f0c3cf /src/core/stduserinfo
parent3de431cc811a1fbf9cd0d520fe33b6163c73e919 (diff)
- old useless helpers removed from the Options module;
- mir_app functions introduced instead of them; - OPENOPTIONSDIALOG structure removed from m_options.h
Diffstat (limited to 'src/core/stduserinfo')
-rw-r--r--src/core/stduserinfo/src/stdinfo.cpp12
-rw-r--r--src/core/stduserinfo/src/userinfo.cpp20
2 files changed, 16 insertions, 16 deletions
diff --git a/src/core/stduserinfo/src/stdinfo.cpp b/src/core/stduserinfo/src/stdinfo.cpp
index fd3ae677bc..ca21c9d3ee 100644
--- a/src/core/stduserinfo/src/stdinfo.cpp
+++ b/src/core/stduserinfo/src/stdinfo.cpp
@@ -610,37 +610,37 @@ int DetailsInit(WPARAM wParam, LPARAM lParam)
odp.pfnDlgProc = SummaryDlgProc;
odp.position = -2100000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_SUMMARY);
- odp.pszTitle = LPGEN("Summary");
+ odp.szTitle.a = LPGEN("Summary");
UserInfo_AddPage(wParam, &odp);
odp.pfnDlgProc = ContactDlgProc;
odp.position = -1800000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_CONTACT);
- odp.pszTitle = LPGEN("Contact");
+ odp.szTitle.a = LPGEN("Contact");
UserInfo_AddPage(wParam, &odp);
odp.pfnDlgProc = LocationDlgProc;
odp.position = -1500000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_LOCATION);
- odp.pszTitle = LPGEN("Location");
+ odp.szTitle.a = LPGEN("Location");
UserInfo_AddPage(wParam, &odp);
odp.pfnDlgProc = WorkDlgProc;
odp.position = -1200000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_WORK);
- odp.pszTitle = LPGEN("Work");
+ odp.szTitle.a = LPGEN("Work");
UserInfo_AddPage(wParam, &odp);
odp.pfnDlgProc = BackgroundDlgProc;
odp.position = -900000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_BACKGROUND);
- odp.pszTitle = LPGEN("Background info");
+ odp.szTitle.a = LPGEN("Background info");
UserInfo_AddPage(wParam, &odp);
odp.pfnDlgProc = NotesDlgProc;
odp.position = 0;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_NOTES);
- odp.pszTitle = LPGEN("Notes");
+ odp.szTitle.a = LPGEN("Notes");
UserInfo_AddPage(wParam, &odp);
return 0;
}
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp
index 82ce214f67..04bd08fba3 100644
--- a/src/core/stduserinfo/src/userinfo.cpp
+++ b/src/core/stduserinfo/src/userinfo.cpp
@@ -66,12 +66,12 @@ struct DetailsData
wchar_t* getTitle(OPTIONSDIALOGPAGE *p)
{
- return (p->flags & ODPF_DONTTRANSLATE) ? p->pwszTitle : TranslateW_LP(p->pwszTitle, p->hLangpack);
+ return (p->flags & ODPF_DONTTRANSLATE) ? p->szTitle.w : TranslateW_LP(p->szTitle.w, p->hLangpack);
}
wchar_t* getTab(OPTIONSDIALOGPAGE *p)
{
- return (p->flags & ODPF_DONTTRANSLATE) ? p->pwszTab : TranslateW_LP(p->pwszTab, p->hLangpack);
+ return (p->flags & ODPF_DONTTRANSLATE) ? p->szTab.w : TranslateW_LP(p->szTab.w, p->hLangpack);
}
static int PageSortProc(OPTIONSDIALOGPAGE *item1, OPTIONSDIALOGPAGE *item2)
@@ -121,8 +121,8 @@ static INT_PTR ShowDetailsDialogCommand(WPARAM wParam, LPARAM)
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_DETAILS), NULL, DlgProcDetails, (LPARAM)&psh);
for (int i = 0; i < opi.pageCount; i++) {
//cleanup moved to WM_DESTROY
- if (opi.odp[i].pszGroup != NULL)
- mir_free(opi.odp[i].pszGroup);
+ if (opi.odp[i].szGroup.w != NULL)
+ mir_free(opi.odp[i].szGroup.a);
if ((DWORD_PTR)opi.odp[i].pszTemplate & 0xFFFF0000)
mir_free((char*)opi.odp[i].pszTemplate);
}
@@ -147,12 +147,12 @@ static INT_PTR AddDetailsPage(WPARAM wParam, LPARAM lParam)
dst->pszTemplate = ((DWORD_PTR)odp->pszTemplate & 0xFFFF0000) ? mir_strdup(odp->pszTemplate) : odp->pszTemplate;
if (odp->flags & ODPF_UNICODE) {
- dst->pwszTitle = (odp->pwszTitle == 0) ? NULL : mir_wstrdup(odp->pwszTitle);
- dst->pwszTab = (!(odp->flags & ODPF_USERINFOTAB) || !odp->pwszTab) ? NULL : mir_wstrdup(odp->pwszTab);
+ dst->szTitle.w = (odp->szTitle.w == 0) ? NULL : mir_wstrdup(odp->szTitle.w);
+ dst->szTab.w = (odp->flags & ODPF_USERINFOTAB) ? mir_wstrdup(odp->szTab.w) : NULL;
}
else {
- dst->pwszTitle = mir_a2u(odp->pszTitle);
- dst->pwszTab = (!(odp->flags & ODPF_USERINFOTAB) || !odp->pszTab) ? NULL : mir_a2u(odp->pszTab);
+ dst->szTitle.w = mir_a2u(odp->szTitle.a);
+ dst->szTab.w = (odp->flags & ODPF_USERINFOTAB) ? mir_a2u(odp->szTab.a) : NULL;
}
dst->hLangpack = odp->hLangpack;
@@ -289,8 +289,8 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP
p.dlgParam = odp[i].dwInitParam;
p.hInst = odp[i].hInstance;
- p.ptszTitle = odp[i].pwszTitle;
- p.ptszTab = odp[i].pwszTab;
+ p.ptszTitle = odp[i].szTitle.w;
+ p.ptszTab = odp[i].szTab.w;
p.hLangpack = odp[i].hLangpack;
if (i && p.ptszTab && !mir_wstrcmp(dat->opd[i - 1].ptszTitle, p.ptszTitle)) {