summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-07-13 18:51:32 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-07-13 18:51:32 +0300
commite36aafc4e71841211bc2295bde9e708c7d3309e7 (patch)
tree737cda64632bc9ef3be9d36d0a142f5d52a421e1
parentbef9b685baa605df0739f4c5fe380093db2851ef (diff)
StdMsg: fix for window minimization in tabbed mode
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp10
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp6
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());
}