From 7f513673b523ecfbf6ded0a2d0e5cdf5496bd6b0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 3 Apr 2017 23:52:09 +0300 Subject: - SRMM window list management moved to the base class; - fixes #791 --- src/core/stdmsg/src/chat_window.cpp | 5 ----- src/core/stdmsg/src/msgdialog.cpp | 5 ----- 2 files changed, 10 deletions(-) (limited to 'src/core') diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp index aaf6ee3a50..ea68c9c571 100644 --- a/src/core/stdmsg/src/chat_window.cpp +++ b/src/core/stdmsg/src/chat_window.cpp @@ -55,7 +55,6 @@ void CChatRoomDlg::OnInitDialog() { CSrmmBaseDialog::OnInitDialog(); m_si->pDlg = this; - SetWindowLongPtr(m_hwnd, GWLP_USERDATA, LPARAM(this)); if (g_Settings.bTabsEnable) SetWindowLongPtr(m_hwnd, GWL_EXSTYLE, GetWindowLongPtr(m_hwnd, GWL_EXSTYLE) | WS_EX_APPWINDOW); @@ -63,8 +62,6 @@ void CChatRoomDlg::OnInitDialog() // initialize toolbar icons Srmm_CreateToolbarIcons(m_hwnd, BBBF_ISCHATBUTTON); - WindowList_Add(pci->hWindowList, m_hwnd, m_hContact); - NotifyEvent(MSG_WINDOW_EVT_OPENING); m_log.SendMsg(EM_AUTOURLDETECT, 1, 0); @@ -86,8 +83,6 @@ void CChatRoomDlg::OnDestroy() { NotifyEvent(MSG_WINDOW_EVT_CLOSING); - WindowList_Remove(pci->hWindowList, m_hwnd); - m_si->pDlg = nullptr; m_si->wState &= ~STATE_TALK; diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 4059a6ba1e..8b6ae10ed8 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -116,7 +116,6 @@ CSrmmWindow::CSrmmWindow(MCONTACT hContact) : void CSrmmWindow::OnInitDialog() { CSrmmBaseDialog::OnInitDialog(); - SetWindowLongPtr(m_hwnd, GWLP_USERDATA, (LPARAM)this); m_bIsMeta = db_mc_isMeta(m_hContact) != 0; m_hTimeZone = TimeZone_CreateByContact(m_hContact, 0, TZF_KNOWNONLY); @@ -156,7 +155,6 @@ void CSrmmWindow::OnInitDialog() Srmm_CreateToolbarIcons(m_hwnd, BBBF_ISIMBUTTON); - WindowList_Add(pci->hWindowList, m_hwnd, m_hContact); GetWindowRect(m_message.GetHwnd(), &m_minEditInit); SendMessage(m_hwnd, DM_UPDATESIZEBAR, 0, 0); m_hwndStatus = nullptr; @@ -284,7 +282,6 @@ void CSrmmWindow::OnInitDialog() void CSrmmWindow::OnDestroy() { - SetWindowLongPtr(m_hwnd, GWLP_USERDATA, 0); NotifyEvent(MSG_WINDOW_EVT_CLOSING); // save string from the editor @@ -308,8 +305,6 @@ void CSrmmWindow::OnDestroy() mir_free(m_cmdList[i]); m_cmdList.destroy(); - WindowList_Remove(pci->hWindowList, m_hwnd); - MCONTACT hContact = (g_dat.bSavePerContact) ? m_hContact : 0; db_set_dw(hContact ? m_hContact : 0, SRMMMOD, "splitterPos", m_splitterPos); -- cgit v1.2.3