diff options
Diffstat (limited to 'plugins/AuthState/src/options.cpp')
-rw-r--r-- | plugins/AuthState/src/options.cpp | 50 |
1 files changed, 1 insertions, 49 deletions
diff --git a/plugins/AuthState/src/options.cpp b/plugins/AuthState/src/options.cpp index de4b90fedc..23bf7f609f 100644 --- a/plugins/AuthState/src/options.cpp +++ b/plugins/AuthState/src/options.cpp @@ -19,61 +19,13 @@ #include "stdafx.h"
-INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- static int bInitializing = 0;
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- bInitializing = 1;
-
- CheckDlgButton(hwndDlg, IDC_AUTHICON, Options.bUseAuthIcon ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_GRANTICON, Options.bUseGrantIcon ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ENABLEMENUITEM, Options.bContactMenuItem ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ICONSFORRECENT, Options.bIconsForRecentContacts ? BST_CHECKED : BST_UNCHECKED);
-
- bInitializing = 0;
- return TRUE;
-
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDC_AUTHICON:
- case IDC_GRANTICON:
- case IDC_ENABLEMENUITEM:
- case IDC_ICONSFORRECENT:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
- }
- break;
-
- case WM_NOTIFY:
- if (((LPNMHDR)lParam)->idFrom == 0)
- switch (((LPNMHDR)lParam)->code) {
- case PSN_APPLY:
- Options.bUseAuthIcon = IsDlgButtonChecked(hwndDlg, IDC_AUTHICON);
- Options.bUseGrantIcon = IsDlgButtonChecked(hwndDlg, IDC_GRANTICON);
- Options.bContactMenuItem = IsDlgButtonChecked(hwndDlg, IDC_ENABLEMENUITEM);
- Options.bIconsForRecentContacts = IsDlgButtonChecked(hwndDlg, IDC_ICONSFORRECENT);
-
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
- onExtraImageApplying((WPARAM)hContact, 0);
-
- Options.Save();
- return TRUE;
- }
- }
- return FALSE;
-}
-
int onOptInitialise(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
- odp.hInstance = g_hInst;
odp.pszGroup = LPGEN("Icons");
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_AUTHSTATE_OPT);
odp.pszTitle = LPGEN("Auth state");
- odp.pfnDlgProc = DlgProcOptions;
odp.flags = ODPF_BOLDGROUPS;
+ odp.pDialog = new COptionsDialog;
Options_AddPage(wParam, &odp);
return 0;
}
|