diff options
author | George Hazan <ghazan@miranda.im> | 2018-07-11 17:09:17 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-07-11 17:09:17 +0300 |
commit | b2c91edc9646daa331de71d589e4fec6bdef4945 (patch) | |
tree | 847a77d0686d26e25b126313fbaa8262c81f8d1a /protocols/JabberG/src/jabber_groupchat.cpp | |
parent | ae081843e9663b3cb36b17309fbce1d2967315f1 (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/JabberG/src/jabber_groupchat.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_groupchat.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index 4deab1e08d..392d439f51 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -392,12 +392,12 @@ public: protected:
wchar_t *m_jid;
- void OnInitDialog();
- void OnDestroy();
+ bool OnInitDialog() override;
+ void OnDestroy();
void OnBtnOk(CCtrlButton*);
- INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam);
+ INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
};
CJabberDlgGcJoin::CJabberDlgGcJoin(CJabberProto *proto, wchar_t *jid) :
@@ -413,7 +413,7 @@ CJabberDlgGcJoin::~CJabberDlgGcJoin() mir_free(m_jid);
}
-void CJabberDlgGcJoin::OnInitDialog()
+bool CJabberDlgGcJoin::OnInitDialog()
{
CSuper::OnInitDialog();
@@ -475,6 +475,7 @@ void CJabberDlgGcJoin::OnInitDialog() SetDlgItemText(m_hwnd, IDC_RECENT1 + i, jid);
}
sttJoinDlgShowRecentItems(m_hwnd, i);
+ return true;
}
void CJabberDlgGcJoin::OnDestroy()
@@ -1147,7 +1148,7 @@ public: m_accept.OnClick = Callback(this, &CGroupchatInviteAcceptDlg::OnCommand_Accept);
}
- void OnInitDialog()
+ bool OnInitDialog() override
{
CSuper::OnInitDialog();
@@ -1162,6 +1163,7 @@ public: Window_SetIcon_IcoLib(m_hwnd, g_GetIconHandle(IDI_GROUP));
SetFocus(GetDlgItem(m_hwnd, IDC_NICK));
+ return true;
}
void OnCommand_Accept(CCtrlButton*)
|