summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/msgdialog.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-14 20:27:44 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-14 20:27:44 +0300
commit0edc6006e17f896324d4011acdf5e16162572908 (patch)
tree0894285d03393bbb891a6bac94f2fbda07ea40cc /plugins/TabSRMM/src/msgdialog.cpp
parentb408d9e8208c426c263c69602edfa8a4978fa3bf (diff)
tabSRMM:
- fixes #735 (crazy dark magic of Windows); - common code of window creation moved to CTabBaseDlg::OnInitDialog(); - DM_REFRESHTABINDEX replaced with the call of TContainerData::UpdateTabs();
Diffstat (limited to 'plugins/TabSRMM/src/msgdialog.cpp')
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 7279902229..bc1b473ccd 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -958,19 +958,16 @@ CThumbBase* CSrmmWindow::tabCreateThumb(CProxyWindow *pProxy) const
void CSrmmWindow::OnInitDialog()
{
- SetWindowLongPtr(m_hwnd, GWLP_USERDATA, (LONG_PTR)this);
+ CTabBaseDlg::OnInitDialog();
if (Utils::rtf_ctable == 0)
Utils::RTF_CTableInit();
- DM_ThemeChanged();
-
m_cache = CContactCache::getContactCache(m_hContact);
m_cache->updateNick();
m_cache->setWindowData(this);
- M.AddWindow(m_hwnd, m_hContact);
- BroadCastContainer(m_pContainer, DM_REFRESHTABINDEX, 0, 0);
- CProxyWindow::add(this);
+
+ //////////////////////////////////////////////////////////////////////////////////////
m_szProto = const_cast<char *>(m_cache->getProto());
m_bIsMeta = m_cache->isMeta();
if (m_bIsMeta)
@@ -1301,7 +1298,7 @@ void CSrmmWindow::OnDestroy()
if (i >= 0) {
SendMessage(m_hwndParent, WM_USER + 100, 0, 0); // remove tooltip
TabCtrl_DeleteItem(m_hwndParent, i);
- BroadCastContainer(m_pContainer, DM_REFRESHTABINDEX, 0, 0);
+ m_pContainer->UpdateTabs();
m_iTabID = -1;
}
@@ -2933,10 +2930,6 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
DM_ThemeChanged();
return 0;
- case DM_REFRESHTABINDEX:
- m_iTabID = GetTabIndexFromHWND(GetParent(m_hwnd), m_hwnd);
- return 0;
-
case DM_STATUSICONCHANGE:
if (m_pContainer->hwndStatus) {
SendMessage(m_pContainer->hwnd, WM_SIZE, 0, 0);