summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-04-08 19:11:24 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-04-08 19:11:24 +0300
commit106ee67ae25419a2258c91b2d6e7a00312a51de0 (patch)
tree62e9b1cf626e00db59bec3a809ec2e4543d28e70 /plugins/TabSRMM/src
parentc78da653c2806e0ac72e0c7baa499342a4c637e5 (diff)
Jabber: merge of fixes from trunk
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/functions.h3
-rw-r--r--plugins/TabSRMM/src/tabctrl.cpp3
-rw-r--r--plugins/TabSRMM/src/taskbar.cpp25
-rw-r--r--plugins/TabSRMM/src/taskbar.h6
-rw-r--r--plugins/TabSRMM/src/utils.cpp4
5 files changed, 10 insertions, 31 deletions
diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h
index b4bd150c19..2de544eb2b 100644
--- a/plugins/TabSRMM/src/functions.h
+++ b/plugins/TabSRMM/src/functions.h
@@ -129,9 +129,6 @@ int TSAPI UnloadTSButtonModule();
/*
* debugging support
*/
-#if defined(__LOGDEBUG_)
-int _DebugTraceW(const wchar_t *fmt, ...);
-#endif
int _DebugPopup(MCONTACT hContact, const wchar_t *fmt, ...);
// themes
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp
index b8f2942f17..8d52ffa010 100644
--- a/plugins/TabSRMM/src/tabctrl.cpp
+++ b/plugins/TabSRMM/src/tabctrl.cpp
@@ -1285,9 +1285,6 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara
break;
}
-#if defined(__LOGDEBUG_)
- _DebugTraceW(L"msg: %hu", msg);
-#endif
return CallWindowProc(OldTabControlClassProc, hwnd, msg, wParam, lParam);
}
diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp
index 286b84473a..88fd5abae5 100644
--- a/plugins/TabSRMM/src/taskbar.cpp
+++ b/plugins/TabSRMM/src/taskbar.cpp
@@ -207,18 +207,12 @@ void CTabBaseDlg::VerifyProxy()
* and previews for a message session.
* each tab has one invisible proxy window
*/
-CProxyWindow::CProxyWindow(CTabBaseDlg *dat)
+CProxyWindow::CProxyWindow(CTabBaseDlg *dat) :
+ m_dat(dat)
{
- m_dat = dat;
- m_hBigIcon = nullptr;
- m_thumb = nullptr;
-
m_hwndProxy = ::CreateWindowEx(/*WS_EX_TOOLWINDOW | */WS_EX_NOACTIVATE, PROXYCLASSNAME, L"",
WS_POPUP | WS_BORDER | WS_SYSMENU | WS_CAPTION, -32000, -32000, 10, 10, nullptr, nullptr, g_plugin.getInst(), (LPVOID)this);
-#if defined(__LOGDEBUG_)
- _DebugTraceW(L"create proxy object for: %s", m_dat->cache->getNick());
-#endif
Win7Taskbar->registerTab(m_hwndProxy, m_dat->m_pContainer->m_hwnd);
if (CMimAPI::m_pfnDwmSetWindowAttribute) {
BOOL fIconic = TRUE;
@@ -234,13 +228,7 @@ CProxyWindow::~CProxyWindow()
Win7Taskbar->unRegisterTab(m_hwndProxy);
::DestroyWindow(m_hwndProxy);
-#if defined(__LOGDEBUG_)
- _DebugTraceW(L"destroy proxy object for: %s", m_dat->cache->getNick());
-#endif
- if (m_thumb) {
- delete m_thumb;
- m_thumb = nullptr;
- }
+ delete m_thumb;
}
/**
@@ -601,10 +589,6 @@ void CThumbBase::renderBase()
m_dtFlags = 0;
m_hOldFont = nullptr;
-#if defined(__LOGDEBUG_)
- _DebugTraceW(L"refresh base (background) with %d, %d", m_width, m_height);
-#endif
-
m_rc.right = m_width;
m_rc.bottom = m_height;
m_rc.left = m_rc.top = 0;
@@ -713,9 +697,6 @@ CThumbBase::~CThumbBase()
m_hbmThumb = nullptr;
m_isValid = false;
}
-#if defined(__LOGDEBUG_)
- _DebugTraceW(L"destroy CThumbBase");
-#endif
}
/**
diff --git a/plugins/TabSRMM/src/taskbar.h b/plugins/TabSRMM/src/taskbar.h
index 3cad4ddecc..9da6ab0d0d 100644
--- a/plugins/TabSRMM/src/taskbar.h
+++ b/plugins/TabSRMM/src/taskbar.h
@@ -121,15 +121,15 @@ public:
private:
CTabBaseDlg *m_dat;
- HWND m_hwndProxy;
+ HWND m_hwndProxy = nullptr;
LONG m_width, m_height;
- HICON m_hBigIcon, m_hOverlayIcon;
+ HICON m_hBigIcon = nullptr, m_hOverlayIcon = nullptr;
LRESULT CALLBACK wndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
void sendThumb(LONG width, LONG height);
void sendPreview();
- CThumbBase *m_thumb;
+ CThumbBase *m_thumb = nullptr;
};
class CTaskbarInteract
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index 9e7ac2c0a4..3311f2272f 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -1326,6 +1326,10 @@ INT_PTR CALLBACK CWarning::dlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
}
}
break;
+
+ case WM_DESTROY:
+ Window_FreeIcon_IcoLib(hwnd);
+ break;
}
return FALSE;