summaryrefslogtreecommitdiff
path: root/plugins/AsSingleWindow/src/Options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/AsSingleWindow/src/Options.cpp')
-rw-r--r--plugins/AsSingleWindow/src/Options.cpp59
1 files changed, 32 insertions, 27 deletions
diff --git a/plugins/AsSingleWindow/src/Options.cpp b/plugins/AsSingleWindow/src/Options.cpp
index 546c20245a..200134bc8c 100644
--- a/plugins/AsSingleWindow/src/Options.cpp
+++ b/plugins/AsSingleWindow/src/Options.cpp
@@ -1,4 +1,4 @@
-#include "stdafx.h"
+#include "stdafx.h"
#include "AsSingleWindow.h"
#include "Options.h"
#include "resource.h"
@@ -23,29 +23,35 @@ int InitOptions(WPARAM wParam, LPARAM)
INT_PTR CALLBACK cbOptionsDialog(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
- case WM_INITDIALOG:
- dlgProcessInit(hWnd, msg, wParam, lParam);
- break;
- case WM_COMMAND:
- dlgProcessCommand(hWnd, msg, wParam, lParam);
- break;
- case WM_NOTIFY:
- if (((LPNMHDR)lParam)->idFrom == 0) {
- switch (((LPNMHDR)lParam)->code) {
- case PSN_RESET:
- optionsLoad();
- break;
- case PSN_APPLY:
- optionsUpdate(hWnd);
- optionsSave();
- windowReposition(hWnd); //
- break;
- }
+ case WM_INITDIALOG:
+ dlgProcessInit(hWnd, msg, wParam, lParam);
+ break;
+
+ case WM_COMMAND:
+ dlgProcessCommand(hWnd, msg, wParam, lParam);
+ break;
+
+ case WM_NOTIFY:
+ if (((LPNMHDR)lParam)->idFrom == 0)
+ {
+ switch (((LPNMHDR)lParam)->code)
+ {
+ case PSN_RESET:
+ optionsLoad();
+ break;
+
+ case PSN_APPLY:
+ optionsUpdate(hWnd);
+ optionsSave();
+ windowReposition(hWnd); // нициируем перерасчет координат
+ break;
}
- break;
- case WM_DESTROY:
- // free up resources
- break;
+ }
+ break;
+
+ case WM_DESTROY:
+ // free up resources
+ break;
}
return false;
@@ -82,6 +88,7 @@ void dlgProcessCommand(HWND hWnd, UINT, WPARAM wParam, LPARAM)
SendMessage(GetParent(hWnd), PSM_CHANGED, 0, 0);
}
break;
+
case IDC_RADIO_G2_MERGEALL:
case IDC_RADIO_G2_MERGEONE:
case IDC_RADIO_G2_DISABLEMERGE:
@@ -122,8 +129,6 @@ void optionsUpdate(HWND hWnd)
void optionsSave()
{
- db_get_b(0, SETTINGSNAME, "DrivenWindowPosition", pluginVars.Options.DrivenWindowPos);
- db_get_b(0, SETTINGSNAME, "WindowsMerging", pluginVars.Options.WindowsMerging);
+ db_set_b(0, SETTINGSNAME, "DrivenWindowPosition", pluginVars.Options.DrivenWindowPos);
+ db_set_b(0, SETTINGSNAME, "WindowsMerging", pluginVars.Options.WindowsMerging);
}
-
-// end of file \ No newline at end of file