summaryrefslogtreecommitdiff
path: root/plugins/DbEditorPP/src/options.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-07-15 21:27:18 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-07-15 21:27:18 +0000
commit0d65ec3aab2c63b9a55fbabc811b0e23447fd4a1 (patch)
tree2536fcb552fcf4eb00fa2ae322d0a7fa6a547bcb /plugins/DbEditorPP/src/options.cpp
parent31591520f0dfefa04a9e4379f1a25be80298ea1e (diff)
- fix for memory corruption;
- code cleaning; - version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@14577 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/DbEditorPP/src/options.cpp')
-rw-r--r--plugins/DbEditorPP/src/options.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/DbEditorPP/src/options.cpp b/plugins/DbEditorPP/src/options.cpp
index 3736751f94..8879d0f4a5 100644
--- a/plugins/DbEditorPP/src/options.cpp
+++ b/plugins/DbEditorPP/src/options.cpp
@@ -11,7 +11,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
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);
+ CheckDlgButton(hwnd, IDC_POPUPS, g_bUsePopups ? 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);
@@ -45,8 +45,8 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
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);
+ g_bUsePopups = IsDlgButtonChecked(hwnd, IDC_POPUPS) != 0;
+ db_set_b(NULL, modname, "UsePopUps", (BYTE)g_bUsePopups);
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));
}