diff options
Diffstat (limited to 'plugins/TabSRMM/src/taskbar.cpp')
-rw-r--r-- | plugins/TabSRMM/src/taskbar.cpp | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp index 2a9d24f210..b8ddc710ec 100644 --- a/plugins/TabSRMM/src/taskbar.cpp +++ b/plugins/TabSRMM/src/taskbar.cpp @@ -182,9 +182,9 @@ void CTaskbarInteract::SetTabActive(const HWND hwndTab, const HWND hwndGroup) co void CProxyWindow::add(CTabBaseDlg *dat)
{
if (PluginConfig.m_bIsWin7 && PluginConfig.m_useAeroPeek) // && (!CSkin::m_skinEnabled || M.GetByte("forceAeroPeek", 0)))
- dat->pWnd = new CProxyWindow(dat);
+ dat->m_pWnd = new CProxyWindow(dat);
else
- dat->pWnd = 0;
+ dat->m_pWnd = 0;
}
/**
@@ -198,23 +198,23 @@ void CProxyWindow::add(CTabBaseDlg *dat) void CProxyWindow::verify(CTabBaseDlg *dat)
{
if (PluginConfig.m_bIsWin7 && PluginConfig.m_useAeroPeek) {
- if (0 == dat->pWnd) {
- dat->pWnd = new CProxyWindow(dat);
- if (dat->pWnd) {
- dat->pWnd->updateIcon(dat->hTabStatusIcon);
- dat->pWnd->updateTitle(dat->cache->getNick());
+ 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());
}
}
else
- dat->pWnd->verifyDwmState();
+ dat->m_pWnd->verifyDwmState();
}
/*
* this should not happens, but who knows...
*/
else {
- if (dat->pWnd) {
- delete dat->pWnd;
- dat->pWnd = 0;
+ if (dat->m_pWnd) {
+ delete dat->m_pWnd;
+ dat->m_pWnd = 0;
}
}
}
@@ -236,7 +236,7 @@ CProxyWindow::CProxyWindow(CTabBaseDlg *dat) #if defined(__LOGDEBUG_)
_DebugTraceW(L"create proxy object for: %s", m_dat->cache->getNick());
#endif
- Win7Taskbar->registerTab(m_hwndProxy, m_dat->pContainer->hwnd);
+ Win7Taskbar->registerTab(m_hwndProxy, m_dat->m_pContainer->hwnd);
if (CMimAPI::m_pfnDwmSetWindowAttribute) {
BOOL fIconic = TRUE;
BOOL fHasIconicBitmap = TRUE;
@@ -293,7 +293,7 @@ void CProxyWindow::sendThumb(LONG width, LONG height) if (0 == m_thumb) {
m_width = width;
m_height = height;
- if (m_dat->bType == SESSIONTYPE_IM)
+ if (m_dat->m_bType == SESSIONTYPE_IM)
m_thumb = new CThumbIM(this);
else
m_thumb = new CThumbMUC(this);
@@ -317,10 +317,10 @@ void CProxyWindow::sendThumb(LONG width, LONG height) */
void CProxyWindow::sendPreview()
{
- if (m_dat->pContainer == NULL)
+ if (m_dat->m_pContainer == NULL)
return;
- CSrmmWindow *dat_active = reinterpret_cast<CSrmmWindow *>(::GetWindowLongPtr(m_dat->pContainer->hwndActive, GWLP_USERDATA));
+ CSrmmWindow *dat_active = reinterpret_cast<CSrmmWindow *>(::GetWindowLongPtr(m_dat->m_pContainer->hwndActive, GWLP_USERDATA));
if (!m_thumb || !dat_active)
return;
@@ -329,15 +329,15 @@ void CProxyWindow::sendPreview() RECT rcContainer, rcTemp, rcRich, rcLog;
HDC hdc, dc;
int twips = (int)(15.0f / PluginConfig.m_DPIscaleY);
- bool fIsChat = m_dat->bType != SESSIONTYPE_IM;
+ bool fIsChat = m_dat->m_bType != SESSIONTYPE_IM;
HWND hwndRich = ::GetDlgItem(m_dat->GetHwnd(), fIsChat ? IDC_LOG : IDC_LOG);
LONG cx, cy;
POINT ptOrigin = { 0 }, ptBottom;
- if (m_dat->dwFlags & MWF_NEEDCHECKSIZE) {
+ if (m_dat->m_dwFlags & MWF_NEEDCHECKSIZE) {
RECT rcClient;
- ::SendMessage(m_dat->pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
+ ::SendMessage(m_dat->m_pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
::MoveWindow(m_dat->GetHwnd(), rcClient.left, rcClient.top, (rcClient.right - rcClient.left), (rcClient.bottom - rcClient.top), FALSE);
::SendMessage(m_dat->GetHwnd(), WM_SIZE, 0, 0);
DM_ScrollToBottom(m_dat, 0, 1);
@@ -347,23 +347,23 @@ void CProxyWindow::sendPreview() * use the last known client area size instead.
*/
- if (!::IsIconic(m_dat->pContainer->hwnd)) {
- ::GetWindowRect(m_dat->pContainer->hwndActive, &rcLog);
- ::GetClientRect(m_dat->pContainer->hwnd, &rcContainer);
+ if (!::IsIconic(m_dat->m_pContainer->hwnd)) {
+ ::GetWindowRect(m_dat->m_pContainer->hwndActive, &rcLog);
+ ::GetClientRect(m_dat->m_pContainer->hwnd, &rcContainer);
pt.x = rcLog.left;
pt.y = rcLog.top;
- ::ScreenToClient(m_dat->pContainer->hwnd, &pt);
+ ::ScreenToClient(m_dat->m_pContainer->hwnd, &pt);
}
else {
- rcLog = m_dat->pContainer->rcLogSaved;
- rcContainer = m_dat->pContainer->rcSaved;
- pt = m_dat->pContainer->ptLogSaved;
+ rcLog = m_dat->m_pContainer->rcLogSaved;
+ rcContainer = m_dat->m_pContainer->rcSaved;
+ pt = m_dat->m_pContainer->ptLogSaved;
}
- ::GetWindowRect(::GetDlgItem(m_dat->pContainer->hwndActive, dat_active->bType == SESSIONTYPE_IM ? IDC_LOG : IDC_LOG), &rcTemp);
+ ::GetWindowRect(::GetDlgItem(m_dat->m_pContainer->hwndActive, dat_active->m_bType == SESSIONTYPE_IM ? IDC_LOG : IDC_LOG), &rcTemp);
ptBottom.x = rcTemp.left;
ptBottom.y = rcTemp.bottom;
- ::ScreenToClient(m_dat->pContainer->hwnd, &ptBottom);
+ ::ScreenToClient(m_dat->m_pContainer->hwnd, &ptBottom);
cx = rcLog.right - rcLog.left;
cy = rcLog.bottom - rcLog.top;
@@ -392,16 +392,16 @@ void CProxyWindow::sendPreview() HBITMAP hbmRich = CSkin::CreateAeroCompatibleBitmap(rcRich, hdcRich);
HBITMAP hbmRichOld = reinterpret_cast<HBITMAP>(::SelectObject(hdcRich, hbmRich));
- COLORREF clr = fIsChat ? M.GetDword(FONTMODULE, SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR) : m_dat->pContainer->theme.inbg;
+ COLORREF clr = fIsChat ? M.GetDword(FONTMODULE, SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR) : m_dat->m_pContainer->theme.inbg;
HBRUSH br = ::CreateSolidBrush(clr);
::FillRect(hdcRich, &rcRich, br);
::DeleteObject(br);
- if (m_dat->hwndIEView)
- ::SendMessage(m_dat->hwndIEView, WM_PRINT, reinterpret_cast<WPARAM>(hdcRich), PRF_CLIENT | PRF_NONCLIENT);
- else if (m_dat->hwndHPP) {
- CSkin::RenderText(hdcRich, m_dat->hTheme, TranslateT("Previews not available when using History++ plugin for message log display."),
- &rcRich, DT_VCENTER | DT_CENTER | DT_WORDBREAK, 10, m_dat->pContainer->theme.fontColors[MSGFONTID_MYMSG], false);
+ if (m_dat->m_hwndIEView)
+ ::SendMessage(m_dat->m_hwndIEView, WM_PRINT, reinterpret_cast<WPARAM>(hdcRich), PRF_CLIENT | PRF_NONCLIENT);
+ else if (m_dat->m_hwndHPP) {
+ CSkin::RenderText(hdcRich, m_dat->m_hTheme, TranslateT("Previews not available when using History++ plugin for message log display."),
+ &rcRich, DT_VCENTER | DT_CENTER | DT_WORDBREAK, 10, m_dat->m_pContainer->theme.fontColors[MSGFONTID_MYMSG], false);
}
else {
rcRich.right *= twips;
@@ -433,7 +433,7 @@ void CProxyWindow::sendPreview() }
else pt.x = pt.y = 0;
- CMimAPI::m_pfnDwmSetIconicLivePreviewBitmap(m_hwndProxy, hbm, &pt, m_dat->pContainer->dwFlags & CNT_CREATE_MINIMIZED ? 0 : DWM_SIT_DISPLAYFRAME);
+ CMimAPI::m_pfnDwmSetIconicLivePreviewBitmap(m_hwndProxy, hbm, &pt, m_dat->m_pContainer->dwFlags & CNT_CREATE_MINIMIZED ? 0 : DWM_SIT_DISPLAYFRAME);
::ReleaseDC(m_dat->GetHwnd(), dc);
::DeleteObject(hbm);
}
@@ -488,7 +488,7 @@ void CProxyWindow::updateIcon(const HICON hIcon) const */
void CProxyWindow::activateTab() const
{
- Win7Taskbar->SetTabActive(m_hwndProxy, m_dat->pContainer->hwnd);
+ Win7Taskbar->SetTabActive(m_hwndProxy, m_dat->m_pContainer->hwnd);
}
/**
* invalidate the thumbnail, it will be recreated at the next request
@@ -551,7 +551,7 @@ LRESULT CALLBACK CProxyWindow::wndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARA switch (msg) {
case WM_CLOSE:
{
- TContainerData* pC = m_dat->pContainer;
+ TContainerData* pC = m_dat->m_pContainer;
if (m_dat->GetHwnd() != pC->hwndActive)
SendMessage(m_dat->GetHwnd(), WM_CLOSE, 1, 3);
@@ -640,12 +640,12 @@ void CThumbBase::renderBase() m_hbmOld = reinterpret_cast<HBITMAP>(::SelectObject(m_hdc, m_hbmThumb));
ReleaseDC(m_pWnd->getHwnd(), dc);
- brBack = ::CreateSolidBrush(m_dat->dwUnread ? RGB(80, 60, 60) : RGB(60, 60, 60));
+ brBack = ::CreateSolidBrush(m_dat->m_dwUnread ? RGB(80, 60, 60) : RGB(60, 60, 60));
::FillRect(m_hdc, &m_rc, brBack);
::DeleteObject(brBack);
::SelectObject(m_hdc, m_hbmOld);
- CImageItem::SetBitmap32Alpha(m_hbmThumb, m_dat->dwUnread ? 110 : 60);
+ CImageItem::SetBitmap32Alpha(m_hbmThumb, m_dat->m_dwUnread ? 110 : 60);
m_hbmOld = reinterpret_cast<HBITMAP>(::SelectObject(m_hdc, m_hbmThumb));
SetBkMode(m_hdc, TRANSPARENT);
@@ -659,7 +659,7 @@ void CThumbBase::renderBase() hIcon = m_pWnd->getBigIcon();
if (0 == hIcon) {
- if (m_dat->dwUnread) {
+ if (m_dat->m_dwUnread) {
if (PluginConfig.g_IconMsgEventBig)
hIcon = PluginConfig.g_IconMsgEventBig;
else {
@@ -668,9 +668,9 @@ void CThumbBase::renderBase() }
}
else {
- hIcon = reinterpret_cast<HICON>(Skin_LoadProtoIcon(m_dat->cache->getActiveProto(), m_dat->cache->getActiveStatus(), true));
+ hIcon = reinterpret_cast<HICON>(Skin_LoadProtoIcon(m_dat->m_cache->getActiveProto(), m_dat->m_cache->getActiveStatus(), true));
if (0 == hIcon || reinterpret_cast<HICON>(CALLSERVICE_NOTFOUND) == hIcon) {
- hIcon = reinterpret_cast<HICON>(Skin_LoadProtoIcon(m_dat->cache->getActiveProto(), m_dat->cache->getActiveStatus()));
+ hIcon = reinterpret_cast<HICON>(Skin_LoadProtoIcon(m_dat->m_cache->getActiveProto(), m_dat->m_cache->getActiveStatus()));
lIconSize = 16;
}
}
@@ -681,13 +681,13 @@ void CThumbBase::renderBase() ::DrawIconEx(m_hdc, m_rcIcon.right - 16, m_rcIcon.top + 16, hIcon, 16, 16, 0, 0, DI_NORMAL);
m_rcIcon.top += (lIconSize + 3);
- CSkin::RenderText(m_hdc, m_dat->hTheme, m_dat->szStatus, &m_rcIcon, m_dtFlags | DT_CENTER | DT_WORD_ELLIPSIS, 10, 0, true);
- if (m_dat->dwUnread && SESSIONTYPE_IM == m_dat->bType) {
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, m_dat->m_wszStatus, &m_rcIcon, m_dtFlags | DT_CENTER | DT_WORD_ELLIPSIS, 10, 0, true);
+ if (m_dat->m_dwUnread && SESSIONTYPE_IM == m_dat->m_bType) {
wchar_t tszTemp[30];
m_rcIcon.top += m_sz.cy;
- mir_snwprintf(tszTemp, TranslateT("%d unread"), m_dat->dwUnread);
- CSkin::RenderText(m_hdc, m_dat->hTheme, tszTemp, &m_rcIcon, m_dtFlags | DT_CENTER | DT_WORD_ELLIPSIS, 10, 0, true);
+ mir_snwprintf(tszTemp, TranslateT("%d unread"), m_dat->m_dwUnread);
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, tszTemp, &m_rcIcon, m_dtFlags | DT_CENTER | DT_WORD_ELLIPSIS, 10, 0, true);
}
m_rcIcon = m_rcTop;
m_rcIcon.top += 2;
@@ -701,7 +701,7 @@ void CThumbBase::renderBase() */
void CThumbBase::setupRect()
{
- if (SESSIONTYPE_IM == m_pWnd->getDat()->bType) {
+ if (SESSIONTYPE_IM == m_pWnd->getDat()->m_bType) {
m_rcTop = m_rc;
m_rcBottom = m_rc;
m_rcBottom.top = m_rc.bottom - (2 * (m_rcBottom.bottom / 5)) - 2;
@@ -769,7 +769,7 @@ void CThumbIM::renderContent() double dNewWidth = 0.0, dNewHeight = 0.0;
bool fFree = false;
- HBITMAP hbmAvatar = (m_dat->ace && m_dat->ace->hbmPic) ? m_dat->ace->hbmPic : PluginConfig.g_hbmUnknown;
+ HBITMAP hbmAvatar = (m_dat->m_ace && m_dat->m_ace->hbmPic) ? m_dat->m_ace->hbmPic : PluginConfig.g_hbmUnknown;
Utils::scaleAvatarHeightLimited(hbmAvatar, dNewWidth, dNewHeight, m_rcIcon.bottom - m_rcIcon.top);
HBITMAP hbmResized = CSkin::ResizeBitmap(hbmAvatar, dNewWidth, dNewHeight, fFree);
@@ -804,14 +804,14 @@ void CThumbIM::renderContent() m_rcBottom.bottom -= ((m_rcBottom.bottom - m_rcBottom.top) % m_sz.cy); // adjust to a multiple of line height
- const wchar_t *tszStatusMsg = m_dat->cache->getStatusMsg();
+ const wchar_t *tszStatusMsg = m_dat->m_cache->getStatusMsg();
if (tszStatusMsg == 0)
tszStatusMsg = TranslateT("No status message");
- CSkin::RenderText(m_hdc, m_dat->hTheme, tszStatusMsg, &m_rcBottom, DT_WORD_ELLIPSIS | DT_END_ELLIPSIS | m_dtFlags, 10, 0, true);
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, tszStatusMsg, &m_rcBottom, DT_WORD_ELLIPSIS | DT_END_ELLIPSIS | m_dtFlags, 10, 0, true);
m_rcBottom.bottom = m_rc.bottom;
m_rcBottom.top = m_rcBottom.bottom - m_sz.cy - 2;
- CSkin::RenderText(m_hdc, m_dat->hTheme, Win7Taskbar->haveAlwaysGroupingMode() ? m_dat->cache->getUIN() : m_dat->cache->getNick(),
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, Win7Taskbar->haveAlwaysGroupingMode() ? m_dat->m_cache->getUIN() : m_dat->m_cache->getNick(),
&m_rcBottom, m_dtFlags | DT_SINGLELINE | DT_WORD_ELLIPSIS | DT_END_ELLIPSIS, 10, 0, true);
/*
@@ -861,9 +861,9 @@ void CThumbMUC::renderContent() const wchar_t* szStatusMsg = 0;
if (mi) {
- if (m_dat->dwUnread) {
- mir_snwprintf(szTemp, TranslateT("%d unread"), m_dat->dwUnread);
- CSkin::RenderText(m_hdc, m_dat->hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
+ if (m_dat->m_dwUnread) {
+ mir_snwprintf(szTemp, TranslateT("%d unread"), m_dat->m_dwUnread);
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
m_rcIcon.top += m_sz.cy;
}
if (m_dat->si->iType != GCW_SERVER) {
@@ -879,17 +879,17 @@ void CThumbMUC::renderContent() }
else
mir_snwprintf(szTemp, TranslateT("Chat room %s"), L"");
- CSkin::RenderText(m_hdc, m_dat->hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
m_rcIcon.top += m_sz.cy;
mir_snwprintf(szTemp, TranslateT("%d user(s)"), m_dat->si->nUsersInNicklist);
- CSkin::RenderText(m_hdc, m_dat->hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
}
else {
mir_snwprintf(szTemp, TranslateT("Server window"));
- CSkin::RenderText(m_hdc, m_dat->hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, szTemp, &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
if (mi->tszIdleMsg[0] && mir_wstrlen(mi->tszIdleMsg) > 2) {
m_rcIcon.top += m_sz.cy;
- CSkin::RenderText(m_hdc, m_dat->hTheme, &mi->tszIdleMsg[2], &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, &mi->tszIdleMsg[2], &m_rcIcon, m_dtFlags | DT_SINGLELINE | DT_RIGHT, 10, 0, true);
}
}
}
@@ -904,11 +904,11 @@ void CThumbMUC::renderContent() szStatusMsg = TranslateT("no topic set.");
}
else if (mi) {
- mir_snwprintf(szTemp, TranslateT("%s on %s%s"), m_dat->szMyNickname, mi->ptszModDispName, L"");
+ mir_snwprintf(szTemp, TranslateT("%s on %s%s"), m_dat->m_wszMyNickname, mi->ptszModDispName, L"");
szStatusMsg = szTemp;
}
- CSkin::RenderText(m_hdc, m_dat->hTheme, szStatusMsg, &m_rcBottom, DT_WORD_ELLIPSIS | DT_END_ELLIPSIS | m_dtFlags, 10, 0, true);
+ CSkin::RenderText(m_hdc, m_dat->m_hTheme, szStatusMsg, &m_rcBottom, DT_WORD_ELLIPSIS | DT_END_ELLIPSIS | m_dtFlags, 10, 0, true);
}
/*
* finalize it
|