summaryrefslogtreecommitdiff
path: root/plugins/Toaster/src/options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Toaster/src/options.cpp')
-rw-r--r--plugins/Toaster/src/options.cpp14
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;
}
+