summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-06-06 22:53:11 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-06-06 22:53:11 +0300
commitbf888032ef5235a8c6fa9d692f8d0e8a84ade592 (patch)
treefff383d03ad01d0cc02673044fe4744e21416770 /src/mir_core
parent78b151bd848de61d4d1285484ba25c516441a802 (diff)
merge from master till
fixes #1408 (StdMsg: window caption bug)
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/src/CCtrlPages.cpp16
-rw-r--r--src/mir_core/src/mir_core.def1
-rw-r--r--src/mir_core/src/mir_core64.def1
3 files changed, 17 insertions, 1 deletions
diff --git a/src/mir_core/src/CCtrlPages.cpp b/src/mir_core/src/CCtrlPages.cpp
index d51b7af35a..88e6a9d59c 100644
--- a/src/mir_core/src/CCtrlPages.cpp
+++ b/src/mir_core/src/CCtrlPages.cpp
@@ -135,7 +135,7 @@ void CCtrlPages::AddPage(const wchar_t *ptszName, HICON hIcon, CDlgBase *pDlg)
ShowPage(m_pActivePage);
}
}
- else m_pages.insert(info);
+ m_pages.insert(info);
}
void CCtrlPages::ActivatePage(int iPage)
@@ -160,6 +160,16 @@ void CCtrlPages::ActivatePage(int iPage)
::SendMessage(m_pActivePage->GetHwnd(), WM_MOUSEACTIVATE, 0, 0);
}
+void CCtrlPages::CheckRowCount()
+{
+ int iRowCount = TabCtrl_GetRowCount(m_hwnd);
+ if (m_numRows != iRowCount) {
+ m_numRows = iRowCount;
+ for (auto &p : m_pages)
+ p->m_bScheduledResize = true;
+ }
+}
+
int CCtrlPages::GetCount()
{
return TabCtrl_GetItemCount(m_hwnd);
@@ -226,6 +236,8 @@ void CCtrlPages::InsertPage(TPageInfo *pPage)
}
TabCtrl_InsertItem(m_hwnd, TabCtrl_GetItemCount(m_hwnd), &tci);
+
+ CheckRowCount();
}
void CCtrlPages::RemovePage(int iPage)
@@ -236,6 +248,8 @@ void CCtrlPages::RemovePage(int iPage)
TabCtrl_DeleteItem(m_hwnd, iPage);
delete p;
+
+ CheckRowCount();
}
void CCtrlPages::ShowPage(CDlgBase *pDlg)
diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def
index 2936dbf410..38eb3db4d1 100644
--- a/src/mir_core/src/mir_core.def
+++ b/src/mir_core/src/mir_core.def
@@ -1069,3 +1069,4 @@ IsTerminalDisconnected @1245
CallObjectEventHook @1259
?db_get_sm@@YG?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPBD0@Z @1260 NONAME
?db_get_wsm@@YG?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@IPBD0@Z @1261 NONAME
+?CheckRowCount@CCtrlPages@@AAEXXZ @1262 NONAME
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def
index ed12967625..61a559f477 100644
--- a/src/mir_core/src/mir_core64.def
+++ b/src/mir_core/src/mir_core64.def
@@ -1069,3 +1069,4 @@ IsTerminalDisconnected @1245
CallObjectEventHook @1259
?db_get_sm@@YA?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPEBD0@Z @1260 NONAME
?db_get_wsm@@YA?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@IPEBD0@Z @1261 NONAME
+?CheckRowCount@CCtrlPages@@AEAAXXZ @1262 NONAME