From e36aafc4e71841211bc2295bde9e708c7d3309e7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 13 Jul 2022 18:51:32 +0300 Subject: StdMsg: fix for window minimization in tabbed mode --- src/core/stdmsg/src/msgdialog.cpp | 10 +++++++++- src/core/stdmsg/src/msgoptions.cpp | 6 ++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 6cdd734108..5014eabbb6 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -382,7 +382,15 @@ void CMsgDialog::onClick_Ok(CCtrlButton *pButton) m_message.SetText(L""); - if (!g_Settings.bTabsEnable) { + if (g_Settings.bTabsEnable) { + if (g_plugin.bAutoClose) { + m_pOwner->RemoveTab(this); + m_autoClose = CLOSE_ON_OK; + } + else if (g_plugin.bAutoMin) + ::ShowWindow(GetParent(m_hwndParent), SW_MINIMIZE); + } + else { if (g_plugin.bAutoClose) ::PostMessage(m_hwndParent, WM_CLOSE, 0, 0); else if (g_plugin.bAutoMin) diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index aa22201609..641886c837 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -259,13 +259,15 @@ public: void onChange_AutoMin(CCtrlCheck*) { - chkAutoClose.SetState(false); + if (m_bInitialized) + chkAutoClose.SetState(false); chkCtrlSupport.Enable(!chkAutoClose.GetState()); } void onChange_AutoClose(CCtrlCheck*) { - chkAutoMin.SetState(false); + if (m_bInitialized) + chkAutoMin.SetState(false); chkCtrlSupport.Enable(!chkAutoClose.GetState()); } -- cgit v1.2.3