summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx
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 /plugins/UserInfoEx
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 'plugins/UserInfoEx')
-rw-r--r--plugins/UserInfoEx/src/classPsTree.cpp4
-rw-r--r--plugins/UserInfoEx/src/classPsTreeItem.cpp10
-rw-r--r--plugins/UserInfoEx/src/dlg_propsheet.cpp10
-rw-r--r--plugins/UserInfoEx/src/psp_options.cpp16
4 files changed, 20 insertions, 20 deletions
diff --git a/plugins/UserInfoEx/src/classPsTree.cpp b/plugins/UserInfoEx/src/classPsTree.cpp
index 2f16ba1797..df14d06c57 100644
--- a/plugins/UserInfoEx/src/classPsTree.cpp
+++ b/plugins/UserInfoEx/src/classPsTree.cpp
@@ -130,10 +130,10 @@ int CPsTree::AddDummyItem(LPCSTR pszGroup)
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = ghInst;
odp.flags = ODPF_UNICODE;
- odp.pwszTitle = mir_utf8decodeW(pszGroup);
+ odp.szTitle.w = mir_utf8decodeW(pszGroup);
INT_PTR rc = UserInfo_AddPage((WPARAM)&psh, &odp);
- mir_free(odp.pwszTitle);
+ mir_free(odp.szTitle.w);
if (!rc) {
_pItems = psh._pPages;
_numItems = psh._numPages;
diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp
index fefe458ff8..99e3f70f29 100644
--- a/plugins/UserInfoEx/src/classPsTreeItem.cpp
+++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp
@@ -328,7 +328,7 @@ int CPsTreeItem::Icon(HIMAGELIST hIml, OPTIONSDIALOGPAGE *odp, BYTE bInitIconsOn
if (odp->hInstance == ghInst) {
// the pszGroup holds the iconfile for items added by uinfoex
- sid.defaultFile.w = odp->pwszGroup;
+ sid.defaultFile.w = odp->szGroup.w;
// icon library exists?
if (sid.defaultFile.w)
@@ -404,15 +404,15 @@ int CPsTreeItem::Create(CPsHdr* pPsh, OPTIONSDIALOGPAGE *odp)
if (pPsh->_dwFlags & PSF_PROTOPAGESONLY) {
if (_dwFlags & ODPF_USERINFOTAB)
- mir_snwprintf(szTitle, L"%s %d\\%s", odp->pwszTitle, pPsh->_nSubContact+1, odp->pwszTab);
+ mir_snwprintf(szTitle, L"%s %d\\%s", odp->szTitle.w, pPsh->_nSubContact+1, odp->szTab.w);
else
- mir_snwprintf(szTitle, L"%s %d", odp->pwszTitle, pPsh->_nSubContact+1);
+ mir_snwprintf(szTitle, L"%s %d", odp->szTitle.w, pPsh->_nSubContact+1);
}
else {
if (_dwFlags & ODPF_USERINFOTAB)
- mir_snwprintf(szTitle, L"%s\\%s", odp->pwszTitle, odp->pwszTab);
+ mir_snwprintf(szTitle, L"%s\\%s", odp->szTitle.w, odp->szTab.w);
else
- mir_wstrcpy(szTitle, odp->pwszTitle);
+ mir_wstrcpy(szTitle, odp->szTitle.w);
}
// set the unique utf8 encoded name for the item
if (err = Name(szTitle, (_dwFlags & ODPF_UNICODE) == ODPF_UNICODE))
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp
index e1c7a28f75..83f6400fb3 100644
--- a/plugins/UserInfoEx/src/dlg_propsheet.cpp
+++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp
@@ -356,7 +356,7 @@ static INT_PTR AddPage(WPARAM wParam, LPARAM lParam)
if (pPsh->_dwFlags & (PSF_PROTOPAGESONLY | PSF_PROTOPAGESONLY_INIT)) {
BYTE bIsUnicode = (odp->flags & ODPF_UNICODE) == ODPF_UNICODE;
- wchar_t *ptszTitle = bIsUnicode ? mir_wstrdup(odp->pwszTitle) : mir_a2u(odp->pszTitle);
+ wchar_t *ptszTitle = bIsUnicode ? mir_wstrdup(odp->szTitle.w) : mir_a2u(odp->szTitle.a);
// avoid adding pages for a meta subcontact, which have been added for a metacontact.
if (pPsh->_dwFlags & PSF_PROTOPAGESONLY) {
@@ -431,7 +431,7 @@ static int AddProtocolPages(OPTIONSDIALOGPAGE& odp, WPARAM wParam, LPSTR pszProt
wchar_t szTitle[MAX_PATH];
const BYTE ofs = (pszProto) ? mir_snwprintf(szTitle, L"%S\\", pszProto) : 0;
- odp.pwszTitle = szTitle;
+ odp.szTitle.w = szTitle;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_GENERAL);
odp.position = 0x8000000;
@@ -508,16 +508,16 @@ static int InitDetails(WPARAM wParam, LPARAM lParam)
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = ghInst;
odp.flags = ODPF_ICON | ODPF_UNICODE;
- odp.pwszGroup = IcoLib_GetDefaultIconFileName();
+ odp.szGroup.w = IcoLib_GetDefaultIconFileName();
if (lParam) {
// ignore common pages for weather contacts
if (!pPsh->_pszProto || _stricmp(pPsh->_pszProto, "weather")) {
AddProtocolPages(odp, wParam);
- odp.pwszTitle = LPGENW("About") L"\\" LPGENW("Notes");
+ odp.szTitle.w = LPGENW("About") L"\\" LPGENW("Notes");
}
else
- odp.pwszTitle = LPGENW("Notes");
+ odp.szTitle.w = LPGENW("Notes");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_ABOUT);
odp.position = 0x8000008;
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp
index bdb41d321a..b8a979296a 100644
--- a/plugins/UserInfoEx/src/psp_options.cpp
+++ b/plugins/UserInfoEx/src/psp_options.cpp
@@ -1032,32 +1032,32 @@ static int OnInitOptions(WPARAM wParam, LPARAM)
OPTIONSDIALOGPAGE odp = { 0 };
odp.position = 95400;
odp.hInstance = ghInst;
- odp.pszTitle = MODULELONGNAME;
- odp.pszGroup = LPGEN("Contacts");
+ odp.szTitle.a = MODULELONGNAME;
+ odp.szGroup.a = LPGEN("Contacts");
// Common page
- odp.pszTab = LPGEN("Common");
+ odp.szTab.a = LPGEN("Common");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_COMMON);
odp.pfnDlgProc = DlgProc_CommonOpts;
odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
// Advanced page
- odp.pszTab = LPGEN("Advanced");
+ odp.szTab.a = LPGEN("Advanced");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ADVANCED);
odp.pfnDlgProc = DlgProc_AdvancedOpts;
odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
// Details Dialog page
- odp.pszTab = LPGEN("Details dialog");
+ odp.szTab.a = LPGEN("Details dialog");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_DETAILSDLG);
odp.pfnDlgProc = DlgProc_DetailsDlgOpts;
odp.flags = ODPF_BOLDGROUPS;
Options_AddPage(wParam, &odp);
// Reminder page
- odp.pszTab = LPGEN("Reminder");
+ odp.szTab.a = LPGEN("Reminder");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_REMINDER);
odp.pfnDlgProc = DlgProc_ReminderOpts;
odp.flags = ODPF_BOLDGROUPS;
@@ -1065,8 +1065,8 @@ static int OnInitOptions(WPARAM wParam, LPARAM)
// Popups page
if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
- odp.pszTitle = MODULELONGNAME;
- odp.pszGroup = LPGEN("Popups");
+ odp.szTitle.a = MODULELONGNAME;
+ odp.szGroup.a = LPGEN("Popups");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUP);
odp.pfnDlgProc = DlgProc_Popups;
odp.flags = ODPF_BOLDGROUPS;