summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-03 16:44:00 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-03 16:44:00 +0300
commitf4f859003e2d17ab6d457e552ccdde775899b328 (patch)
tree62c04c3dabbf34713331001b6f3287727e45bc5d /src
parent9c6e4b571b98d001c4d0e9d7d8ba35e10e0a04d9 (diff)
StdMsg: fix for auto-closing the only tab in a container
Diffstat (limited to 'src')
-rw-r--r--src/core/stdmsg/src/chat_window.cpp8
-rw-r--r--src/core/stdmsg/src/stdafx.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp
index 75a34c72d2..f2391f0d42 100644
--- a/src/core/stdmsg/src/chat_window.cpp
+++ b/src/core/stdmsg/src/chat_window.cpp
@@ -952,6 +952,12 @@ void CChatRoomDlg::OnInitDialog()
NotifyLocalWinEvent(m_hContact, m_hwnd, MSG_WINDOW_EVT_OPEN);
}
+void CChatRoomDlg::OnClose()
+{
+ if (g_Settings.bTabsEnable)
+ SendMessage(GetParent(m_hwndParent), GC_REMOVETAB, 0, (LPARAM)this);
+}
+
void CChatRoomDlg::OnDestroy()
{
NotifyLocalWinEvent(m_hContact, m_hwnd, MSG_WINDOW_EVT_CLOSING);
@@ -1608,7 +1614,7 @@ LABEL_SHOWWINDOW:
if (g_Settings.bTabsEnable)
SendMessage(GetParent(m_hwndParent), GC_REMOVETAB, 0, (LPARAM)this);
Close();
- break;
+ return 0;
case GC_CHANGEFILTERFLAG:
m_si->iLogFilterFlags = lParam;
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h
index f39b6c0199..3e0276e705 100644
--- a/src/core/stdmsg/src/stdafx.h
+++ b/src/core/stdmsg/src/stdafx.h
@@ -197,6 +197,7 @@ public:
CChatRoomDlg(SESSION_INFO*);
virtual void OnInitDialog() override;
+ virtual void OnClose() override;
virtual void OnDestroy() override;
virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;