summaryrefslogtreecommitdiff
path: root/protocols/Discord
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 /protocols/Discord
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 'protocols/Discord')
-rw-r--r--protocols/Discord/src/options.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/Discord/src/options.cpp b/protocols/Discord/src/options.cpp
index b291f98cdd..04947f76e2 100644
--- a/protocols/Discord/src/options.cpp
+++ b/protocols/Discord/src/options.cpp
@@ -39,20 +39,22 @@ public:
CreateLink(chkHideChats, ppro->m_bHideGroupchats);
}
- virtual void OnInitDialog() override
+ bool OnInitDialog() override
{
ptrW buf(m_proto->getWStringA(DB_KEY_PASSWORD));
if (buf)
m_edPassword.SetText(buf);
+ return true;
}
- virtual void OnApply() override
+ bool OnApply() override
{
if (mir_wstrcmp(m_proto->m_wszDefaultGroup, m_wszOldGroup))
Clist_GroupCreate(0, m_proto->m_wszDefaultGroup);
ptrW buf(m_edPassword.GetText());
m_proto->setWString(DB_KEY_PASSWORD, buf);
+ return true;
}
};