diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-09-25 18:47:53 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-09-25 18:47:53 +0000 |
commit | c888cdec61b7c3fdf164b15841b6aa148f0148d5 (patch) | |
tree | d39082ace48565e27412f02aeace1b00d2719804 /plugins/Toaster/src/options.cpp | |
parent | 65c13e2c1fe1c205ac6c5e0062a6a99389fc9af0 (diff) |
Toaster: crash fix; check in options for enable/disable
git-svn-id: http://svn.miranda-ng.org/main/trunk@15443 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Toaster/src/options.cpp')
-rw-r--r-- | plugins/Toaster/src/options.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/plugins/Toaster/src/options.cpp b/plugins/Toaster/src/options.cpp index 2cca826654..a899aaafed 100644 --- a/plugins/Toaster/src/options.cpp +++ b/plugins/Toaster/src/options.cpp @@ -3,10 +3,13 @@ COptions::COptions()
: CDlgBase(g_hInstance, IDD_OPTIONS_MAIN),
m_shortcut(this, IDC_SHORTCUT),
- m_preview(this, IDC_PREVIEW)
+ m_preview(this, IDC_PREVIEW),
+ m_enabled(this, IDC_CHECK_ENABLED)
{
m_shortcut.OnClick = Callback(this, &COptions::Shortcut_OnClick);
m_preview.OnClick = Callback(this, &COptions::Preview_OnClick);
+ m_enabled.SetState(CallService(MS_POPUP_QUERY, PUQS_GETSTATUS));
+ m_enabled.OnChange = Callback(this, &COptions::Enabled_OnChange);
}
void COptions::OnInitDialog()
@@ -30,6 +33,14 @@ void COptions::Preview_OnClick(CCtrlBase*) CallService(MS_POPUP_SHOWMESSAGEW, (WPARAM)TranslateT("Error"), (LPARAM)SM_ERROR);
}
+void COptions::Enabled_OnChange(CCtrlCheck* chk)
+{
+ if (chk->GetState())
+ CallService(MS_POPUP_QUERY, PUQS_ENABLEPOPUPS);
+ else
+ CallService(MS_POPUP_QUERY, PUQS_DISABLEPOPUPS);
+}
+
/////////////////////////////////////////////////////////////////////////////////
int OnOptionsInitialized(WPARAM wParam, LPARAM)
@@ -44,3 +55,4 @@ int OnOptionsInitialized(WPARAM wParam, LPARAM) return 0;
}
+
|