summaryrefslogtreecommitdiff
path: root/protocols/IRCG/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-06-04 17:35:56 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-06-04 17:35:56 +0300
commit932be7eac7944a69a1fe1acadcbcca2743377b3f (patch)
treee51383bd55fe9d6bbd223f1d5955a74867124707 /protocols/IRCG/src
parentf531ff887729783a7fe7a3e12ad12f658eefc7b0 (diff)
all improper calls of OnClose replaced with OnDestroy / OnApply
Diffstat (limited to 'protocols/IRCG/src')
-rw-r--r--protocols/IRCG/src/irc_dlg.h5
-rw-r--r--protocols/IRCG/src/options.cpp6
-rw-r--r--protocols/IRCG/src/windows.cpp22
3 files changed, 11 insertions, 22 deletions
diff --git a/protocols/IRCG/src/irc_dlg.h b/protocols/IRCG/src/irc_dlg.h
index 6da582a634..b070217fd7 100644
--- a/protocols/IRCG/src/irc_dlg.h
+++ b/protocols/IRCG/src/irc_dlg.h
@@ -65,7 +65,6 @@ struct CWhoisDlg : public CCoolIrcDlg
void OnVersion(CCtrlButton*);
bool OnInitDialog() override;
- bool OnClose() override;
void OnDestroy() override;
};
@@ -170,7 +169,7 @@ struct CQuestionDlg : public CCoolIrcDlg
bool OnInitDialog() override;
bool OnApply() override;
- bool OnClose() override;
+ void OnDestroy() override;
void Activate();
@@ -300,5 +299,5 @@ struct CAddIgnoreDlg : public CProtoDlgBase < CIrcProto >
bool OnInitDialog() override;
bool OnApply() override;
- bool OnClose() override;
+ void OnDestroy() override;
};
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp
index 22bbde0610..853cbd8048 100644
--- a/protocols/IRCG/src/options.cpp
+++ b/protocols/IRCG/src/options.cpp
@@ -365,13 +365,12 @@ struct CServerDlg : public CProtoDlgBase<CIrcProto>
return true;
}
- bool OnClose() override
+ void OnDestroy() override
{
m_owner->m_serverCombo.Enable();
m_owner->m_add.Enable();
m_owner->m_edit.Enable();
m_owner->m_del.Enable();
- return true;
}
};
@@ -1220,10 +1219,9 @@ bool CAddIgnoreDlg::OnApply()
return true;
}
-bool CAddIgnoreDlg::OnClose()
+void CAddIgnoreDlg::OnDestroy()
{
m_owner->FixButtons();
- return true;
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/IRCG/src/windows.cpp b/protocols/IRCG/src/windows.cpp
index b952e936f3..44a5d90d79 100644
--- a/protocols/IRCG/src/windows.cpp
+++ b/protocols/IRCG/src/windows.cpp
@@ -90,13 +90,6 @@ bool CWhoisDlg::OnInitDialog()
return true;
}
-bool CWhoisDlg::OnClose()
-{
- ShowWindow(m_hwnd, SW_HIDE);
- SendMessage(m_hwnd, WM_SETREDRAW, FALSE, 0);
- return true;
-}
-
void CWhoisDlg::OnDestroy()
{
CCoolIrcDlg::OnDestroy();
@@ -722,13 +715,6 @@ bool CQuestionDlg::OnInitDialog()
return true;
}
-bool CQuestionDlg::OnClose()
-{
- if (m_owner)
- m_owner->CloseQuestion();
- return true;
-}
-
bool CQuestionDlg::OnApply()
{
int i = GetWindowTextLength(GetDlgItem(m_hwnd, IDC_EDIT));
@@ -776,6 +762,12 @@ bool CQuestionDlg::OnApply()
return true;
}
+void CQuestionDlg::OnDestroy()
+{
+ if (m_owner)
+ m_owner->CloseQuestion();
+}
+
void CQuestionDlg::Activate()
{
ShowWindow(m_hwnd, SW_SHOW);
@@ -934,7 +926,7 @@ bool CManagerDlg::OnClose()
m_proto->setWString(p, S.c_str());
mir_free(p);
}
- DestroyWindow(m_hwnd);
+
return true;
}