diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-20 11:25:18 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-20 11:25:18 +0300 |
commit | cdab271a8322deed2f4e590718ce8f5b5c70a4eb (patch) | |
tree | 2ec5a15eeb55a13e6c832eaff627b75fc5eb2bfb /src | |
parent | 55db85ad3a5c31baff92864c4b01740333692595 (diff) |
StdMsg: tab processing unification
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdmsg/src/chat_window.cpp | 9 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 9 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 9 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.h | 3 | ||||
-rw-r--r-- | src/core/stdmsg/src/stdafx.h | 1 |
5 files changed, 11 insertions, 20 deletions
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp index 5e7b8046df..50b38a63f2 100644 --- a/src/core/stdmsg/src/chat_window.cpp +++ b/src/core/stdmsg/src/chat_window.cpp @@ -197,15 +197,6 @@ void CChatRoomDlg::onSplitterY(CSplitter *pSplitter) ///////////////////////////////////////////////////////////////////////////////////////// -void CChatRoomDlg::CloseTab() -{ - if (g_Settings.bTabsEnable) { - SendMessage(GetParent(m_hwndParent), GC_REMOVETAB, 0, (LPARAM)this); - Close(); - } - else SendMessage(m_hwndParent, WM_CLOSE, 0, 0); -} - void CChatRoomDlg::LoadSettings() { m_clrInputBG = db_get_dw(0, CHAT_MODULE, "ColorMessageBG", GetSysColor(COLOR_WINDOW)); diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 2b22745d08..53c8179620 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -438,15 +438,6 @@ void CSrmmWindow::OnSplitterMoved(CSplitter *pSplitter) /////////////////////////////////////////////////////////////////////////////////////////
-void CSrmmWindow::CloseTab()
-{
- if (g_Settings.bTabsEnable) {
- SendMessage(GetParent(m_hwndParent), GC_REMOVETAB, 0, (LPARAM)this);
- Close();
- }
- else SendMessage(m_hwndParent, WM_CLOSE, 0, 0);
-}
-
void CSrmmWindow::NotifyTyping(int mode)
{
if (!m_hContact)
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index c3041c0e19..a995434bda 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -32,6 +32,15 @@ CMsgDialog::CMsgDialog(int iDialogId, SESSION_INFO *si) m_forceResizable = true;
}
+void CMsgDialog::CloseTab()
+{
+ if (g_Settings.bTabsEnable) {
+ SendMessage(GetParent(m_hwndParent), GC_REMOVETAB, 0, (LPARAM)this);
+ Close();
+ }
+ else SendMessage(m_hwndParent, WM_CLOSE, 0, 0);
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
int OnCheckPlugins(WPARAM, LPARAM);
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h index fc6c9000fb..a926188e0c 100644 --- a/src/core/stdmsg/src/msgs.h +++ b/src/core/stdmsg/src/msgs.h @@ -56,6 +56,8 @@ protected: CCtrlButton m_btnOk;
CMsgDialog(int idDialog, SESSION_INFO *si = nullptr);
+
+ virtual void CloseTab() override;
};
class CSrmmWindow : public CMsgDialog
@@ -121,7 +123,6 @@ public: virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
virtual int Resizer(UTILRESIZECONTROL *urc) override;
- virtual void CloseTab() override;
virtual void LoadSettings() override {}
virtual void ScrollToBottom() override;
virtual void SetStatusText(const wchar_t*, HICON) override;
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h index e394d42faa..0d4c990b2a 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -217,7 +217,6 @@ public: virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
virtual int Resizer(UTILRESIZECONTROL *urc) override;
- virtual void CloseTab() override;
virtual void LoadSettings() override;
virtual void RedrawLog() override;
virtual void StreamInEvents(LOGINFO *lin, bool bRedraw) override;
|