From b2c91edc9646daa331de71d589e4fec6bdef4945 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 11 Jul 2018 17:09:17 +0300 Subject: 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) --- plugins/MirLua/src/Modules/m_options.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/MirLua/src/Modules') 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 -- cgit v1.2.3