summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/dialogs.cpp
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/FacebookRM/src/dialogs.cpp
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/FacebookRM/src/dialogs.cpp')
-rw-r--r--protocols/FacebookRM/src/dialogs.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp
index 7e9447fd02..dce5630ca9 100644
--- a/protocols/FacebookRM/src/dialogs.cpp
+++ b/protocols/FacebookRM/src/dialogs.cpp
@@ -632,13 +632,14 @@ CFacebookGuardDialog::CFacebookGuardDialog(FacebookProto *proto, const char *fb_
m_sms.OnClick = Callback(this, &CFacebookGuardDialog::OnSms);
}
-void CFacebookGuardDialog::OnInitDialog()
+bool CFacebookGuardDialog::OnInitDialog()
{
Window_SetIcon_IcoLib(m_hwnd, GetIconHandle("facebook"));
SendMessage(m_text.GetHwnd(), EM_LIMITTEXT, 6, 0);
Utils_RestoreWindowPosition(m_hwnd, 0, m_proto->m_szModuleName, "GuardWindow");
+ return true;
}
void CFacebookGuardDialog::OnOk(CCtrlButton*)
@@ -653,9 +654,10 @@ void CFacebookGuardDialog::OnSms(CCtrlButton *btn)
m_proto->facy.sms_code(m_fb_dtsg);
}
-void CFacebookGuardDialog::OnClose()
+bool CFacebookGuardDialog::OnClose()
{
Utils_SaveWindowPosition(m_hwnd, 0, m_proto->m_szModuleName, "GuardWindow");
+ return true;
}
const char* CFacebookGuardDialog::GetCode()