summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/Modules
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/MirLua/src/Modules
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/MirLua/src/Modules')
-rw-r--r--plugins/MirLua/src/Modules/m_options.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/MirLua/src/Modules/m_options.cpp b/plugins/MirLua/src/Modules/m_options.cpp
index f956885bb7..29383e89ad 100644
--- a/plugins/MirLua/src/Modules/m_options.cpp
+++ b/plugins/MirLua/src/Modules/m_options.cpp
@@ -14,7 +14,7 @@ public:
{
}
- void OnInitDialog() override
+ bool OnInitDialog() override
{
if (m_onInitDialogRef)
{
@@ -22,9 +22,10 @@ public:
lua_pushlightuserdata(L, m_hwnd);
luaM_pcall(L, 1, 0);
}
+ return true;
}
- void OnApply() override
+ bool OnApply() override
{
if (m_onApplyRef)
{
@@ -32,6 +33,7 @@ public:
lua_pushlightuserdata(L, m_hwnd);
luaM_pcall(L, 1, 0);
}
+ return true;
}
void OnDestroy() override