summaryrefslogtreecommitdiff
path: root/src/core/stdautoaway
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 /src/core/stdautoaway
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 'src/core/stdautoaway')
-rw-r--r--src/core/stdautoaway/src/options.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/stdautoaway/src/options.cpp b/src/core/stdautoaway/src/options.cpp
index e8ee0669da..79f6795174 100644
--- a/src/core/stdautoaway/src/options.cpp
+++ b/src/core/stdautoaway/src/options.cpp
@@ -87,7 +87,7 @@ public:
chkShortIdle.OnChange = chkShort.OnChange = Callback(this, &COptionsDlg::onChange);
}
- virtual void OnInitDialog() override
+ bool OnInitDialog() override
{
chkOnWindows.SetState(!g_plugin.bIdleMethod);
@@ -99,9 +99,10 @@ public:
cmbAAStatus.SetCurSel(IdleGetStatusIndex(g_plugin.bAAStatus));
ShowHide();
+ return true;
}
- virtual void OnApply() override
+ bool OnApply() override
{
g_plugin.iIdleTime1st = spinIdle.GetPosition();
@@ -112,6 +113,7 @@ public:
// destroy any current idle and reset settings.
IdleObject_Destroy();
IdleObject_Create();
+ return true;
}
void onChange(CCtrlCheck*)