summaryrefslogtreecommitdiff
path: root/plugins/Toaster
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-07-11 17:09:17 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-07-11 17:09:17 +0300
commitb2c91edc9646daa331de71d589e4fec6bdef4945 (patch)
tree847a77d0686d26e25b126313fbaa8262c81f8d1a /plugins/Toaster
parentae081843e9663b3cb36b17309fbce1d2967315f1 (diff)
GUI change:
- methods OnInitDialog, OnApply & OnClose of CDlgBase now return true if successful. return of false prevents a dialog from being loaded or left respectively; - massive code cleaning considering the 'virtual' attribute of overridden methods; - also fixes #1476 (Don't close "Create new account" window if user not set account name)
Diffstat (limited to 'plugins/Toaster')
-rw-r--r--plugins/Toaster/src/options.cpp3
-rw-r--r--plugins/Toaster/src/options.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/plugins/Toaster/src/options.cpp b/plugins/Toaster/src/options.cpp
index 6a027ac84f..326d6ef369 100644
--- a/plugins/Toaster/src/options.cpp
+++ b/plugins/Toaster/src/options.cpp
@@ -11,9 +11,10 @@ COptions::COptions()
m_enabled.OnChange = Callback(this, &COptions::Enabled_OnChange);
}
-void COptions::OnInitDialog()
+bool COptions::OnInitDialog()
{
m_enabled.SetState(CallService(MS_POPUP_QUERY, PUQS_GETSTATUS));
+ return true;
}
void COptions::Shortcut_OnClick(CCtrlBase*)
diff --git a/plugins/Toaster/src/options.h b/plugins/Toaster/src/options.h
index 73d50a9877..2a74e72a97 100644
--- a/plugins/Toaster/src/options.h
+++ b/plugins/Toaster/src/options.h
@@ -9,7 +9,7 @@ private:
CCtrlCheck m_enabled;
protected:
- void OnInitDialog();
+ bool OnInitDialog() override;
void Shortcut_OnClick(CCtrlBase*);
void Preview_OnClick(CCtrlBase*);