summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-11-23 22:58:53 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-11-23 22:58:53 +0300
commitec45ce6bb282dab2b5bf40fc130b3d67730c4869 (patch)
tree2858ad272af650f188ec4513d97a66da0134e5d6 /src
parentf4584ad861c7cdb444a2145d8472754af492aa2d (diff)
minus WM_TIMER
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/options.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp
index 9d4d497954..1c0505ea21 100644
--- a/src/mir_app/src/options.cpp
+++ b/src/mir_app/src/options.cpp
@@ -1090,22 +1090,15 @@ public:
}
break;
- case WM_TIMER:
- if (wParam == FILTER_TIMEOUT_TIMER) {
- SaveOptionsTreeState();
- RebuildPageTree();
-
- KillTimer(m_hwnd, FILTER_TIMEOUT_TIMER);
- }
- break;
-
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_KEYWORD_FILTER:
// add a timer - when the timer elapses filter the option pages
- if ((HIWORD(wParam) == CBN_SELCHANGE) || (HIWORD(wParam) == CBN_EDITCHANGE))
- if (!SetTimer(m_hwnd, FILTER_TIMEOUT_TIMER, 400, NULL))
- MessageBeep(MB_ICONSTOP);
+ if ((HIWORD(wParam) == CBN_SELCHANGE) || (HIWORD(wParam) == CBN_EDITCHANGE)) {
+ CTimer *pTimer = new CTimer(this, FILTER_TIMEOUT_TIMER);
+ pTimer->OnEvent = Callback(this, &COptionsDlg::OnTimer);
+ pTimer->Start(400);
+ }
break;
case IDC_MODERN:
@@ -1121,6 +1114,13 @@ public:
return CDlgBase::DlgProc(msg, wParam, lParam);
}
+ void OnTimer(CTimer *pTimer)
+ {
+ pTimer->Stop();
+ SaveOptionsTreeState();
+ RebuildPageTree();
+ }
+
void Locate(const wchar_t *pszGroup, const wchar_t *pszPage, int _hLang)
{
Show(SW_RESTORE);