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/Scriver/src/chat_window.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/Scriver/src/chat_window.cpp') diff --git a/plugins/Scriver/src/chat_window.cpp b/plugins/Scriver/src/chat_window.cpp index 079607028d..005c5e1114 100644 --- a/plugins/Scriver/src/chat_window.cpp +++ b/plugins/Scriver/src/chat_window.cpp @@ -207,7 +207,7 @@ CChatRoomDlg::CChatRoomDlg(SESSION_INFO *si) m_splitterY.OnChange = Callback(this, &CChatRoomDlg::OnSplitterY); } -void CChatRoomDlg::OnInitDialog() +bool CChatRoomDlg::OnInitDialog() { CSuper::OnInitDialog(); m_si->pDlg = this; @@ -263,6 +263,7 @@ void CChatRoomDlg::OnInitDialog() SendMessage(m_hwndParent, CM_ADDCHILD, (WPARAM)this, 0); UpdateNickList(); NotifyEvent(MSG_WINDOW_EVT_OPEN); + return true; } void CChatRoomDlg::OnDestroy() -- cgit v1.2.3