summaryrefslogtreecommitdiff
path: root/plugins/ModernOpt
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/ModernOpt
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/ModernOpt')
-rw-r--r--plugins/ModernOpt/src/modernopt.cpp24
1 files changed, 7 insertions, 17 deletions
diff --git a/plugins/ModernOpt/src/modernopt.cpp b/plugins/ModernOpt/src/modernopt.cpp
index 4743e8394c..cf612d1bb5 100644
--- a/plugins/ModernOpt/src/modernopt.cpp
+++ b/plugins/ModernOpt/src/modernopt.cpp
@@ -221,10 +221,7 @@ static INT_PTR CALLBACK ModernOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
case IDC_BTN_CLASSICOPT:
PostMessage(hwndDlg, WM_CLOSE, 0, 0);
db_set_b(NULL, "Options", "Expert", 1);
- {
- OPENOPTIONSDIALOG ood = { sizeof(ood) };
- Options_Open(&ood);
- }
+ Options_Open(NULL);
break;
case IDC_BTN_HELP:
@@ -248,15 +245,10 @@ static INT_PTR CALLBACK ModernOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
g_iSectionRestore = dat->iSection;
{
struct ModernOptionsObject *obj = (struct ModernOptionsObject *)dat->pObjectList[dat->iPage];
- if (obj->optObject.lpzClassicGroup || obj->optObject.lpzClassicPage) {
- OPENOPTIONSDIALOG ood = { 0 };
- ood.cbSize = sizeof(ood);
- ood.pszGroup = obj->optObject.lpzClassicGroup;
- ood.pszPage = obj->optObject.lpzClassicPage;
- ood.pszTab = obj->optObject.lpzClassicTab;
- Options_OpenPage(&ood);
- }
- else CallService("Options/OptionsCommand", 0, 0);
+ if (obj->optObject.lpzClassicGroup || obj->optObject.lpzClassicPage)
+ Options_OpenPage(_A2T(obj->optObject.lpzClassicGroup), _A2T(obj->optObject.lpzClassicPage), _A2T(obj->optObject.lpzClassicTab));
+ else
+ CallService("Options/OptionsCommand", 0, 0);
PostMessage(hwndDlg, WM_CLOSE, 0, 0);
}
@@ -465,10 +457,8 @@ static INT_PTR svcModernOpt_Impl(WPARAM, LPARAM)
static INT_PTR svcModernOpt_Show(WPARAM wParam, LPARAM lParam)
{
- if ( db_get_b(NULL, "Options", "Expert", 0)) {
- OPENOPTIONSDIALOG ood = { sizeof(ood) };
- return Options_Open(&ood);
- }
+ if (db_get_b(NULL, "Options", "Expert", 0))
+ return Options_Open(NULL);
g_iSectionRestore = 0;
return svcModernOpt_Impl(wParam, lParam);