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 | |
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')
38 files changed, 357 insertions, 254 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; } }; 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() diff --git a/protocols/FacebookRM/src/dialogs.h b/protocols/FacebookRM/src/dialogs.h index 33229c7f6c..85d6ffff44 100644 --- a/protocols/FacebookRM/src/dialogs.h +++ b/protocols/FacebookRM/src/dialogs.h @@ -46,10 +46,11 @@ private: CCtrlButton m_sms;
protected:
- void OnInitDialog();
+ bool OnInitDialog() override;
+ bool OnClose() override;
+
void OnOk(CCtrlButton*);
void OnSms(CCtrlButton*);
- void OnClose();
public:
CFacebookGuardDialog(FacebookProto *proto, const char *fb_dtsg);
diff --git a/protocols/Gadu-Gadu/src/options.cpp b/protocols/Gadu-Gadu/src/options.cpp index 5abcd75209..b1b1d4af99 100644 --- a/protocols/Gadu-Gadu/src/options.cpp +++ b/protocols/Gadu-Gadu/src/options.cpp @@ -32,7 +32,7 @@ GaduOptionsDlgConference::GaduOptionsDlgConference(GaduProto *proto) : CreateLink(cmbDefaultChatPolicy, GG_KEY_GC_POLICY_DEFAULT, DBVT_WORD, GG_KEYDEF_GC_POLICY_DEFAULT); } -void GaduOptionsDlgConference::OnInitDialog() +bool GaduOptionsDlgConference::OnInitDialog() { cmbPolicyForAllChatParticipants.AddString(TranslateT("Allow"), 0L); cmbPolicyForAllChatParticipants.AddString(TranslateT("Ask"), 1L); @@ -55,9 +55,10 @@ void GaduOptionsDlgConference::OnInitDialog() cmbDefaultChatPolicy.AddString(TranslateT("Ignore"), 2L); listIndex = m_proto->getWord(GG_KEY_GC_POLICY_DEFAULT, GG_KEYDEF_GC_POLICY_DEFAULT); cmbDefaultChatPolicy.SetCurSel(listIndex); + return true; } -void GaduOptionsDlgConference::OnApply() +bool GaduOptionsDlgConference::OnApply() { int selectionIndex = cmbPolicyForAllChatParticipants.GetCurSel(); m_proto->setWord(GG_KEY_GC_POLICY_TOTAL, cmbPolicyForAllChatParticipants.GetItemData(selectionIndex)); @@ -67,8 +68,10 @@ void GaduOptionsDlgConference::OnApply() selectionIndex = cmbDefaultChatPolicy.GetCurSel(); m_proto->setWord(GG_KEY_GC_POLICY_DEFAULT, cmbDefaultChatPolicy.GetItemData(selectionIndex)); + return true; } +///////////////////////////////////////////////////////////////////////////////////////// GaduOptionsDlgAdvanced::GaduOptionsDlgAdvanced(GaduProto *proto) : GaduDlgBase(proto, IDD_OPT_GG_ADVANCED), @@ -114,7 +117,7 @@ GaduOptionsDlgAdvanced::GaduOptionsDlgAdvanced(GaduProto *proto) : edtForwardPort.OnChange = Callback(this, &GaduOptionsDlgAdvanced::showRecconectRequired); } -void GaduOptionsDlgAdvanced::OnInitDialog() +bool GaduOptionsDlgAdvanced::OnInitDialog() { chkKeepConnectionAlive.Disable(); chkSslConnection.Disable(); @@ -136,6 +139,7 @@ void GaduOptionsDlgAdvanced::OnInitDialog() txtForwardPortLabel.Enable(useForwarding); txtReconnectRequired.Hide(); + return true; } void GaduOptionsDlgAdvanced::onCheck_ManualHosts(CCtrlCheck *) diff --git a/protocols/Gadu-Gadu/src/options.h b/protocols/Gadu-Gadu/src/options.h index 4a58f042a5..8e8694d25e 100644 --- a/protocols/Gadu-Gadu/src/options.h +++ b/protocols/Gadu-Gadu/src/options.h @@ -38,8 +38,8 @@ private: public: GaduOptionsDlgConference(GaduProto *proto); - void OnInitDialog() override; - void OnApply() override; + bool OnInitDialog() override; + bool OnApply() override; }; class GaduOptionsDlgAdvanced : public GaduDlgBase @@ -70,7 +70,7 @@ private: public: GaduOptionsDlgAdvanced(GaduProto *proto); - void OnInitDialog() override; + bool OnInitDialog() override; private: void onCheck_ManualHosts(CCtrlCheck*); diff --git a/protocols/IRCG/src/irc_dlg.h b/protocols/IRCG/src/irc_dlg.h index 0d74f61258..f4d7d1363b 100644 --- a/protocols/IRCG/src/irc_dlg.h +++ b/protocols/IRCG/src/irc_dlg.h @@ -38,10 +38,10 @@ struct CCoolIrcDlg : public CProtoDlgBase < CIrcProto > {
CCoolIrcDlg(CIrcProto* _pro, int dlgId);
- virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam);
+ INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
- virtual void OnInitDialog();
- virtual void OnDestroy();
+ bool OnInitDialog() override;
+ void OnDestroy() override;
};
struct CWhoisDlg : public CCoolIrcDlg
@@ -65,9 +65,9 @@ struct CWhoisDlg : public CCoolIrcDlg void OnTime(CCtrlButton*);
void OnVersion(CCtrlButton*);
- virtual void OnInitDialog();
- virtual void OnClose();
- virtual void OnDestroy();
+ bool OnInitDialog() override;
+ bool OnClose() override;
+ void OnDestroy() override;
};
struct CNickDlg : public CCoolIrcDlg
@@ -77,8 +77,8 @@ struct CNickDlg : public CCoolIrcDlg CCtrlCombo m_Enick;
CCtrlButton m_Ok;
- virtual void OnInitDialog();
- virtual void OnDestroy();
+ bool OnInitDialog() override;
+ void OnDestroy() override;
void OnOk(CCtrlButton*);
};
@@ -87,10 +87,11 @@ struct CListDlg : public CProtoDlgBase < CIrcProto > {
CListDlg(CIrcProto* _pro);
- virtual void OnInitDialog();
- virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam);
- virtual void OnDestroy();
- virtual int Resizer(UTILRESIZECONTROL *urc);
+ bool OnInitDialog() override;
+ void OnDestroy() override;
+ int Resizer(UTILRESIZECONTROL *urc) override;
+
+ INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
CCtrlListView m_list, m_list2;
CCtrlEdit m_filter, m_status;
@@ -109,8 +110,8 @@ struct CJoinDlg : public CCoolIrcDlg {
CJoinDlg(CIrcProto* _pro);
- virtual void OnInitDialog();
- virtual void OnDestroy();
+ bool OnInitDialog() override;
+ void OnDestroy() override;
CCtrlButton m_Ok;
void OnOk(CCtrlButton*);
@@ -120,8 +121,8 @@ struct CQuickDlg : public CCoolIrcDlg {
CQuickDlg(CIrcProto* _pro);
- virtual void OnInitDialog();
- virtual void OnDestroy();
+ bool OnInitDialog() override;
+ void OnDestroy() override;
CCtrlCombo m_serverCombo;
void OnServerCombo(CCtrlData*);
@@ -144,9 +145,9 @@ struct CManagerDlg : public CCoolIrcDlg CCtrlMButton m_add, m_edit, m_remove, m_applyTopic, m_applyModes;
CCtrlListBox m_list;
- virtual void OnInitDialog();
- virtual void OnClose();
- virtual void OnDestroy();
+ bool OnInitDialog() override;
+ bool OnClose() override;
+ void OnDestroy() override;
void OnCheck(CCtrlData*);
void OnCheck5(CCtrlData*);
@@ -174,8 +175,8 @@ struct CQuestionDlg : public CCoolIrcDlg {
CQuestionDlg(CIrcProto* _pro, CManagerDlg* owner = nullptr);
- virtual void OnInitDialog();
- virtual void OnClose();
+ bool OnInitDialog() override;
+ bool OnClose() override;
CCtrlButton m_Ok;
void OnOk(CCtrlButton*);
@@ -211,8 +212,8 @@ struct CConnectPrefsDlg : public CProtoDlgBase < CIrcProto > CConnectPrefsDlg(CIrcProto* _pro);
- virtual void OnInitDialog();
- virtual void OnApply();
+ bool OnInitDialog() override;
+ bool OnApply() override;
void OnServerCombo(CCtrlData*);
void OnAddServer(CCtrlButton*);
@@ -223,7 +224,6 @@ struct CConnectPrefsDlg : public CProtoDlgBase < CIrcProto > void OnUseServer(CCtrlData*);
void OnOnlineNotif(CCtrlData*);
void OnChannelAway(CCtrlData*);
- void OnRetry(CCtrlData*);
};
//---- the second property page: DCC/CTCP -----------------------------------------------
@@ -237,8 +237,8 @@ struct CCtcpPrefsDlg : public CProtoDlgBase < CIrcProto > CCtcpPrefsDlg(CIrcProto* _pro);
- virtual void OnInitDialog();
- virtual void OnApply();
+ bool OnInitDialog() override;
+ bool OnApply() override;
void OnClicked(CCtrlData*);
};
@@ -257,9 +257,9 @@ struct COtherPrefsDlg : public CProtoDlgBase < CIrcProto > COtherPrefsDlg(CIrcProto* _pro);
- virtual void OnInitDialog();
- virtual void OnApply();
- virtual void OnDestroy();
+ bool OnInitDialog() override;
+ bool OnApply() override;
+ void OnDestroy() override;
void OnPerformCombo(CCtrlData*);
void OnCodePage(CCtrlData*);
@@ -281,11 +281,11 @@ struct CIgnorePrefsDlg : public CProtoDlgBase < CIrcProto > CIgnorePrefsDlg(CIrcProto* _pro);
- virtual void OnInitDialog();
- virtual void OnDestroy();
- virtual void OnApply();
+ bool OnInitDialog() override;
+ void OnDestroy() override;
+ bool OnApply() override;
- virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam);
+ INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
void List_OnColumnClick(CCtrlListView::TEventInfo*);
void OnEnableIgnore(CCtrlData*);
@@ -308,8 +308,8 @@ struct CAddIgnoreDlg : public CProtoDlgBase < CIrcProto > CAddIgnoreDlg(CIrcProto* _pro, const wchar_t* mask, CIgnorePrefsDlg* parent);
- virtual void OnInitDialog();
- virtual void OnClose();
+ bool OnInitDialog() override;
+ bool OnClose() override;
void OnOk(CCtrlButton*);
};
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index 8160d70e30..e84d0d00e2 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -300,7 +300,7 @@ struct CServerDlg : public CProtoDlgBase<CIrcProto> m_autoClose = CLOSE_ON_CANCEL;
}
- virtual void OnInitDialog()
+ bool OnInitDialog() override
{
int i = m_owner->m_serverCombo.GetCount();
for (int index = 0; index < i; index++) {
@@ -340,14 +340,16 @@ struct CServerDlg : public CProtoDlgBase<CIrcProto> EnableWindow(GetDlgItem(m_hwnd, IDC_AUTO), bEnableSsl);
SetFocus(m_groupCombo.GetHwnd());
+ return true;
}
- virtual void OnClose()
+ bool OnClose() override
{
m_owner->m_serverCombo.Enable();
m_owner->m_add.Enable();
m_owner->m_edit.Enable();
m_owner->m_del.Enable();
+ return true;
}
void OnOk(CCtrlButton*)
@@ -480,7 +482,7 @@ CConnectPrefsDlg::CConnectPrefsDlg(CIrcProto* _pro) m_channelAway.OnChange = Callback(this, &CConnectPrefsDlg::OnChannelAway);
}
-void CConnectPrefsDlg::OnInitDialog()
+bool CConnectPrefsDlg::OnInitDialog()
{
m_proto->m_hwndConnect = m_hwnd;
@@ -556,6 +558,7 @@ void CConnectPrefsDlg::OnInitDialog() m_port.Enable(!m_proto->m_disableDefaultServer);
m_port2.Enable(!m_proto->m_disableDefaultServer);
m_pass.Enable(!m_proto->m_disableDefaultServer);
+ return true;
}
void CConnectPrefsDlg::OnServerCombo(CCtrlData*)
@@ -676,7 +679,7 @@ void CConnectPrefsDlg::OnChannelAway(CCtrlData*) m_limit.Enable(m_onlineNotif.GetState() && m_channelAway.GetState());
}
-void CConnectPrefsDlg::OnApply()
+bool CConnectPrefsDlg::OnApply()
{
//Save the setting in the CONNECT dialog
if (m_enableServer.GetState()) {
@@ -772,6 +775,7 @@ void CConnectPrefsDlg::OnApply() }
m_proto->WriteSettings(ConnectSettings, _countof(ConnectSettings));
+ return true;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -811,7 +815,7 @@ CCtcpPrefsDlg::CCtcpPrefsDlg(CIrcProto* _pro) m_fromServer.OnChange = Callback(this, &CCtcpPrefsDlg::OnClicked);
}
-void CCtcpPrefsDlg::OnInitDialog()
+bool CCtcpPrefsDlg::OnInitDialog()
{
m_userInfo.SetText(m_proto->m_userInfo);
@@ -863,6 +867,7 @@ void CCtcpPrefsDlg::OnInitDialog() else m_ip.SetText(TranslateT("<Automatic>"));
}
}
+ return true;
}
void CCtcpPrefsDlg::OnClicked(CCtrlData*)
@@ -890,7 +895,7 @@ void CCtcpPrefsDlg::OnClicked(CCtrlData*) }
}
-void CCtcpPrefsDlg::OnApply()
+bool CCtcpPrefsDlg::OnApply()
{
m_userInfo.GetText(m_proto->m_userInfo, _countof(m_proto->m_userInfo));
@@ -919,6 +924,7 @@ void CCtcpPrefsDlg::OnApply() m_proto->m_DCCChatAccept = 3;
m_proto->WriteSettings(CtcpSettings, _countof(CtcpSettings));
+ return true;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -993,7 +999,7 @@ COtherPrefsDlg::COtherPrefsDlg(CIrcProto* _pro) m_delete.OnClick = Callback(this, &COtherPrefsDlg::OnDelete);
}
-void COtherPrefsDlg::OnInitDialog()
+bool COtherPrefsDlg::OnInitDialog()
{
mir_subclassWindow(m_alias.GetHwnd(), EditSubclassProc);
mir_subclassWindow(m_quitMessage.GetHwnd(), EditSubclassProc);
@@ -1039,6 +1045,7 @@ void COtherPrefsDlg::OnInitDialog() m_performCombo.SetCurSel(0);
OnPerformCombo(nullptr);
m_autodetect.SetState(m_proto->m_utfAutodetect);
+ return true;
}
void COtherPrefsDlg::OnPerformCombo(CCtrlData*)
@@ -1128,7 +1135,7 @@ void COtherPrefsDlg::OnDestroy() }
}
-void COtherPrefsDlg::OnApply()
+bool COtherPrefsDlg::OnApply()
{
mir_free(m_proto->m_alias);
m_proto->m_alias = m_alias.GetText();
@@ -1159,6 +1166,7 @@ void COtherPrefsDlg::OnApply() }
}
m_proto->WriteSettings(OtherSettings, _countof(OtherSettings));
+ return true;
}
void COtherPrefsDlg::addPerformComboValue(int idx, const char* szValueName)
@@ -1194,7 +1202,7 @@ CAddIgnoreDlg::CAddIgnoreDlg(CIrcProto* _pro, const wchar_t* mask, CIgnorePrefsD m_Ok.OnClick = Callback(this, &CAddIgnoreDlg::OnOk);
}
-void CAddIgnoreDlg::OnInitDialog()
+bool CAddIgnoreDlg::OnInitDialog()
{
if (szOldMask[0] == 0) {
if (m_proto->IsConnected())
@@ -1205,6 +1213,7 @@ void CAddIgnoreDlg::OnInitDialog() CheckDlgButton(m_hwnd, IDC_D, BST_CHECKED);
CheckDlgButton(m_hwnd, IDC_C, BST_CHECKED);
}
+ return true;
}
void CAddIgnoreDlg::OnOk(CCtrlButton*)
@@ -1235,9 +1244,10 @@ void CAddIgnoreDlg::OnOk(CCtrlButton*) }
}
-void CAddIgnoreDlg::OnClose()
+bool CAddIgnoreDlg::OnClose()
{
m_owner->FixButtons();
+ return true;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1400,7 +1410,7 @@ CIgnorePrefsDlg::CIgnorePrefsDlg(CIrcProto* _pro) m_list.OnColumnClick = Callback(this, &CIgnorePrefsDlg::List_OnColumnClick);
}
-void CIgnorePrefsDlg::OnInitDialog()
+bool CIgnorePrefsDlg::OnInitDialog()
{
m_proto->m_ignoreDlg = this;
mir_subclassWindow(m_list.GetHwnd(), ListviewSubclassProc);
@@ -1437,6 +1447,7 @@ void CIgnorePrefsDlg::OnInitDialog() ListView_SetExtendedListViewStyle(GetDlgItem(m_hwnd, IDC_INFO_LISTVIEW), LVS_EX_FULLROWSELECT);
RebuildList();
+ return true;
}
INT_PTR CIgnorePrefsDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
@@ -1534,7 +1545,7 @@ void CIgnorePrefsDlg::List_OnColumnClick(CCtrlListView::TEventInfo*) UpdateList();
}
-void CIgnorePrefsDlg::OnApply()
+bool CIgnorePrefsDlg::OnApply()
{
m_proto->m_DCCFileEnabled = !m_ignoreFile.GetState();
m_proto->m_DCCChatEnabled = !m_ignoreChat.GetState();
@@ -1542,6 +1553,7 @@ void CIgnorePrefsDlg::OnApply() m_proto->m_ignoreChannelDefault = m_ignoreChannel.GetState();
m_proto->m_DCCChatIgnore = m_ignoreUnknown.GetState() ? 2 : 1;
m_proto->WriteSettings(IgnoreSettings, _countof(IgnoreSettings));
+ return true;
}
void CIgnorePrefsDlg::OnDestroy()
@@ -1741,7 +1753,7 @@ struct CDlgAccMgrUI : public CProtoDlgBase<CIrcProto> m_serverCombo.OnChange = Callback(this, &CDlgAccMgrUI::OnChangeCombo);
}
- virtual void OnInitDialog()
+ bool OnInitDialog() override
{
for (auto &si : g_servers)
m_serverCombo.AddStringA(si->m_name, LPARAM(si));
@@ -1761,9 +1773,10 @@ struct CDlgAccMgrUI : public CProtoDlgBase<CIrcProto> m_nick2.SetText(m_proto->m_alternativeNick);
m_userID.SetText(m_proto->m_userID);
m_name.SetText(m_proto->m_name);
+ return true;
}
- virtual void OnApply()
+ bool OnApply() override
{
m_proto->m_serverComboSelection = m_serverCombo.GetCurSel();
m_server.GetTextA(m_proto->m_serverName, _countof(m_proto->m_serverName));
@@ -1780,6 +1793,7 @@ struct CDlgAccMgrUI : public CProtoDlgBase<CIrcProto> removeSpaces(m_proto->m_userID);
m_name.GetText(m_proto->m_name, _countof(m_proto->m_name));
m_proto->WriteSettings(ConnectSettings, _countof(ConnectSettings));
+ return true;
}
void OnChangeCombo(CCtrlCombo*)
diff --git a/protocols/IRCG/src/windows.cpp b/protocols/IRCG/src/windows.cpp index 6810e439b8..6e402fcc40 100644 --- a/protocols/IRCG/src/windows.cpp +++ b/protocols/IRCG/src/windows.cpp @@ -76,7 +76,7 @@ CWhoisDlg::CWhoisDlg(CIrcProto *_pro) m_Query.OnClick = Callback(this, &CWhoisDlg::OnQuery);
}
-void CWhoisDlg::OnInitDialog()
+bool CWhoisDlg::OnInitDialog()
{
LOGFONT lf;
HFONT hFont = (HFONT)m_AwayTime.SendMsg(WM_GETFONT, 0, 0);
@@ -88,12 +88,14 @@ void CWhoisDlg::OnInitDialog() CCoolIrcDlg::OnInitDialog();
Window_SetIcon_IcoLib(m_hwnd, GetIconHandle(IDI_WHOIS));
+ return true;
}
-void CWhoisDlg::OnClose()
+bool CWhoisDlg::OnClose()
{
ShowWindow(m_hwnd, SW_HIDE);
SendMessage(m_hwnd, WM_SETREDRAW, FALSE, 0);
+ return true;
}
void CWhoisDlg::OnDestroy()
@@ -205,7 +207,7 @@ CNickDlg::CNickDlg(CIrcProto *_pro) m_Ok.OnClick = Callback(this, &CNickDlg::OnOk);
}
-void CNickDlg::OnInitDialog()
+bool CNickDlg::OnInitDialog()
{
CCoolIrcDlg::OnInitDialog();
Window_SetIcon_IcoLib(m_hwnd, GetIconHandle(IDI_RENAME));
@@ -218,6 +220,7 @@ void CNickDlg::OnInitDialog() db_free(&dbv);
}
+ return true;
}
void CNickDlg::OnDestroy()
@@ -263,7 +266,7 @@ CListDlg::CListDlg(CIrcProto *_pro) m_filter.OnChange = Callback(this, &CListDlg::onChange_Filter);
}
-void CListDlg::OnInitDialog()
+bool CListDlg::OnInitDialog()
{
RECT screen;
@@ -295,6 +298,7 @@ void CListDlg::OnInitDialog() m_list2.SetExtendedListViewStyle(LVS_EX_FULLROWSELECT);
Window_SetIcon_IcoLib(m_hwnd, GetIconHandle(IDI_LIST));
m_status.SetText(TranslateT("Please wait..."));
+ return true;
}
INT_PTR CListDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
@@ -498,7 +502,7 @@ CJoinDlg::CJoinDlg(CIrcProto *_pro) m_Ok.OnClick = Callback(this, &CJoinDlg::OnOk);
}
-void CJoinDlg::OnInitDialog()
+bool CJoinDlg::OnInitDialog()
{
CCoolIrcDlg::OnInitDialog();
@@ -513,6 +517,7 @@ void CJoinDlg::OnInitDialog() }
db_free(&dbv);
}
+ return true;
}
void CJoinDlg::OnDestroy()
@@ -558,7 +563,7 @@ CQuickDlg::CQuickDlg(CIrcProto *_pro) m_serverCombo.OnChange = Callback(this, &CQuickDlg::OnServerCombo);
}
-void CQuickDlg::OnInitDialog()
+bool CQuickDlg::OnInitDialog()
{
CCoolIrcDlg::OnInitDialog();
@@ -600,6 +605,7 @@ void CQuickDlg::OnInitDialog() OnServerCombo(nullptr);
}
else EnableWindow(GetDlgItem(m_hwnd, IDOK), false);
+ return true;
}
void CQuickDlg::OnDestroy()
@@ -708,17 +714,19 @@ CQuestionDlg::CQuestionDlg(CIrcProto *_pro, CManagerDlg *owner) m_Ok.OnClick = Callback(this, &CQuestionDlg::OnOk);
}
-void CQuestionDlg::OnInitDialog()
+bool CQuestionDlg::OnInitDialog()
{
CCoolIrcDlg::OnInitDialog();
Window_SetIcon_IcoLib(m_hwnd, GetIconHandle(IDI_IRCQUESTION));
+ return true;
}
-void CQuestionDlg::OnClose()
+bool CQuestionDlg::OnClose()
{
if (m_owner)
m_owner->CloseQuestion();
+ return true;
}
void CQuestionDlg::OnOk(CCtrlButton*)
@@ -861,7 +869,7 @@ LRESULT CALLBACK MgrEditSubclassProc(HWND m_hwnd, UINT msg, WPARAM wParam, LPARA return mir_callNextSubclass(m_hwnd, MgrEditSubclassProc, msg, wParam, lParam);
}
-void CManagerDlg::OnInitDialog()
+bool CManagerDlg::OnInitDialog()
{
CCoolIrcDlg::OnInitDialog();
@@ -886,16 +894,15 @@ void CManagerDlg::OnInitDialog() if (!strchr(modes, 'p')) m_check7.Disable();
if (!strchr(modes, 's')) m_check8.Disable();
if (!strchr(modes, 'c')) m_check9.Disable();
+ return true;
}
-void CManagerDlg::OnClose()
+bool CManagerDlg::OnClose()
{
if (m_applyModes.Enabled() || m_applyTopic.Enabled()) {
int i = MessageBox(nullptr, TranslateT("You have not applied all changes!\n\nApply before exiting?"), TranslateT("IRC warning"), MB_YESNOCANCEL | MB_ICONWARNING | MB_DEFBUTTON3);
- if (i == IDCANCEL) {
- m_lresult = TRUE;
- return;
- }
+ if (i == IDCANCEL)
+ return false;
if (i == IDYES) {
if (m_applyModes.Enabled())
@@ -927,6 +934,7 @@ void CManagerDlg::OnClose() mir_free(p);
}
DestroyWindow(m_hwnd);
+ return true;
}
void CManagerDlg::OnDestroy()
@@ -1373,7 +1381,7 @@ CCoolIrcDlg::CCoolIrcDlg(CIrcProto* _pro, int dlgId) : CProtoDlgBase<CIrcProto>(_pro, dlgId)
{}
-void CCoolIrcDlg::OnInitDialog()
+bool CCoolIrcDlg::OnInitDialog()
{
HFONT hFont = (HFONT)SendDlgItemMessage(m_hwnd, IDC_CAPTION, WM_GETFONT, 0, 0);
@@ -1385,6 +1393,7 @@ void CCoolIrcDlg::OnInitDialog() SendDlgItemMessage(m_hwnd, IDC_CAPTION, WM_SETFONT, (WPARAM)hFont, 0);
SendDlgItemMessage(m_hwnd, IDC_LOGO, STM_SETICON, (LPARAM)(HICON)LoadIconEx(IDI_LOGO), 0);
+ return true;
}
void CCoolIrcDlg::OnDestroy()
diff --git a/protocols/IcqOscarJ/src/askauthentication.cpp b/protocols/IcqOscarJ/src/askauthentication.cpp index 998390767e..1afcac4f89 100644 --- a/protocols/IcqOscarJ/src/askauthentication.cpp +++ b/protocols/IcqOscarJ/src/askauthentication.cpp @@ -43,13 +43,14 @@ public: m_btnOk.OnClick = Callback(this, &AskAuthProcDlg::onOk);
}
- virtual void OnInitDialog()
+ bool OnInitDialog() override
{
if (!m_hContact || !m_proto->icqOnline())
EndDialog(m_hwnd, 0);
m_auth.SendMsg(EM_LIMITTEXT, 255, 0);
m_auth.SetText(TranslateT("Please authorize me to add you to my contact list."));
+ return true;
}
void onOk(CCtrlButton*)
diff --git a/protocols/JabberG/src/jabber_agent.cpp b/protocols/JabberG/src/jabber_agent.cpp index 80f51ae354..ca2a996272 100644 --- a/protocols/JabberG/src/jabber_agent.cpp +++ b/protocols/JabberG/src/jabber_agent.cpp @@ -42,14 +42,15 @@ public: m_ok.OnClick = Callback(this, &CAgentRegProgressDlg::OnOk);
}
- virtual void OnInitDialog()
+ bool OnInitDialog() override
{
m_proto->m_hwndRegProgress = m_hwnd;
SetWindowText(m_hwnd, TranslateT("Jabber Agent Registration"));
TranslateDialogDefault(m_hwnd);
+ return true;
}
- virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
+ INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
{
if (msg == WM_JABBER_REGDLG_UPDATE) {
if ((wchar_t*)lParam == nullptr)
@@ -96,7 +97,7 @@ public: m_submit.OnClick = Callback(this, &CAgentRegDlg::OnSubmit);
}
- virtual void OnInitDialog()
+ bool OnInitDialog() override
{
EnableWindow(GetParent(m_hwnd), FALSE);
m_proto->m_hwndAgentRegInput = m_hwnd;
@@ -112,9 +113,10 @@ public: LONG_PTR frameExStyle = GetWindowLongPtr(GetDlgItem(m_hwnd, IDC_FRAME), GWL_EXSTYLE);
frameExStyle |= WS_EX_CONTROLPARENT;
SetWindowLongPtr(GetDlgItem(m_hwnd, IDC_FRAME), GWL_EXSTYLE, frameExStyle);
+ return true;
}
- virtual void OnDestroy()
+ void OnDestroy() override
{
xmlDestroyNode(m_agentRegIqNode);
JabberFormDestroyUI(GetDlgItem(m_hwnd, IDC_FRAME));
@@ -123,7 +125,7 @@ public: SetActiveWindow(GetParent(m_hwnd));
}
- virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
+ INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
{
switch(msg) {
case WM_CTLCOLORSTATIC:
diff --git a/protocols/JabberG/src/jabber_bookmarks.cpp b/protocols/JabberG/src/jabber_bookmarks.cpp index 1838665de4..6954dd9656 100644 --- a/protocols/JabberG/src/jabber_bookmarks.cpp +++ b/protocols/JabberG/src/jabber_bookmarks.cpp @@ -170,14 +170,14 @@ public: void UpdateData();
protected:
- void OnInitDialog();
- void OnClose();
- void OnDestroy();
- int Resizer(UTILRESIZECONTROL *urc);
+ bool OnInitDialog() override;
+ bool OnClose() override;
+ void OnDestroy() override;
+ int Resizer(UTILRESIZECONTROL *urc) override;
- INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam);
+ INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
void OnProtoCheckOnline(WPARAM wParam, LPARAM lParam);
- void OnProtoRefresh(WPARAM wParam, LPARAM lParam);
+ void OnProtoRefresh(WPARAM, LPARAM);
void OpenBookmark();
private:
@@ -269,7 +269,7 @@ void CJabberDlgBookmarks::UpdateData() << XQUERY(JABBER_FEAT_PRIVATE_STORAGE) << XCHILDNS(L"storage", L"storage:bookmarks"));
}
-void CJabberDlgBookmarks::OnInitDialog()
+bool CJabberDlgBookmarks::OnInitDialog()
{
CSuper::OnInitDialog();
@@ -294,9 +294,10 @@ void CJabberDlgBookmarks::OnInitDialog() m_lvBookmarks.AddGroup(1, TranslateT("Links"));
Utils_RestoreWindowPosition(m_hwnd, 0, m_proto->m_szModuleName, "bookmarksWnd_");
+ return true;
}
-void CJabberDlgBookmarks::OnClose()
+bool CJabberDlgBookmarks::OnClose()
{
LVCOLUMN lvc = {0};
lvc.mask = LVCF_WIDTH;
@@ -309,7 +310,7 @@ void CJabberDlgBookmarks::OnClose() Utils_SaveWindowPosition(m_hwnd, 0, m_proto->m_szModuleName, "bookmarksWnd_");
- CSuper::OnClose();
+ return CSuper::OnClose();
}
void CJabberDlgBookmarks::OnDestroy()
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 5e9654f1ad..7220bab19c 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -712,7 +712,7 @@ public: mir_free(m_room);
}
- void OnInitDialog()
+ bool OnInitDialog() override
{
CSuper::OnInitDialog();
@@ -724,6 +724,7 @@ public: SendDlgItemMessage(m_hwnd, IDC_CLIST, CLM_SETEXSTYLE, CLS_EX_DISABLEDRAGDROP | CLS_EX_TRACKSELECT, 0);
ResetListOptions(&m_clc);
FilterList(&m_clc);
+ return true;
}
void OnCommand_AddJid(CCtrlButton*)
diff --git a/protocols/JabberG/src/jabber_console.cpp b/protocols/JabberG/src/jabber_console.cpp index 094b4555e0..43b43e4869 100644 --- a/protocols/JabberG/src/jabber_console.cpp +++ b/protocols/JabberG/src/jabber_console.cpp @@ -319,12 +319,13 @@ public: CJabberDlgConsole(CJabberProto *proto);
protected:
- void OnInitDialog();
- void OnClose();
- void OnDestroy();
+ bool OnInitDialog() override;
+ bool OnClose() override;
+ void OnDestroy() override;
+ int Resizer(UTILRESIZECONTROL *urc) override;
+ INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
+
void OnProtoRefresh(WPARAM wParam, LPARAM lParam);
- INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam);
- int Resizer(UTILRESIZECONTROL *urc);
};
CJabberDlgConsole::CJabberDlgConsole(CJabberProto *proto):
@@ -332,7 +333,7 @@ CJabberDlgConsole::CJabberDlgConsole(CJabberProto *proto): {
}
-void CJabberDlgConsole::OnInitDialog()
+bool CJabberDlgConsole::OnInitDialog()
{
CSuper::OnInitDialog();
@@ -391,9 +392,10 @@ void CJabberDlgConsole::OnInitDialog() EnableWindow(GetDlgItem(m_hwnd, IDC_BTN_FILTER_REFRESH), (m_proto->m_filterInfo.type == TFilterInfo::T_OFF) ? FALSE : TRUE);
Utils_RestoreWindowPosition(m_hwnd, 0, m_proto->m_szModuleName, "consoleWnd_");
+ return true;
}
-void CJabberDlgConsole::OnClose()
+bool CJabberDlgConsole::OnClose()
{
m_proto->setByte("consoleWnd_msg", m_proto->m_filterInfo.msg);
m_proto->setByte("consoleWnd_presence", m_proto->m_filterInfo.presence);
@@ -403,7 +405,7 @@ void CJabberDlgConsole::OnClose() Utils_SaveWindowPosition(m_hwnd, 0, m_proto->m_szModuleName, "consoleWnd_");
DestroyWindow(m_hwnd);
- CSuper::OnClose();
+ return CSuper::OnClose();
}
void CJabberDlgConsole::OnDestroy()
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index d1fb73b739..a9a3dbb985 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -581,11 +581,11 @@ public: CJabberDlgDiscovery(CJabberProto *proto, wchar_t *jid);
protected:
- void OnInitDialog();
- void OnClose();
- void OnDestroy();
- INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam);
- int Resizer(UTILRESIZECONTROL *urc);
+ bool OnInitDialog() override;
+ bool OnClose() override;
+ void OnDestroy() override;
+ INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
+ int Resizer(UTILRESIZECONTROL *urc) override;
private:
wchar_t *m_jid;
@@ -628,7 +628,7 @@ CJabberDlgDiscovery::CJabberDlgDiscovery(CJabberProto *proto, wchar_t *jid) : m_lstDiscoTree.OnFilterChanged = Callback(this, &CJabberDlgDiscovery::lstDiscoTree_OnFilter);
}
-void CJabberDlgDiscovery::OnInitDialog()
+bool CJabberDlgDiscovery::OnInitDialog()
{
CSuper::OnInitDialog();
@@ -702,9 +702,10 @@ void CJabberDlgDiscovery::OnInitDialog() PostMessage(m_hwnd, WM_COMMAND, MAKEWPARAM(IDC_BUTTON_BROWSE, 0), 0);
Utils_RestoreWindowPosition(m_hwnd, 0, m_proto->m_szModuleName, "discoWnd_");
+ return true;
}
-void CJabberDlgDiscovery::OnClose()
+bool CJabberDlgDiscovery::OnClose()
{
m_proto->setByte("discoWnd_useTree", IsDlgButtonChecked(m_hwnd, IDC_BTN_VIEWTREE));
@@ -721,7 +722,7 @@ void CJabberDlgDiscovery::OnClose() Utils_SaveWindowPosition(m_hwnd, 0, m_proto->m_szModuleName, "discoWnd_");
DestroyWindow(m_hwnd);
- CSuper::OnClose();
+ return CSuper::OnClose();
}
void CJabberDlgDiscovery::OnDestroy()
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*)
diff --git a/protocols/JabberG/src/jabber_notes.cpp b/protocols/JabberG/src/jabber_notes.cpp index 7441b8f669..090709feb3 100644 --- a/protocols/JabberG/src/jabber_notes.cpp +++ b/protocols/JabberG/src/jabber_notes.cpp @@ -172,8 +172,8 @@ public: CJabberDlgNoteItem(CJabberProto *proto, CNoteItem *pNote, TFnProcessNote fnProcess);
protected:
- void OnInitDialog();
- int Resizer(UTILRESIZECONTROL *urc);
+ bool OnInitDialog() override;
+ int Resizer(UTILRESIZECONTROL *urc);
private:
CNoteItem *m_pNote;
@@ -201,10 +201,11 @@ private: EndDialog(m_hwnd, TRUE);
}
- void OnClose()
+ bool OnClose() override
{
- if (m_fnProcess) (m_proto->*m_fnProcess)(m_pNote, false);
- CSuper::OnClose();
+ if (m_fnProcess)
+ (m_proto->*m_fnProcess)(m_pNote, false);
+ return CSuper::OnClose();
}
};
@@ -233,7 +234,7 @@ CJabberDlgNoteItem::CJabberDlgNoteItem(CJabberProto *proto, CNoteItem *pNote, TF m_btnOk.OnClick = Callback(this, &CJabberDlgNoteItem::btnOk_OnClick);
}
-void CJabberDlgNoteItem::OnInitDialog()
+bool CJabberDlgNoteItem::OnInitDialog()
{
CSuper::OnInitDialog();
Window_SetIcon_IcoLib(m_hwnd, g_GetIconHandle(IDI_NOTES));
@@ -251,6 +252,7 @@ void CJabberDlgNoteItem::OnInitDialog() m_txtTitle.SetText(m_pNote->GetTitle());
m_txtText.SetText(m_pNote->GetText());
m_txtTags.SetText(m_pNote->GetTagsStr());
+ return true;
}
int CJabberDlgNoteItem::Resizer(UTILRESIZECONTROL *urc)
@@ -440,8 +442,8 @@ public: void UpdateData();
protected:
- void OnInitDialog();
- void OnClose();
+ bool OnInitDialog() override;
+ bool OnClose() override;
void OnDestroy();
int Resizer(UTILRESIZECONTROL *urc);
@@ -635,7 +637,7 @@ void CJabberDlgNotes::UpdateData() EnableControls();
}
-void CJabberDlgNotes::OnInitDialog()
+bool CJabberDlgNotes::OnInitDialog()
{
CSuper::OnInitDialog();
Window_SetIcon_IcoLib(m_hwnd, g_GetIconHandle(IDI_NOTES));
@@ -650,21 +652,19 @@ void CJabberDlgNotes::OnInitDialog() m_lstNotes.SetFonts(m_hfntNormal, m_hfntSmall, m_hfntBold);
Utils_RestoreWindowPosition(m_hwnd, 0, m_proto->m_szModuleName, "notesWnd_");
+ return true;
}
-void CJabberDlgNotes::OnClose()
+bool CJabberDlgNotes::OnClose()
{
- if (m_proto->m_notes.IsModified()) {
- if (IDYES != MessageBox(m_hwnd, TranslateT("Notes are not saved, close this window without uploading data to server?"), TranslateT("Are you sure?"), MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2)) {
- m_lresult = TRUE;
- return;
- }
- }
+ if (m_proto->m_notes.IsModified())
+ if (IDYES != MessageBox(m_hwnd, TranslateT("Notes are not saved, close this window without uploading data to server?"), TranslateT("Are you sure?"), MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2))
+ return false;
Utils_SaveWindowPosition(m_hwnd, 0, m_proto->m_szModuleName, "notesWnd_");
DeleteObject(m_hfntSmall);
DeleteObject(m_hfntBold);
- CSuper::OnClose();
+ return CSuper::OnClose();
}
void CJabberDlgNotes::OnDestroy()
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index 0044594f56..47f6f7f8f8 100755 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -240,14 +240,15 @@ public: }
protected:
- void OnInitDialog()
+ bool OnInitDialog() override
{
wchar_t text[256];
mir_snwprintf(text, STR_FORMAT, TranslateT("Register"), m_regInfo->username, m_regInfo->server, m_regInfo->port);
SetDlgItemText(m_hwnd, IDC_REG_STATUS, text);
+ return true;
}
- INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
+ INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
{
switch (msg) {
case WM_JABBER_REGDLG_UPDATE: // wParam=progress (0-100), lparam=status string
@@ -288,8 +289,6 @@ private: m_btnOk.SetText(TranslateT("Cancel"));
m_bProcessStarted = true;
-
- m_lresult = TRUE;
}
};
@@ -419,7 +418,7 @@ public: }
protected:
- void OnInitDialog()
+ bool OnInitDialog() override
{
CSuper::OnInitDialog();
@@ -475,9 +474,10 @@ protected: chkUseDomainLogin_OnChange(&m_chkUseDomainLogin);
CheckRegistration();
+ return true;
}
- void OnApply()
+ bool OnApply() override
{
// clear saved password
m_proto->m_savedPassword = nullptr;
@@ -511,6 +511,7 @@ protected: m_proto->SendPresence(m_proto->m_iStatus, true);
}
+ return true;
}
void OnChange(CCtrlBase*)
@@ -519,7 +520,7 @@ protected: CheckRegistration();
}
- INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
+ INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
{
switch (msg) {
case WM_ACTIVATE:
@@ -815,15 +816,16 @@ public: m_otvOptions.AddOption(LPGENW("Security") L"/" LPGENW("Use OMEMO encryption for messages if possible (XEP-0384) (Basic support without GUI)"), m_proto->m_bUseOMEMO);
}
- void OnInitDialog()
+ bool OnInitDialog() override
{
CSuper::OnInitDialog();
chkDirect_OnChange(&m_chkDirect);
chkProxy_OnChange(&m_chkProxy);
+ return true;
}
- void OnApply()
+ bool OnApply() override
{
if (m_proto->m_bDisableFrame != m_oldFrameValue) {
m_proto->InitInfoFrame(); // create or destroy a frame
@@ -855,6 +857,7 @@ public: m_proto->m_omemo.deinit();
m_proto->m_clientCapsManager.UpdateFeatHash();
m_proto->SendPresence(m_proto->m_iStatus, true);
+ return true;
}
void chkDirect_OnChange(CCtrlData *)
@@ -1570,7 +1573,7 @@ public: protected:
enum { ACC_PUBLIC, ACC_TLS, ACC_SSL, ACC_GTALK, ACC_HIPCHAT, ACC_LJTALK, ACC_LOL_EN, ACC_LOL_EW, ACC_LOL_OC, ACC_LOL_US, ACC_OK, ACC_SMS };
- void OnInitDialog()
+ bool OnInitDialog() override
{
CSuper::OnInitDialog();
@@ -1703,9 +1706,10 @@ protected: chkUseDomainLogin_OnChange(&m_chkUseDomainLogin);
CheckRegistration();
+ return true;
}
- void OnApply()
+ bool OnApply() override
{
// clear saved password
m_proto->m_savedPassword = nullptr;
@@ -1806,6 +1810,7 @@ protected: m_proto->SendPresence(m_proto->m_iStatus, true);
}
+ return true;
}
void OnChange(CCtrlBase*)
@@ -1814,7 +1819,7 @@ protected: CheckRegistration();
}
- INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
+ INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
{
switch (msg) {
case WM_JABBER_REFRESH:
diff --git a/protocols/JabberG/src/jabber_opttree.cpp b/protocols/JabberG/src/jabber_opttree.cpp index d4b0bfca13..3c442be1ad 100644 --- a/protocols/JabberG/src/jabber_opttree.cpp +++ b/protocols/JabberG/src/jabber_opttree.cpp @@ -171,7 +171,7 @@ void CCtrlTreeOpts::OnDestroy() ImageList_Destroy(GetImageList(TVSIL_NORMAL));
}
-void CCtrlTreeOpts::OnApply()
+bool CCtrlTreeOpts::OnApply()
{
CCtrlTreeView::OnApply();
@@ -180,6 +180,7 @@ void CCtrlTreeOpts::OnApply() GetItem(it->m_hItem, &tvi);
*it->m_option = ((tvi.iImage == IMG_CHECK) || (tvi.iImage == IMG_RCHECK)) ? 1 : 0;
}
+ return true;
}
void CCtrlTreeOpts::ProcessItemClick(HTREEITEM hti)
diff --git a/protocols/JabberG/src/jabber_opttree.h b/protocols/JabberG/src/jabber_opttree.h index 9d2aa9e763..79d119158f 100644 --- a/protocols/JabberG/src/jabber_opttree.h +++ b/protocols/JabberG/src/jabber_opttree.h @@ -39,10 +39,10 @@ public: void AddOption(wchar_t *szOption, CMOption<BYTE> &option);
- BOOL OnNotify(int idCtrl, NMHDR *pnmh);
- void OnDestroy();
- void OnInit();
- void OnApply();
+ BOOL OnNotify(int idCtrl, NMHDR *pnmh) override;
+ void OnDestroy() override;
+ void OnInit() override;
+ bool OnApply() override;
protected:
struct COptionsItem
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index f6645bf2e3..c7a7325a95 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -356,7 +356,7 @@ public: m_btnCancel.OnClick = Callback(this, &CJabberDlgPrivacyRule::btnCancel_OnClick);
}
- virtual void OnInitDialog()
+ bool OnInitDialog() override
{
CSuper::OnInitDialog();
@@ -404,6 +404,7 @@ public: if (m_pRule->GetValue() && (m_pRule->GetType() == Jid || m_pRule->GetType() == Group))
SetDlgItemText(m_hwnd, IDC_EDIT_VALUE, m_pRule->GetValue());
+ return true;
}
void cbType_OnChange(CCtrlData*)
@@ -566,8 +567,8 @@ protected: static int idSimpleControls[];
static int idAdvancedControls[];
- void OnInitDialog();
- void OnClose();
+ bool OnInitDialog() override;
+ bool OnClose() override;
void OnDestroy();
void OnProtoRefresh(WPARAM, LPARAM);
int Resizer(UTILRESIZECONTROL *urc);
@@ -756,7 +757,7 @@ CJabberDlgPrivacyLists::CJabberDlgPrivacyLists(CJabberProto *proto): m_clcClist.OnClick = Callback(this, &CJabberDlgPrivacyLists::clcClist_OnClick);
}
-void CJabberDlgPrivacyLists::OnInitDialog()
+bool CJabberDlgPrivacyLists::OnInitDialog()
{
CSuper::OnInitDialog();
@@ -833,15 +834,16 @@ void CJabberDlgPrivacyLists::OnInitDialog() SetStatusText(TranslateT("Loading..."));
Utils_RestoreWindowPosition(m_hwnd, 0, m_proto->m_szModuleName, "plistsWnd_sz");
+ return true;
}
-void CJabberDlgPrivacyLists::OnClose()
+bool CJabberDlgPrivacyLists::OnClose()
{
- if (CanExit()) {
- DestroyWindow(m_hwnd);
- CSuper::OnClose();
- }
- else m_lresult = TRUE;
+ if (!CanExit())
+ return false;
+
+ DestroyWindow(m_hwnd);
+ return CSuper::OnClose();
}
void CJabberDlgPrivacyLists::OnDestroy()
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index 928ff04025..4dc4ed5ce1 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -579,7 +579,7 @@ public: m_btnDeny.OnClick = Callback(this, &CJabberDlgHttpAuth::btnDeny_OnClick);
}
- void OnInitDialog()
+ bool OnInitDialog() override
{
CSuper::OnInitDialog();
@@ -589,6 +589,7 @@ public: SetDlgItemText(m_hwnd, IDC_TXT_FROM, m_pParams->m_szFrom);
SetDlgItemText(m_hwnd, IDC_TXT_ID, m_pParams->m_szId);
SetDlgItemText(m_hwnd, IDC_TXT_METHOD, m_pParams->m_szMethod);
+ return true;
}
BOOL SendReply(BOOL bAuthorized)
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 1825a3714d..5ff0f13e07 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -43,9 +43,9 @@ protected: CCtrlButton m_btnOk;
CCtrlButton m_btnCancel;
- void OnInitDialog();
- int Resizer(UTILRESIZECONTROL *urc);
- virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam);
+ bool OnInitDialog() override;
+ int Resizer(UTILRESIZECONTROL *urc) override;
+ INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
void StopTimer();
@@ -61,7 +61,7 @@ CJabberDlgPepBase::CJabberDlgPepBase(CJabberProto *proto, int id) : {
}
-void CJabberDlgPepBase::OnInitDialog()
+bool CJabberDlgPepBase::OnInitDialog()
{
CSuper::OnInitDialog();
@@ -70,6 +70,7 @@ void CJabberDlgPepBase::OnInitDialog() wchar_t buf[128];
mir_snwprintf(buf, TranslateT("OK (%d)"), m_time);
m_btnOk.SetText(buf);
+ return true;
}
int CJabberDlgPepBase::Resizer(UTILRESIZECONTROL *urc)
@@ -132,8 +133,8 @@ protected: CCtrlCombo m_cbModes;
CCtrlEdit m_txtDescription;
- void OnInitDialog();
- int Resizer(UTILRESIZECONTROL *urc);
+ bool OnInitDialog() override;
+ int Resizer(UTILRESIZECONTROL *urc);
UI_MESSAGE_MAP(CJabberDlgPepSimple, CSuper);
UI_MESSAGE(WM_MEASUREITEM, OnWmMeasureItem);
@@ -220,7 +221,7 @@ wchar_t* CJabberDlgPepSimple::GetStatusText() return m_text;
}
-void CJabberDlgPepSimple::OnInitDialog()
+bool CJabberDlgPepSimple::OnInitDialog()
{
CSuper::OnInitDialog();
@@ -240,6 +241,7 @@ void CJabberDlgPepSimple::OnInitDialog() if (m_activeText)
m_txtDescription.SetText(m_activeText);
+ return true;
}
int CJabberDlgPepSimple::Resizer(UTILRESIZECONTROL *urc)
diff --git a/protocols/SkypeWeb/src/skype_dialogs.cpp b/protocols/SkypeWeb/src/skype_dialogs.cpp index 231b1025d6..2e1a6aefdc 100644 --- a/protocols/SkypeWeb/src/skype_dialogs.cpp +++ b/protocols/SkypeWeb/src/skype_dialogs.cpp @@ -37,11 +37,12 @@ CSkypeInviteDlg::CSkypeInviteDlg(CSkypeProto *proto) : m_ok.OnClick = Callback(this, &CSkypeInviteDlg::btnOk_OnOk);
}
-void CSkypeInviteDlg::OnInitDialog()
+bool CSkypeInviteDlg::OnInitDialog()
{
for (auto &hContact : m_proto->AccContacts())
if (!m_proto->isChatRoom(hContact))
m_combo.AddString(Clist_GetContactDisplayName(hContact), hContact);
+ return true;
}
void CSkypeInviteDlg::btnOk_OnOk(CCtrlButton*)
@@ -64,13 +65,14 @@ CSkypeGCCreateDlg::~CSkypeGCCreateDlg() m_ContactsList.destroy();
}
-void CSkypeGCCreateDlg::OnInitDialog()
+bool CSkypeGCCreateDlg::OnInitDialog()
{
SetWindowLongPtr(m_clc.GetHwnd(), GWL_STYLE,
GetWindowLongPtr(m_clc.GetHwnd(), GWL_STYLE) | CLS_CHECKBOXES | CLS_HIDEEMPTYGROUPS | CLS_USEGROUPS | CLS_GREYALTERNATE);
m_clc.SendMsg(CLM_SETEXSTYLE, CLS_EX_DISABLEDRAGDROP | CLS_EX_TRACKSELECT, 0);
ResetListOptions(&m_clc);
+ return true;
}
void CSkypeGCCreateDlg::btnOk_OnOk(CCtrlButton*)
diff --git a/protocols/SkypeWeb/src/skype_dialogs.h b/protocols/SkypeWeb/src/skype_dialogs.h index 7b2fc0c2e2..e13f48dccf 100644 --- a/protocols/SkypeWeb/src/skype_dialogs.h +++ b/protocols/SkypeWeb/src/skype_dialogs.h @@ -29,8 +29,8 @@ private: CCtrlCombo m_combo;
protected:
-
- void OnInitDialog();
+ bool OnInitDialog() override;
+
void btnOk_OnOk(CCtrlButton*);
public:
@@ -48,15 +48,13 @@ private: CCtrlClc m_clc;
protected:
+ bool OnInitDialog() override;
- void OnInitDialog();
void btnOk_OnOk(CCtrlButton*);
void FilterList(CCtrlClc*);
void ResetListOptions(CCtrlClc*);
-
public:
-
LIST<char> m_ContactsList;
CSkypeGCCreateDlg(CSkypeProto *proto);
diff --git a/protocols/SkypeWeb/src/skype_options.cpp b/protocols/SkypeWeb/src/skype_options.cpp index cf92dfd198..7e689c427f 100644 --- a/protocols/SkypeWeb/src/skype_options.cpp +++ b/protocols/SkypeWeb/src/skype_options.cpp @@ -38,7 +38,7 @@ CSkypeOptionsMain::CSkypeOptionsMain(CSkypeProto *proto, int idDialog) m_usehostname.OnChange = Callback(this, &CSkypeOptionsMain::OnUsehostnameCheck);
}
-void CSkypeOptionsMain::OnInitDialog()
+bool CSkypeOptionsMain::OnInitDialog()
{
CSkypeDlgBase::OnInitDialog();
@@ -48,10 +48,10 @@ void CSkypeOptionsMain::OnInitDialog() m_skypename.SendMsg(EM_LIMITTEXT, 32, 0);
m_password.SendMsg(EM_LIMITTEXT, 128, 0);
m_group.SendMsg(EM_LIMITTEXT, 64, 0);
+ return true;
}
-
-void CSkypeOptionsMain::OnApply()
+bool CSkypeOptionsMain::OnApply()
{
ptrA szNewSkypename(m_skypename.GetTextA()),
szOldSkypename(m_proto->getStringA(SKYPE_SETTINGS_ID));
@@ -64,6 +64,7 @@ void CSkypeOptionsMain::OnApply() ptrW group(m_group.GetText());
if (mir_wstrlen(group) > 0 && !Clist_GroupExists(group))
Clist_GroupCreate(0, group);
+ return true;
}
/////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/SkypeWeb/src/skype_options.h b/protocols/SkypeWeb/src/skype_options.h index 6856e01e3b..59df858290 100644 --- a/protocols/SkypeWeb/src/skype_options.h +++ b/protocols/SkypeWeb/src/skype_options.h @@ -34,8 +34,8 @@ private: protected:
CSkypeOptionsMain(CSkypeProto *proto, int idDialog);
- void OnInitDialog();
- void OnApply();
+ bool OnInitDialog() override;
+ bool OnApply() override;
void OnUsehostnameCheck(CCtrlCheck*);
public:
diff --git a/protocols/Steam/src/steam_dialogs.cpp b/protocols/Steam/src/steam_dialogs.cpp index 569ee3de8f..7e5cd0f93d 100644 --- a/protocols/Steam/src/steam_dialogs.cpp +++ b/protocols/Steam/src/steam_dialogs.cpp @@ -7,7 +7,7 @@ CSteamPasswordEditor::CSteamPasswordEditor(CSteamProto *proto) m_ok.OnClick = Callback(this, &CSteamPasswordEditor::OnOk);
}
-void CSteamPasswordEditor::OnInitDialog()
+bool CSteamPasswordEditor::OnInitDialog()
{
char iconName[100];
mir_snprintf(iconName, "%s_%s", MODULE, "main");
@@ -16,6 +16,7 @@ void CSteamPasswordEditor::OnInitDialog() SendMessage(m_password.GetHwnd(), EM_LIMITTEXT, 64, 0);
Utils_RestoreWindowPosition(m_hwnd, NULL, m_proto->m_szModuleName, "PasswordWindow");
+ return true;
}
void CSteamPasswordEditor::OnOk(CCtrlButton*)
@@ -27,9 +28,10 @@ void CSteamPasswordEditor::OnOk(CCtrlButton*) EndDialog(m_hwnd, DIALOG_RESULT_OK);
}
-void CSteamPasswordEditor::OnClose()
+bool CSteamPasswordEditor::OnClose()
{
Utils_SaveWindowPosition(m_hwnd, NULL, m_proto->m_szModuleName, "PasswordWindow");
+ return true;
}
/////////////////////////////////////////////////////////////////////////////////
@@ -45,7 +47,7 @@ CSteamGuardDialog::CSteamGuardDialog(CSteamProto *proto, const char *domain) m_ok.OnClick = Callback(this, &CSteamGuardDialog::OnOk);
}
-void CSteamGuardDialog::OnInitDialog()
+bool CSteamGuardDialog::OnInitDialog()
{
char iconName[100];
mir_snprintf(iconName, "%s_%s", MODULE, "main");
@@ -54,6 +56,7 @@ void CSteamGuardDialog::OnInitDialog() SendMessage(m_text.GetHwnd(), EM_LIMITTEXT, 5, 0);
Utils_RestoreWindowPosition(m_hwnd, NULL, m_proto->m_szModuleName, "GuardWindow");
+ return true;
}
void CSteamGuardDialog::OnOk(CCtrlButton*)
@@ -62,9 +65,10 @@ void CSteamGuardDialog::OnOk(CCtrlButton*) EndDialog(m_hwnd, DIALOG_RESULT_OK);
}
-void CSteamGuardDialog::OnClose()
+bool CSteamGuardDialog::OnClose()
{
Utils_SaveWindowPosition(m_hwnd, NULL, m_proto->m_szModuleName, "GuardWindow");
+ return true;
}
const char* CSteamGuardDialog::GetGuardCode()
@@ -83,7 +87,7 @@ m_text(this, IDC_TEXT) m_ok.OnClick = Callback(this, &CSteamTwoFactorDialog::OnOk);
}
-void CSteamTwoFactorDialog::OnInitDialog()
+bool CSteamTwoFactorDialog::OnInitDialog()
{
char iconName[100];
mir_snprintf(iconName, "%s_%s", MODULE, "main");
@@ -92,6 +96,7 @@ void CSteamTwoFactorDialog::OnInitDialog() SendMessage(m_text.GetHwnd(), EM_LIMITTEXT, 5, 0);
Utils_RestoreWindowPosition(m_hwnd, NULL, m_proto->m_szModuleName, "TwoFactorWindow");
+ return true;
}
void CSteamTwoFactorDialog::OnOk(CCtrlButton*)
@@ -100,9 +105,10 @@ void CSteamTwoFactorDialog::OnOk(CCtrlButton*) EndDialog(m_hwnd, DIALOG_RESULT_OK);
}
-void CSteamTwoFactorDialog::OnClose()
+bool CSteamTwoFactorDialog::OnClose()
{
Utils_SaveWindowPosition(m_hwnd, NULL, m_proto->m_szModuleName, "TwoFactorWindow");
+ return true;
}
const char* CSteamTwoFactorDialog::GetTwoFactorCode()
@@ -130,7 +136,7 @@ CSteamCaptchaDialog::~CSteamCaptchaDialog() mir_free(m_captchaImage);
}
-void CSteamCaptchaDialog::OnInitDialog()
+bool CSteamCaptchaDialog::OnInitDialog()
{
char iconName[100];
mir_snprintf(iconName, "%s_%s", MODULE, "main");
@@ -139,6 +145,7 @@ void CSteamCaptchaDialog::OnInitDialog() SendMessage(m_text.GetHwnd(), EM_LIMITTEXT, 6, 0);
Utils_RestoreWindowPosition(m_hwnd, NULL, m_proto->m_szModuleName, "CaptchaWindow");
+ return true;
}
void CSteamCaptchaDialog::OnOk(CCtrlButton*)
@@ -147,9 +154,10 @@ void CSteamCaptchaDialog::OnOk(CCtrlButton*) EndDialog(m_hwnd, DIALOG_RESULT_OK);
}
-void CSteamCaptchaDialog::OnClose()
+bool CSteamCaptchaDialog::OnClose()
{
Utils_SaveWindowPosition(m_hwnd, NULL, m_proto->m_szModuleName, "CaptchaWindow");
+ return true;
}
INT_PTR CSteamCaptchaDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
diff --git a/protocols/Steam/src/steam_dialogs.h b/protocols/Steam/src/steam_dialogs.h index 20d6a60f48..8086114c42 100644 --- a/protocols/Steam/src/steam_dialogs.h +++ b/protocols/Steam/src/steam_dialogs.h @@ -16,9 +16,10 @@ private: CCtrlButton m_ok;
protected:
- void OnInitDialog();
+ bool OnInitDialog() override;
+ bool OnClose() override;
+
void OnOk(CCtrlButton*);
- void OnClose();
public:
CSteamPasswordEditor(CSteamProto *proto);
@@ -37,9 +38,10 @@ private: CCtrlHyperlink m_link;
protected:
- void OnInitDialog();
+ bool OnInitDialog() override;
+ bool OnClose() override;
+
void OnOk(CCtrlButton*);
- void OnClose();
public:
CSteamGuardDialog(CSteamProto *proto, const char *domain);
@@ -58,9 +60,10 @@ private: CCtrlButton m_ok;
protected:
- void OnInitDialog();
+ bool OnInitDialog() override;
+ bool OnClose() override;
+
void OnOk(CCtrlButton*);
- void OnClose();
public:
CSteamTwoFactorDialog(CSteamProto *proto);
@@ -82,11 +85,11 @@ private: CCtrlButton m_ok;
protected:
- void OnInitDialog();
- void OnOk(CCtrlButton*);
- void OnClose();
+ bool OnInitDialog() override;
+ bool OnClose() override;
+ INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
- INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam);
+ void OnOk(CCtrlButton*);
public:
CSteamCaptchaDialog(CSteamProto *proto, const uint8_t *captchaImage, int captchaImageSize);
diff --git a/protocols/Steam/src/steam_options.cpp b/protocols/Steam/src/steam_options.cpp index 92fd87152e..74c51a82c5 100644 --- a/protocols/Steam/src/steam_options.cpp +++ b/protocols/Steam/src/steam_options.cpp @@ -19,7 +19,7 @@ CSteamOptionsMain::CSteamOptionsMain(CSteamProto *proto, int idDialog, HWND hwnd }
}
-void CSteamOptionsMain::OnInitDialog()
+bool CSteamOptionsMain::OnInitDialog()
{
CSteamDlgBase::OnInitDialog();
@@ -28,9 +28,10 @@ void CSteamOptionsMain::OnInitDialog() SendMessage(m_group.GetHwnd(), EM_LIMITTEXT, 64, 0);
m_pollingErrorLimit.SetRange(255, 0);
+ return true;
}
-void CSteamOptionsMain::OnApply()
+bool CSteamOptionsMain::OnApply()
{
ptrW group(m_group.GetText());
if (mir_wstrcmp(group, m_proto->m_defaultGroup)) {
@@ -46,6 +47,7 @@ void CSteamOptionsMain::OnApply() }
if (m_password.IsChanged())
m_proto->delSetting("TokenSecret");
+ return true;
}
/////////////////////////////////////////////////////////////////////////////////
@@ -59,12 +61,13 @@ CSteamOptionsBlockList::CSteamOptionsBlockList(CSteamProto *proto) m_add.OnClick = Callback(this, &CSteamOptionsBlockList::OnBlock);
}
-void CSteamOptionsBlockList::OnInitDialog()
+bool CSteamOptionsBlockList::OnInitDialog()
{
m_list.SetExtendedListViewStyle(LVS_EX_SUBITEMIMAGES | LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP);
m_list.AddColumn(0, TranslateT("Name"), 220);
m_list.AddColumn(1, L"", 32 - GetSystemMetrics(SM_CXVSCROLL));
+ return true;
}
void CSteamOptionsBlockList::OnBlock(CCtrlButton*)
diff --git a/protocols/Steam/src/steam_options.h b/protocols/Steam/src/steam_options.h index d0aaf03bd9..a71e6ae2fa 100644 --- a/protocols/Steam/src/steam_options.h +++ b/protocols/Steam/src/steam_options.h @@ -16,8 +16,8 @@ private: protected:
CSteamOptionsMain(CSteamProto *proto, int idDialog, HWND hwndParent = NULL);
- void OnInitDialog();
- void OnApply();
+ bool OnInitDialog() override;
+ bool OnApply() override;
public:
static CDlgBase *CreateAccountManagerPage(void *param, HWND owner)
@@ -42,7 +42,7 @@ private: CCtrlButton m_add;
protected:
- void OnInitDialog();
+ bool OnInitDialog() override;
void OnBlock(CCtrlButton*);
public:
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index 3cc61ec397..ef923e6fef 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -37,7 +37,7 @@ CToxOptionsMain::CToxOptionsMain(CToxProto *proto, int idDialog) m_profileExport.OnClick = Callback(this, &CToxOptionsMain::ProfileExport_OnClick);
}
-void CToxOptionsMain::OnInitDialog()
+bool CToxOptionsMain::OnInitDialog()
{
CToxDlgBase::OnInitDialog();
@@ -68,6 +68,7 @@ void CToxOptionsMain::OnInitDialog() m_maxConnectRetries.SetRange(255, 1);
m_maxReconnectRetries.SetRange(255, 1);
+ return true;
}
void CToxOptionsMain::PasswordCreate_OnClick(CCtrlButton*)
@@ -226,7 +227,7 @@ void CToxOptionsMain::ProfileExport_OnClick(CCtrlButton*) CopyFile(defaultProfilePath, profilePath, FALSE);
}
-void CToxOptionsMain::OnApply()
+bool CToxOptionsMain::OnApply()
{
ptrW group(m_group.GetText());
if (mir_wstrcmp(group, m_proto->m_defaultGroup)) {
@@ -242,6 +243,7 @@ void CToxOptionsMain::OnApply() m_proto->SaveToxProfile(m_proto->m_toxThread->Tox());
}
+ return true;
}
/////////////////////////////////////////////////////////////////////////////////
@@ -257,7 +259,7 @@ CToxNodeEditor::CToxNodeEditor(int iItem, CCtrlListView *m_nodes) m_ok.OnClick = Callback(this, &CToxNodeEditor::OnOk);
}
-void CToxNodeEditor::OnInitDialog()
+bool CToxNodeEditor::OnInitDialog()
{
SetWindowText(m_hwnd, m_iItem == -1 ? TranslateT("Add node") : TranslateT("Change node"));
@@ -286,6 +288,7 @@ void CToxNodeEditor::OnInitDialog() }
Utils_RestoreWindowPositionNoSize(m_hwnd, NULL, MODULE, "EditNodeDlg");
+ return true;
}
void CToxNodeEditor::OnOk(CCtrlBase*)
@@ -325,12 +328,12 @@ void CToxNodeEditor::OnOk(CCtrlBase*) EndDialog(m_hwnd, 1);
}
-void CToxNodeEditor::OnClose()
+bool CToxNodeEditor::OnClose()
{
Utils_SaveWindowPosition(m_hwnd, NULL, MODULE, "EditNodeDlg");
+ return true;
}
-
/****************************************/
CToxOptionsNodeList::CToxOptionsNodeList(CToxProto *proto)
@@ -345,7 +348,7 @@ CToxOptionsNodeList::CToxOptionsNodeList(CToxProto *proto) m_nodes.OnKeyDown = Callback(this, &CToxOptionsNodeList::OnNodeListKeyDown);
}
-void CToxOptionsNodeList::OnInitDialog()
+bool CToxOptionsNodeList::OnInitDialog()
{
m_nodes.SetExtendedListViewStyle(LVS_EX_SUBITEMIMAGES | LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP);
@@ -367,6 +370,7 @@ void CToxOptionsNodeList::OnInitDialog() m_nodes.AddGroup(1, TranslateT("User nodes"));
ReloadNodeList();
+ return true;
}
void CToxOptionsNodeList::OnAddNode(CCtrlBase*)
@@ -484,7 +488,7 @@ void CToxOptionsNodeList::ReloadNodeList() }
}
-void CToxOptionsNodeList::OnApply()
+bool CToxOptionsNodeList::OnApply()
{
char setting[MAX_PATH];
wchar_t tszText[MAX_PATH];
@@ -543,6 +547,7 @@ void CToxOptionsNodeList::OnApply() db_unset(NULL, module, setting);
}
db_set_b(NULL, module, TOX_SETTINGS_NODE_COUNT, itemCount);
+ return true;
}
/////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/Tox/src/tox_options.h b/protocols/Tox/src/tox_options.h index 74987139da..374bfbb5af 100644 --- a/protocols/Tox/src/tox_options.h +++ b/protocols/Tox/src/tox_options.h @@ -28,7 +28,7 @@ private: CCtrlSpin m_maxReconnectRetries;
protected:
- void OnInitDialog();
+ bool OnInitDialog() override;
void PasswordCreate_OnClick(CCtrlButton*);
void PasswordChange_OnClick(CCtrlButton*);
@@ -41,7 +41,7 @@ protected: void ProfileImport_OnClick(CCtrlButton*);
void ProfileExport_OnClick(CCtrlButton*);
- void OnApply();
+ bool OnApply() override;
public:
CToxOptionsMain(CToxProto *proto, int idDialog);
@@ -75,9 +75,10 @@ private: CCtrlButton m_ok;
protected:
- void OnInitDialog();
+ bool OnInitDialog() override;
+ bool OnClose() override;
+
void OnOk(CCtrlBase*);
- void OnClose();
public:
CToxNodeEditor(int iItem, CCtrlListView *m_list);
@@ -96,8 +97,8 @@ private: CCtrlButton m_updateNodes;
protected:
- void OnInitDialog();
- void OnApply();
+ bool OnInitDialog() override;
+ bool OnApply() override;
void ReloadNodeList();
diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp index 76744445e5..d90c1a08f9 100644 --- a/protocols/Tox/src/tox_profile.cpp +++ b/protocols/Tox/src/tox_profile.cpp @@ -200,9 +200,10 @@ CToxEnterPasswordDlg::CToxEnterPasswordDlg(CToxProto *proto) m_ok.OnClick = Callback(this, &CToxEnterPasswordDlg::OnOk);
}
-void CToxEnterPasswordDlg::OnInitDialog()
+bool CToxEnterPasswordDlg::OnInitDialog()
{
m_ok.Disable();
+ return true;
}
void CToxEnterPasswordDlg::Password_OnChange(CCtrlBase*)
@@ -230,7 +231,7 @@ CToxCreatePasswordDlg::CToxCreatePasswordDlg(CToxProto *proto) m_ok.OnClick = Callback(this, &CToxCreatePasswordDlg::OnOk);
}
-void CToxCreatePasswordDlg::OnInitDialog()
+bool CToxCreatePasswordDlg::OnInitDialog()
{
LOGFONT lf;
HFONT hFont = (HFONT)m_passwordValidation.SendMsg(WM_GETFONT, 0, 0);
@@ -239,6 +240,7 @@ void CToxCreatePasswordDlg::OnInitDialog() m_passwordValidation.SendMsg(WM_SETFONT, (WPARAM)CreateFontIndirect(&lf), 0);
m_ok.Disable();
+ return true;
}
void CToxCreatePasswordDlg::Password_OnChange(CCtrlBase*)
@@ -284,7 +286,7 @@ CToxChangePasswordDlg::CToxChangePasswordDlg(CToxProto *proto) m_ok.OnClick = Callback(this, &CToxChangePasswordDlg::OnOk);
}
-void CToxChangePasswordDlg::OnInitDialog()
+bool CToxChangePasswordDlg::OnInitDialog()
{
LOGFONT lf;
HFONT hFont = (HFONT)m_passwordValidation.SendMsg(WM_GETFONT, 0, 0);
@@ -293,6 +295,7 @@ void CToxChangePasswordDlg::OnInitDialog() m_passwordValidation.SendMsg(WM_SETFONT, (WPARAM)CreateFontIndirect(&lf), 0);
m_ok.Disable();
+ return true;
}
void CToxChangePasswordDlg::Password_OnChange(CCtrlBase*)
diff --git a/protocols/Tox/src/tox_profile.h b/protocols/Tox/src/tox_profile.h index 4aedae071f..fd23665c90 100644 --- a/protocols/Tox/src/tox_profile.h +++ b/protocols/Tox/src/tox_profile.h @@ -11,7 +11,8 @@ private: CCtrlButton m_ok;
protected:
- void OnInitDialog();
+ bool OnInitDialog() override;
+
void Password_OnChange(CCtrlBase*);
void OnOk(CCtrlButton*);
@@ -32,7 +33,8 @@ private: CCtrlButton m_ok;
protected:
- void OnInitDialog();
+ bool OnInitDialog() override;
+
void Password_OnChange(CCtrlBase*);
void OnOk(CCtrlButton*);
@@ -55,7 +57,8 @@ private: CCtrlButton m_ok;
protected:
- void OnInitDialog();
+ bool OnInitDialog() override;
+
void Password_OnChange(CCtrlBase*);
void OnOk(CCtrlButton*);
diff --git a/protocols/VKontakte/src/vk_dialogs.cpp b/protocols/VKontakte/src/vk_dialogs.cpp index fafc0bcd69..fd394cd67c 100644 --- a/protocols/VKontakte/src/vk_dialogs.cpp +++ b/protocols/VKontakte/src/vk_dialogs.cpp @@ -32,13 +32,14 @@ CVkCaptchaForm::CVkCaptchaForm(CVkProto *proto, CAPTCHA_FORM_PARAMS *param) : m_edtValue.OnChange = Callback(this, &CVkCaptchaForm::On_edtValue_Change);
}
-void CVkCaptchaForm::OnInitDialog()
+bool CVkCaptchaForm::OnInitDialog()
{
Window_SetIcon_IcoLib(m_hwnd, GetIconHandle(IDI_KEYS));
m_btnOk.Disable();
m_btnOpenInBrowser.Enable((m_param->bmp != nullptr));
m_instruction.SetText(TranslateT("Enter the text you see"));
+ return true;
}
INT_PTR CVkCaptchaForm::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
@@ -115,7 +116,7 @@ CVkWallPostForm::CVkWallPostForm(CVkProto *proto, WALLPOST_FORM_PARAMS *param) : m_edtUrl.OnChange = Callback(this, &CVkWallPostForm::On_edtValue_Change);
}
-void CVkWallPostForm::OnInitDialog()
+bool CVkWallPostForm::OnInitDialog()
{
Window_SetIcon_IcoLib(m_hwnd, GetIconHandle(IDI_WALL));
@@ -123,6 +124,7 @@ void CVkWallPostForm::OnInitDialog() SetCaption(wszTitle);
m_btnShare.Disable();
+ return true;
}
void CVkWallPostForm::OnDestroy()
@@ -155,11 +157,12 @@ CVkInviteChatForm::CVkInviteChatForm(CVkProto *proto) : m_btnOk.OnClick = Callback(this, &CVkInviteChatForm::btnOk_OnOk);
}
-void CVkInviteChatForm::OnInitDialog()
+bool CVkInviteChatForm::OnInitDialog()
{
for (auto &hContact : m_proto->AccContacts())
if (!m_proto->isChatRoom(hContact))
m_cbxCombo.AddString(Clist_GetContactDisplayName(hContact), hContact);
+ return true;
}
void CVkInviteChatForm::btnOk_OnOk(CCtrlButton*)
@@ -180,13 +183,14 @@ CVkGCCreateForm::CVkGCCreateForm(CVkProto *proto) : m_clCList.OnListRebuilt = Callback(this, &CVkGCCreateForm::FilterList);
}
-void CVkGCCreateForm::OnInitDialog()
+bool CVkGCCreateForm::OnInitDialog()
{
SetWindowLongPtr(m_clCList.GetHwnd(), GWL_STYLE, GetWindowLongPtr(m_clCList.GetHwnd(), GWL_STYLE)
| CLS_CHECKBOXES | CLS_HIDEEMPTYGROUPS | CLS_USEGROUPS | CLS_GREYALTERNATE);
m_clCList.SendMsg(CLM_SETEXSTYLE, CLS_EX_DISABLEDRAGDROP | CLS_EX_TRACKSELECT, 0);
ResetListOptions(&m_clCList);
+ return true;
}
void CVkGCCreateForm::btnOk_OnOk(CCtrlButton*)
@@ -253,7 +257,7 @@ CVkContactDeleteForm::CVkContactDeleteForm(CVkProto *proto, CONTACTDELETE_FORM_P m_btnOk.OnClick = Callback(this, &CVkContactDeleteForm::btnOk_OnOk);
}
-void CVkContactDeleteForm::OnInitDialog()
+bool CVkContactDeleteForm::OnInitDialog()
{
CMStringW szText(FORMAT, TranslateT("You delete %s from the contact list.\nWhat needs to be done additionally?"),
m_param->pwszNick);
@@ -271,6 +275,7 @@ void CVkContactDeleteForm::OnInitDialog() szText.Format(TranslateT("Deleting %s from contact list"), m_param->pwszNick);
SetCaption(szText.c_str());
+ return true;
}
void CVkContactDeleteForm::btnOk_OnOk(CCtrlButton*)
diff --git a/protocols/VKontakte/src/vk_dialogs.h b/protocols/VKontakte/src/vk_dialogs.h index 51bbdfa433..ba77fc52db 100644 --- a/protocols/VKontakte/src/vk_dialogs.h +++ b/protocols/VKontakte/src/vk_dialogs.h @@ -39,9 +39,12 @@ class CVkCaptchaForm : public CVkDlgBase public:
CVkCaptchaForm(CVkProto *proto, CAPTCHA_FORM_PARAMS *param);
- void OnInitDialog();
- INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam);
- void OnDestroy();
+
+ bool OnInitDialog() override;
+ void OnDestroy() override;
+
+ INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
+
void On_btnOpenInBrowser_Click(CCtrlButton*);
void On_btnOk_Click(CCtrlButton*);
void On_edtValue_Change(CCtrlEdit*);
@@ -83,8 +86,10 @@ class CVkWallPostForm : public CVkDlgBase public:
CVkWallPostForm(CVkProto *proto, WALLPOST_FORM_PARAMS *param);
- void OnInitDialog();
+
+ bool OnInitDialog() override;
void OnDestroy();
+
void On_btnShare_Click(CCtrlButton*);
void On_edtValue_Change(CCtrlEdit*);
};
@@ -100,7 +105,9 @@ public: MCONTACT m_hContact;
CVkInviteChatForm(CVkProto *proto);
- void OnInitDialog();
+
+ bool OnInitDialog() override;
+
void btnOk_OnOk(CCtrlButton*);
};
@@ -114,7 +121,8 @@ class CVkGCCreateForm : public CVkDlgBase public:
CVkGCCreateForm(CVkProto *proto);
- void OnInitDialog();
+ bool OnInitDialog() override;
+
void btnOk_OnOk(CCtrlButton*);
void FilterList(CCtrlClc*);
void ResetListOptions(CCtrlClc*);
@@ -150,6 +158,7 @@ class CVkContactDeleteForm : public CVkDlgBase public:
CVkContactDeleteForm(CVkProto *proto, CONTACTDELETE_FORM_PARAMS *param);
- void OnInitDialog();
+ bool OnInitDialog() override;
+
void btnOk_OnOk(CCtrlButton*);
};
\ No newline at end of file diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp index beb9171e58..36e4d7f73a 100644 --- a/protocols/VKontakte/src/vk_options.cpp +++ b/protocols/VKontakte/src/vk_options.cpp @@ -39,7 +39,7 @@ CVkAccMgrForm::CVkAccMgrForm(CVkProto *proto, HWND hwndParent) : CreateLink(m_edtLogin, "Login", L"");
}
-void CVkAccMgrForm::OnInitDialog()
+bool CVkAccMgrForm::OnInitDialog()
{
CSuper::OnInitDialog();
@@ -49,9 +49,10 @@ void CVkAccMgrForm::OnInitDialog() m_pwszOldPass = m_proto->GetUserStoredPassword();
m_edtPassword.SetText(m_pwszOldPass);
m_edtPassword.SendMsg(EM_LIMITTEXT, 1024, 0);
+ return true;
}
-void CVkAccMgrForm::OnApply()
+bool CVkAccMgrForm::OnApply()
{
pass_ptrW pwszNewPass(m_edtPassword.GetText());
bool bPassChanged = mir_wstrcmp(m_pwszOldPass, pwszNewPass) != 0;
@@ -66,6 +67,7 @@ void CVkAccMgrForm::OnApply() if (bPassChanged || mir_wstrcmpi(m_pwszOldLogin, pwszNewLogin))
m_proto->ClearAccessToken();
m_pwszOldLogin = pwszNewLogin;
+ return true;
}
////////////////////// Options ///////////////////////////////////////////////
@@ -157,7 +159,7 @@ CVkOptionAccountForm::CVkOptionAccountForm(CVkProto *proto) : CreateLink(m_cbLoadOnlyFriends, m_proto->m_vkOptions.bLoadOnlyFriends);
}
-void CVkOptionAccountForm::OnInitDialog()
+bool CVkOptionAccountForm::OnInitDialog()
{
m_pwszOldLogin = m_edtLogin.GetText();
m_edtLogin.SendMsg(EM_LIMITTEXT, 1024, 0);
@@ -191,10 +193,10 @@ void CVkOptionAccountForm::OnInitDialog() iListIndex = i;
}
m_cbxVKLang.SetCurSel(iListIndex);
-
+ return true;
}
-void CVkOptionAccountForm::OnApply()
+bool CVkOptionAccountForm::OnApply()
{
m_proto->m_vkOptions.iSyncHistoryMetod = m_cbxSyncHistory.GetItemData(m_cbxSyncHistory.GetCurSel());
m_proto->m_vkOptions.iMarkMessageReadOn = m_cbxMarkAsRead.GetItemData(m_cbxMarkAsRead.GetCurSel());
@@ -219,7 +221,7 @@ void CVkOptionAccountForm::OnApply() if (bPassChanged || mir_wstrcmpi(m_pwszOldLogin, pwszNewLogin))
m_proto->ClearAccessToken();
m_pwszOldLogin = pwszNewLogin;
-
+ return true;
}
////////////////////// Advanced page /////////////////////////////////////////
@@ -263,7 +265,7 @@ CVkOptionAdvancedForm::CVkOptionAdvancedForm(CVkProto *proto) : m_cbSendVKLinksAsAttachments.OnChange = Callback(this, &CVkOptionAdvancedForm::On_cbSendVKLinksAsAttachmentsChange);
}
-void CVkOptionAdvancedForm::OnInitDialog()
+bool CVkOptionAdvancedForm::OnInitDialog()
{
m_cbMusicSendOff.SetState(m_proto->m_vkOptions.iMusicSendMetod == MusicSendMetod::sendNone);
m_cbMusicSendBroadcastAndStatus.SetState(m_proto->m_vkOptions.iMusicSendMetod == MusicSendMetod::sendBroadcastAndStatus);
@@ -275,9 +277,10 @@ void CVkOptionAdvancedForm::OnInitDialog() On_cbForceInvisibleStatusChange(&m_cbForceInvisibleStatus);
On_cbSendVKLinksAsAttachmentsChange(&m_cbSendVKLinksAsAttachments);
+ return true;
}
-void CVkOptionAdvancedForm::OnApply()
+bool CVkOptionAdvancedForm::OnApply()
{
if (m_cbMusicSendOff.GetState())
m_proto->m_vkOptions.iMusicSendMetod = MusicSendMetod::sendNone;
@@ -290,6 +293,7 @@ void CVkOptionAdvancedForm::OnApply() if (m_cbSendVKLinksAsAttachments.GetState() == 0)
m_proto->m_vkOptions.bLoadSentAttachments = false;
+ return true;
}
void CVkOptionAdvancedForm::On_cbForceInvisibleStatusChange(CCtrlCheck *)
@@ -364,7 +368,7 @@ CVkOptionFeedsForm::CVkOptionFeedsForm(CVkProto *proto) : }
-void CVkOptionFeedsForm::OnInitDialog()
+bool CVkOptionFeedsForm::OnInitDialog()
{
m_spNewsInterval.SetRange(60 * 24, 1);
m_spNewsInterval.SetPosition(m_proto->m_vkOptions.iNewsInterval);
@@ -374,6 +378,7 @@ void CVkOptionFeedsForm::OnInitDialog() On_cbNewsEnabledChange(&m_cbNewsEnabled);
On_cbNotificationsEnabledChange(&m_cbNotificationsEnabled);
+ return true;
}
void CVkOptionFeedsForm::On_cbNewsEnabledChange(CCtrlCheck*)
@@ -436,7 +441,7 @@ CVkOptionViewForm::CVkOptionViewForm(CVkProto *proto) : CreateLink(m_cbUseNonStandardNotifications, m_proto->m_vkOptions.bUseNonStandardNotifications);
}
-void CVkOptionViewForm::OnInitDialog()
+bool CVkOptionViewForm::OnInitDialog()
{
m_cbIMGBBCSupportOff.SetState(m_proto->m_vkOptions.iIMGBBCSupport == IMGBBCSypport::imgNo);
m_cbIMGBBCSupportFullSize.SetState(m_proto->m_vkOptions.iIMGBBCSupport == IMGBBCSypport::imgFullSize);
@@ -450,9 +455,10 @@ void CVkOptionViewForm::OnInitDialog() m_cbBBCForAttachmentsOff.SetState(m_proto->m_vkOptions.iBBCForAttachments == BBCSupport::bbcNo);
m_cbBBCForAttachmentsBasic.SetState(m_proto->m_vkOptions.iBBCForAttachments == BBCSupport::bbcBasic);
m_cbBBCForAttachmentsAdvanced.SetState(m_proto->m_vkOptions.iBBCForAttachments == BBCSupport::bbcAdvanced);
+ return true;
}
-void CVkOptionViewForm::OnApply()
+bool CVkOptionViewForm::OnApply()
{
if (m_cbIMGBBCSupportOff.GetState())
m_proto->m_vkOptions.iIMGBBCSupport = IMGBBCSypport::imgNo;
@@ -476,6 +482,7 @@ void CVkOptionViewForm::OnApply() m_proto->m_vkOptions.iBBCForAttachments = BBCSupport::bbcBasic;
if (m_cbBBCForAttachmentsAdvanced.GetState())
m_proto->m_vkOptions.iBBCForAttachments = BBCSupport::bbcAdvanced;
+ return true;
}
////////////////////// Menu page /////////////////////////////////////////////
@@ -499,10 +506,11 @@ CVkOptionMenuForm::CVkOptionMenuForm(CVkProto *proto) : CreateLink(m_cbMenuEnabled6, m_proto->m_vkOptions.bShowProtoMenuItem6);
}
-void CVkOptionMenuForm::OnApply()
+bool CVkOptionMenuForm::OnApply()
{
if (MessageBoxW(nullptr,
TranslateT("These changes will take effect after Miranda NG restart.\nWould you like to restart it now?"),
TranslateT("VKontakte protocol"), MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2) == IDYES)
CallServiceSync(MS_SYSTEM_RESTART, 1, 0);
+ return true;
}
\ No newline at end of file diff --git a/protocols/VKontakte/src/vk_options.h b/protocols/VKontakte/src/vk_options.h index 8e91336848..c40d658adc 100644 --- a/protocols/VKontakte/src/vk_options.h +++ b/protocols/VKontakte/src/vk_options.h @@ -35,8 +35,8 @@ class CVkAccMgrForm : public CVkDlgBase public:
CVkAccMgrForm(CVkProto *proto, HWND hwndParent);
- void OnInitDialog();
- void OnApply();
+ bool OnInitDialog() override;
+ bool OnApply() override;
};
////////////////////// Account page //////////////////////////////////////////
@@ -61,8 +61,8 @@ class CVkOptionAccountForm : public CVkDlgBase public:
CVkOptionAccountForm(CVkProto *proto);
- void OnInitDialog();
- void OnApply();
+ bool OnInitDialog() override;
+ bool OnApply() override;
};
////////////////////// Advanced page /////////////////////////////////////////
@@ -95,8 +95,8 @@ class CVkOptionAdvancedForm : public CVkDlgBase public:
CVkOptionAdvancedForm(CVkProto *proto);
- void OnInitDialog();
- void OnApply();
+ bool OnInitDialog() override;
+ bool OnApply() override;
void On_cbForceInvisibleStatusChange(CCtrlCheck*);
void On_cbSendVKLinksAsAttachmentsChange(CCtrlCheck*);
};
@@ -140,7 +140,8 @@ class CVkOptionFeedsForm : public CVkDlgBase public:
CVkOptionFeedsForm(CVkProto *proto);
- void OnInitDialog();
+
+ bool OnInitDialog() override;
void On_cbNewsEnabledChange(CCtrlCheck*);
void On_cbNotificationsEnabledChange(CCtrlCheck*);
@@ -172,8 +173,8 @@ class CVkOptionViewForm : public CVkDlgBase public:
CVkOptionViewForm(CVkProto *proto);
- void OnInitDialog();
- void OnApply();
+ bool OnInitDialog() override;
+ bool OnApply() override;
};
////////////////////// Menu page /////////////////////////////////////////////
@@ -190,5 +191,5 @@ class CVkOptionMenuForm : public CVkDlgBase public:
CVkOptionMenuForm(CVkProto *proto);
- void OnApply();
+ bool OnApply() override;
};
\ No newline at end of file |