diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2014-12-14 15:31:37 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-12-14 15:31:37 +0000 |
commit | 82fc26a0fdbd50cf60b2c93f456cbef33046ac48 (patch) | |
tree | a3c61b6e3b4ba8b7d7c9b92e9f5abaa27c90954c /plugins/DbEditorPP/src/options.cpp | |
parent | 8c538dbff915b405d9b41fe51ca78618a78cf46d (diff) |
DbEditorPP: changed warning lavel to w4
git-svn-id: http://svn.miranda-ng.org/main/trunk@11414 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/DbEditorPP/src/options.cpp')
-rw-r--r-- | plugins/DbEditorPP/src/options.cpp | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/plugins/DbEditorPP/src/options.cpp b/plugins/DbEditorPP/src/options.cpp index c6aa2b3cdc..37a4d0fa29 100644 --- a/plugins/DbEditorPP/src/options.cpp +++ b/plugins/DbEditorPP/src/options.cpp @@ -3,63 +3,63 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
static bool bInitDone = true;
- switch(msg)
+ switch (msg)
{
- case WM_INITDIALOG:
+ case WM_INITDIALOG:
+ {
+ bInitDone = false;
+ CheckDlgButton(hwnd, IDC_EXPANDSETTINGS, db_get_b(NULL, modname, "ExpandSettingsOnOpen", 0) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwnd, IDC_RESTORESETTINGS, db_get_b(NULL, modname, "RestoreOnOpen", 1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwnd, IDC_WARNONDEL, db_get_b(NULL, modname, "WarnOnDelete", 1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwnd, IDC_POPUPS, usePopups ? BST_CHECKED : BST_UNCHECKED);
+ SetDlgItemInt(hwnd, IDC_POPUPTIMEOUT, db_get_w(NULL, modname, "PopupDelay", 4), 0);
+ SendDlgItemMessage(hwnd, IDC_COLOUR, CPM_SETCOLOUR, 0, (LPARAM)db_get_dw(NULL, modname, "PopupColour", RGB(255, 0, 0)));
+ TranslateDialogDefault(hwnd);
+ bInitDone = true;
+ }
+ return TRUE;
+ case WM_COMMAND:
+ switch (LOWORD(wParam))
{
- bInitDone = false;
- CheckDlgButton(hwnd, IDC_EXPANDSETTINGS, db_get_b(NULL, modname, "ExpandSettingsOnOpen", 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwnd, IDC_RESTORESETTINGS, db_get_b(NULL, modname, "RestoreOnOpen", 1) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwnd, IDC_WARNONDEL, db_get_b(NULL, modname, "WarnOnDelete", 1) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwnd, IDC_POPUPS, usePopups ? BST_CHECKED : BST_UNCHECKED);
- SetDlgItemInt(hwnd,IDC_POPUPTIMEOUT,db_get_w(NULL,modname,"PopupDelay",4),0);
- SendDlgItemMessage(hwnd, IDC_COLOUR, CPM_SETCOLOUR, 0, (LPARAM)db_get_dw(NULL,modname,"PopupColour",RGB(255,0,0)));
- TranslateDialogDefault(hwnd);
- bInitDone = true;
+ case IDC_RESTORESETTINGS:
+ case IDC_EXPANDSETTINGS:
+ case IDC_POPUPS:
+ case IDC_WARNONDEL:
+ case IDC_COLOUR:
+ SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
+ break;
+ case IDC_POPUPTIMEOUT:
+ if (bInitDone && (HIWORD(wParam) == EN_CHANGE))
+ SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
+ break;
}
- return TRUE;
- case WM_COMMAND:
- switch(LOWORD(wParam))
- {
- case IDC_RESTORESETTINGS:
- case IDC_EXPANDSETTINGS:
- case IDC_POPUPS:
- case IDC_WARNONDEL:
- case IDC_COLOUR:
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- break;
- case IDC_POPUPTIMEOUT:
- if(bInitDone && (HIWORD(wParam) == EN_CHANGE))
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- break;
- }
break;
- case WM_NOTIFY:
- switch(((LPNMHDR)lParam)->idFrom)
+ case WM_NOTIFY:
+ switch (((LPNMHDR)lParam)->idFrom)
+ {
+ case 0:
+ switch (((LPNMHDR)lParam)->code)
+ {
+ case PSN_APPLY:
{
- case 0:
- switch (((LPNMHDR)lParam)->code)
- {
- case PSN_APPLY:
- {
- db_set_b(NULL,modname,"ExpandSettingsOnOpen",(BYTE)IsDlgButtonChecked(hwnd,IDC_EXPANDSETTINGS));
- db_set_b(NULL,modname,"RestoreOnOpen",(BYTE)IsDlgButtonChecked(hwnd,IDC_RESTORESETTINGS));
- db_set_b(NULL,modname,"WarnOnDelete",(BYTE)IsDlgButtonChecked(hwnd,IDC_WARNONDEL));
- usePopups = IsDlgButtonChecked(hwnd,IDC_POPUPS);
- db_set_b(NULL,modname,"UsePopUps",(BYTE)usePopups);
- db_set_w(NULL,modname,"PopupDelay",(WORD)GetDlgItemInt(hwnd,IDC_POPUPTIMEOUT,NULL,0));
- db_set_dw(NULL,modname,"PopupColour",(DWORD)SendDlgItemMessage(hwnd, IDC_COLOUR, CPM_GETCOLOUR, 0, 0));
- }
- return TRUE;
- }
- break;
+ db_set_b(NULL, modname, "ExpandSettingsOnOpen", (BYTE)IsDlgButtonChecked(hwnd, IDC_EXPANDSETTINGS));
+ db_set_b(NULL, modname, "RestoreOnOpen", (BYTE)IsDlgButtonChecked(hwnd, IDC_RESTORESETTINGS));
+ db_set_b(NULL, modname, "WarnOnDelete", (BYTE)IsDlgButtonChecked(hwnd, IDC_WARNONDEL));
+ usePopups = IsDlgButtonChecked(hwnd, IDC_POPUPS);
+ db_set_b(NULL, modname, "UsePopUps", (BYTE)usePopups);
+ db_set_w(NULL, modname, "PopupDelay", (WORD)GetDlgItemInt(hwnd, IDC_POPUPTIMEOUT, NULL, 0));
+ db_set_dw(NULL, modname, "PopupColour", (DWORD)SendDlgItemMessage(hwnd, IDC_COLOUR, CPM_GETCOLOUR, 0, 0));
+ }
+ return TRUE;
}
break;
+ }
+ break;
}
return FALSE;
}
-INT OptInit(WPARAM wParam,LPARAM)
+INT OptInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.hInstance = hInst;
|