diff options
author | George Hazan <ghazan@miranda.im> | 2016-10-28 16:18:50 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2016-10-28 16:18:50 +0300 |
commit | cf9de21af3073e29cb7b149fbd8427241de70729 (patch) | |
tree | 2a0b17f49d14d4a51bc942f15bf3747509f0c3cf /plugins/BasicHistory | |
parent | 3de431cc811a1fbf9cd0d520fe33b6163c73e919 (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/BasicHistory')
-rw-r--r-- | plugins/BasicHistory/src/HistoryWindow.cpp | 23 | ||||
-rw-r--r-- | plugins/BasicHistory/src/Options.cpp | 14 |
2 files changed, 11 insertions, 26 deletions
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 8f8c856e9f..3f2aa1c040 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -467,16 +467,6 @@ void ConvertSize(HWND hwndSrc, HWND hwndDest, RECT& rc) rc.bottom = pt.y;
}
-void OpenOptions(char* group, char* page, char* tab = NULL)
-{
- OPENOPTIONSDIALOG op;
- op.cbSize = sizeof(OPENOPTIONSDIALOG);
- op.pszGroup = group;
- op.pszPage = page;
- op.pszTab = tab;
- Options_Open(&op);
-}
-
#define DlgReturn(ret){\
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, (ret));\
return (ret);\
@@ -545,12 +535,7 @@ INT_PTR CALLBACK HistoryWindow::DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wP DlgReturn(TRUE);
case IDM_CONFIG:
- {
- OPENOPTIONSDIALOG opd = { 0 };
- opd.cbSize = sizeof(opd);
- opd.pszPage = LPGEN("History");
- Options_Open(&opd);
- }
+ Options_Open(LPGENW("History"));
DlgReturn(TRUE);
case IDM_DELETE:
@@ -1784,13 +1769,13 @@ void HistoryWindow::ConfigToolbarClicked(LPNMTOOLBAR lpnmTB) SendMessage(m_hWnd, WM_COMMAND, IDM_CONFIG, 0);
break;
case IDM_FONTS:
- OpenOptions("Customize", "Fonts and colors");
+ Options_Open(L"Customize", L"Fonts and colors");
break;
case IDM_ICONS:
- OpenOptions("Customize", "Icons");
+ Options_Open(L"Customize", L"Icons");
break;
case IDM_HOTKEYS:
- OpenOptions("Customize", "Hotkeys");
+ Options_Open(L"Customize", L"Hotkeys");
break;
case IDM_SAVEPOS:
SavePos(false);
diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp index 3e6fd6d8de..6b33158851 100644 --- a/plugins/BasicHistory/src/Options.cpp +++ b/plugins/BasicHistory/src/Options.cpp @@ -124,34 +124,34 @@ int Options::InitOptions(WPARAM wParam, LPARAM) odp.position = 100000000;
odp.hInstance = hInst;
odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
- odp.pwszTitle = LPGENW("History");
+ odp.szTitle.w = LPGENW("History");
- odp.pwszTab = LPGENW("Group list");
+ odp.szTab.w = LPGENW("Group list");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_GROUPLIST);
odp.pfnDlgProc = Options::DlgProcOptsGroupList;
Options_AddPage(wParam, &odp);
- odp.pwszTab = LPGENW("Messages");
+ odp.szTab.w = LPGENW("Messages");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MESSAGES);
odp.pfnDlgProc = Options::DlgProcOptsMessages;
Options_AddPage(wParam, &odp);
- odp.pwszTab = LPGENW("Searching");
+ odp.szTab.w = LPGENW("Searching");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SEARCHING);
odp.pfnDlgProc = Options::DlgProcOptsSearching;
Options_AddPage(wParam, &odp);
- odp.pwszTab = LPGENW("Export");
+ odp.szTab.w = LPGENW("Export");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_EXPORT);
odp.pfnDlgProc = Options::DlgProcOptsExport;
Options_AddPage(wParam, &odp);
- odp.pwszTab = LPGENW("Scheduler");
+ odp.szTab.w = LPGENW("Scheduler");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SCHEDULER);
odp.pfnDlgProc = Options::DlgProcOptsScheduler;
Options_AddPage(wParam, &odp);
- odp.pwszTab = LPGENW("Advanced");
+ odp.szTab.w = LPGENW("Advanced");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MAIN);
odp.pfnDlgProc = Options::DlgProcOptsMain;
Options_AddPage(wParam, &odp);
|