From 8f7b9a76a69cbe33a9050171a1e139d726857ca1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Apr 2017 16:09:07 +0300 Subject: code reorder to hide as much data as possible --- plugins/TabSRMM/src/taskbar.cpp | 37 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 27 deletions(-) (limited to 'plugins/TabSRMM/src/taskbar.cpp') diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp index 2494a08429..6f802725a8 100644 --- a/plugins/TabSRMM/src/taskbar.cpp +++ b/plugins/TabSRMM/src/taskbar.cpp @@ -171,22 +171,6 @@ void CTaskbarInteract::SetTabActive(const HWND hwndTab, const HWND hwndGroup) co m_pTaskbarInterface->SetTabActive(hwndTab, hwndGroup, 0); } -/** - * create a proxy window object for the given session. Do NOT call this more than once - * per session and not outside of WM_INITDIALOG after most things are initialized. - * @param dat session window data - * - * static member function. Ignored when OS is not Windows 7 or global option for - * Windows 7 task bar support is diabled. - */ -void CProxyWindow::add(CTabBaseDlg *dat) -{ - if (PluginConfig.m_bIsWin7 && PluginConfig.m_useAeroPeek) // && (!CSkin::m_skinEnabled || M.GetByte("forceAeroPeek", 0))) - dat->m_pWnd = new CProxyWindow(dat); - else - dat->m_pWnd = 0; -} - /** * This is called from the broadcasted WM_DWMCOMPOSITIONCHANGED event by all messages * sessions. It checks and, if needed, destroys or creates a proxy object, based on @@ -195,26 +179,25 @@ void CProxyWindow::add(CTabBaseDlg *dat) * * static member function */ -void CProxyWindow::verify(CTabBaseDlg *dat) +void CTabBaseDlg::VerifyProxy() { if (PluginConfig.m_bIsWin7 && PluginConfig.m_useAeroPeek) { - if (0 == dat->m_pWnd) { - dat->m_pWnd = new CProxyWindow(dat); - if (dat->m_pWnd) { - dat->m_pWnd->updateIcon(dat->m_hTabStatusIcon); - dat->m_pWnd->updateTitle(dat->m_cache->getNick()); + if (nullptr == m_pWnd) { + m_pWnd = new CProxyWindow(this); + if (m_pWnd) { + m_pWnd->updateIcon(m_hTabStatusIcon); + m_pWnd->updateTitle(m_cache->getNick()); } } - else - dat->m_pWnd->verifyDwmState(); + else m_pWnd->verifyDwmState(); } /* * this should not happens, but who knows... */ else { - if (dat->m_pWnd) { - delete dat->m_pWnd; - dat->m_pWnd = 0; + if (m_pWnd) { + delete m_pWnd; + m_pWnd = nullptr; } } } -- cgit v1.2.3