diff options
Diffstat (limited to 'plugins/TabSRMM')
27 files changed, 872 insertions, 873 deletions
diff --git a/plugins/TabSRMM/src/TSButton.cpp b/plugins/TabSRMM/src/TSButton.cpp index b57c0b37db..c131168cc2 100644 --- a/plugins/TabSRMM/src/TSButton.cpp +++ b/plugins/TabSRMM/src/TSButton.cpp @@ -156,9 +156,9 @@ static void PaintWorker(TSButtonCtrl *ctl, HDC hdcPaint) pt.x = rcWin.left;
ScreenToClient(dat->GetHwnd(), &pt);
BitBlt(hdcMem, 0, 0, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top,
- dat->m_pContainer->cachedToolbarDC, pt.x, 1, SRCCOPY);
+ dat->m_pContainer->m_cachedToolbarDC, pt.x, 1, SRCCOPY);
}
- if (ctl->hThemeToolbar && ctl->bIsThemed && 1 == dat->m_pContainer->bTBRenderingMode) {
+ if (ctl->hThemeToolbar && ctl->bIsThemed && 1 == dat->m_pContainer->m_bTBRenderingMode) {
if (bAero || PluginConfig.m_WinVerMajor >= 6)
DrawThemeBackground(ctl->hThemeToolbar, hdcMem, 8, RBStateConvert2Flat(state), &rcClient, &rcClient);
else
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp index ffa20a603a..be042cfd6b 100644 --- a/plugins/TabSRMM/src/buttonsbar.cpp +++ b/plugins/TabSRMM/src/buttonsbar.cpp @@ -204,11 +204,11 @@ BOOL CTabBaseDlg::BB_SetButtonsPos() return 0; BYTE gap = DPISCALEX_S(g_plugin.getByte("ButtonsBarGap", 1)); - bool showToolbar = !(m_pContainer->dwFlags & CNT_HIDETOOLBAR); - bool bBottomToolbar = (m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR) != 0; + bool showToolbar = !(m_pContainer->m_dwFlags & CNT_HIDETOOLBAR); + bool bBottomToolbar = (m_pContainer->m_dwFlags & CNT_BOTTOMTOOLBAR) != 0; HWND hwndToggleSideBar = GetDlgItem(m_hwnd, IDC_TOGGLESIDEBAR); - ShowWindow(hwndToggleSideBar, (showToolbar && m_pContainer->SideBar->isActive()) ? SW_SHOW : SW_HIDE); + ShowWindow(hwndToggleSideBar, (showToolbar && m_pContainer->m_pSideBar->isActive()) ? SW_SHOW : SW_HIDE); HDWP hdwp = BeginDeferWindowPos(Srmm_GetButtonCount() + 1); @@ -229,7 +229,7 @@ BOOL CTabBaseDlg::BB_SetButtonsPos() if ((rect.bottom - ptSplitter.y - (rcSplitter.bottom - rcSplitter.top) /*- DPISCALEY(2)*/ - (bBottomToolbar ? DPISCALEY_S(24) : 0) < m_pic.cy - DPISCALEY_S(2)) && m_bShowAvatar && !PluginConfig.m_bAlwaysFullToolbarWidth) foravatar = m_pic.cx + gap; - if ((m_pContainer->dwFlags & CNT_SIDEBAR) && (m_pContainer->SideBar->getFlags() & CSideBar::SIDEBARORIENTATION_LEFT)) { + if ((m_pContainer->m_dwFlags & CNT_SIDEBAR) && (m_pContainer->m_pSideBar->getFlags() & CSideBar::SIDEBARORIENTATION_LEFT)) { if (nullptr != hwndToggleSideBar) /* Wine fix. */ hdwp = DeferWindowPos(hdwp, hwndToggleSideBar, nullptr, 4, 2 + splitterY - iOff, 0, 0, SWP_NOZORDER | SWP_NOSIZE); lwidth += 10; @@ -280,7 +280,7 @@ BOOL CTabBaseDlg::BB_SetButtonsPos() } } - if ((m_pContainer->dwFlags & CNT_SIDEBAR) && (m_pContainer->SideBar->getFlags() & CSideBar::SIDEBARORIENTATION_RIGHT)) { + if ((m_pContainer->m_dwFlags & CNT_SIDEBAR) && (m_pContainer->m_pSideBar->getFlags() & CSideBar::SIDEBARORIENTATION_RIGHT)) { if (nullptr != hwndToggleSideBar) /* Wine fix. */ hdwp = DeferWindowPos(hdwp, hwndToggleSideBar, nullptr, rect.right - foravatar - 10, 2 + splitterY - iOff, 0, 0, SWP_NOZORDER | SWP_NOSIZE); rwidth += 12; diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp index 937c460af7..4066df9733 100644 --- a/plugins/TabSRMM/src/chat_tools.cpp +++ b/plugins/TabSRMM/src/chat_tools.cpp @@ -124,7 +124,7 @@ int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoNa pd.PluginWindowProc = PopupDlgProc;
pd.PluginData = si;
- return (int)PUAddPopupW(&pd);
+ return (INT_PTR)PUAddPopupW(&pd);
}
BOOL DoPopup(SESSION_INFO *si, GCEVENT *gce)
@@ -161,18 +161,18 @@ BOOL DoPopup(SESSION_INFO *si, GCEVENT *gce) if (nen_options.bWindowCheck) { // no popups at all for open windows... no exceptions
if (!PluginConfig.m_bHideOnClose)
return 0;
- if (pContainer->fHidden)
+ if (pContainer->m_bHidden)
goto passed;
return 0;
}
- if (pContainer->dwFlags & CNT_DONTREPORT && IsIconic(pContainer->m_hwnd)) // in tray counts as "minimised"
+ if (pContainer->m_dwFlags & CNT_DONTREPORT && IsIconic(pContainer->m_hwnd)) // in tray counts as "minimised"
goto passed;
- if (pContainer->dwFlags & CNT_DONTREPORTUNFOCUSED) {
+ if (pContainer->m_dwFlags & CNT_DONTREPORTUNFOCUSED) {
if (!IsIconic(pContainer->m_hwnd) && !pContainer->IsActive())
goto passed;
}
- if (pContainer->dwFlags & CNT_ALWAYSREPORTINACTIVE) {
- if (pContainer->dwFlags & CNT_DONTREPORTFOCUSED)
+ if (pContainer->m_dwFlags & CNT_ALWAYSREPORTINACTIVE) {
+ if (pContainer->m_dwFlags & CNT_DONTREPORTFOCUSED)
goto passed;
if (pContainer->m_hwndActive == si->pDlg->GetHwnd())
@@ -249,14 +249,14 @@ void DoFlashAndSoundWorker(FLASH_PARAMS *p) ShowWindow(dat->m_pContainer->m_hwndActive, SW_HIDE);
dat->m_pContainer->m_hwndActive = si->pDlg->GetHwnd();
dat->m_pContainer->UpdateTitle(dat->m_hContact);
- dat->m_pContainer->dwFlags |= CNT_DEFERREDTABSELECT;
+ dat->m_pContainer->m_dwFlags |= CNT_DEFERREDTABSELECT;
}
}
}
// flash window if it is not focused
if (p->bMustFlash && p->bInactive)
- if (!(dat->m_pContainer->dwFlags & CNT_NOFLASH))
+ if (!(dat->m_pContainer->m_dwFlags & CNT_NOFLASH))
FlashContainer(dat->m_pContainer, 1, 0);
if (p->hNotifyIcon && p->bInactive && ((p->iEvent & si->iLogTrayFlags) || bForcedIcon)) {
@@ -273,8 +273,8 @@ void DoFlashAndSoundWorker(FLASH_PARAMS *p) HICON hIcon = (HICON)SendMessage(dat->m_pContainer->m_hwnd, WM_GETICON, ICON_BIG, 0);
if (p->hNotifyIcon == g_chatApi.hIcons[ICON_HIGHLIGHT] || (hIcon != g_chatApi.hIcons[ICON_MESSAGE] && hIcon != g_chatApi.hIcons[ICON_HIGHLIGHT])) {
- SendMessage(dat->m_pContainer->m_hwnd, DM_SETICON, (WPARAM)dat, (LPARAM)p->hNotifyIcon);
- dat->m_pContainer->dwFlags |= CNT_NEED_UPDATETITLE;
+ dat->m_pContainer->SetIcon(dat, p->hNotifyIcon);
+ dat->m_pContainer->m_dwFlags |= CNT_NEED_UPDATETITLE;
}
}
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp index 278fbd1470..9c99f398d8 100644 --- a/plugins/TabSRMM/src/chat_window.cpp +++ b/plugins/TabSRMM/src/chat_window.cpp @@ -142,9 +142,9 @@ void CChatRoomDlg::UpdateWindowState(UINT msg) return; if (msg == WM_ACTIVATE) { - if (m_pContainer->dwFlags & CNT_TRANSPARENCY) { - DWORD trans = LOWORD(m_pContainer->settings->dwTransparency); - SetLayeredWindowAttributes(m_pContainer->m_hwnd, CSkin::m_ContainerColorKey, (BYTE)trans, (m_pContainer->dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0)); + if (m_pContainer->m_dwFlags & CNT_TRANSPARENCY) { + DWORD trans = LOWORD(m_pContainer->m_pSettings->dwTransparency); + SetLayeredWindowAttributes(m_pContainer->m_hwnd, CSkin::m_ContainerColorKey, (BYTE)trans, (m_pContainer->m_dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0)); } } @@ -172,10 +172,10 @@ void CChatRoomDlg::UpdateWindowState(UINT msg) m_pWnd->setOverlayIcon(nullptr, true); } - if (m_pContainer->hwndSaved == m_hwnd) + if (m_pContainer->m_hwndSaved == m_hwnd) return; - m_pContainer->hwndSaved = m_hwnd; + m_pContainer->m_hwndSaved = m_hwnd; g_chatApi.SetActiveSession(m_si); m_hTabIcon = m_hTabStatusIcon; @@ -195,19 +195,19 @@ void CChatRoomDlg::UpdateWindowState(UINT msg) m_bCanFlashTab = FALSE; m_iFlashIcon = nullptr; } - if (m_pContainer->dwFlashingStarted != 0) { + if (m_pContainer->m_dwFlashingStarted != 0) { FlashContainer(m_pContainer, 0, 0); - m_pContainer->dwFlashingStarted = 0; + m_pContainer->m_dwFlashingStarted = 0; } - m_pContainer->dwFlags &= ~CNT_NEED_UPDATETITLE; + m_pContainer->m_dwFlags &= ~CNT_NEED_UPDATETITLE; if (m_dwFlags & MWF_NEEDCHECKSIZE) PostMessage(m_hwnd, DM_SAVESIZE, 0, 0); SetFocus(m_message.GetHwnd()); m_dwLastActivity = GetTickCount(); - m_pContainer->dwLastActivity = m_dwLastActivity; - m_pContainer->MenuBar->configureMenu(); + m_pContainer->m_dwLastActivity = m_dwLastActivity; + m_pContainer->m_pMenuBar->configureMenu(); UpdateTrayMenuState(this, FALSE); DM_SetDBButtonStates(); @@ -222,8 +222,8 @@ void CChatRoomDlg::UpdateWindowState(UINT msg) BB_SetButtonsPos(); if (M.isAero()) InvalidateRect(m_hwndParent, nullptr, FALSE); - if (m_pContainer->dwFlags & CNT_SIDEBAR) - m_pContainer->SideBar->setActiveItem(this); + if (m_pContainer->m_dwFlags & CNT_SIDEBAR) + m_pContainer->m_pSideBar->setActiveItem(this); if (m_pWnd) m_pWnd->Invalidate(); @@ -235,12 +235,12 @@ void CChatRoomDlg::UpdateWindowState(UINT msg) int CChatRoomDlg::Resizer(UTILRESIZECONTROL *urc) { - bool bToolbar = !(m_pContainer->dwFlags & CNT_HIDETOOLBAR); - bool bBottomToolbar = (m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR) != 0; + bool bToolbar = !(m_pContainer->m_dwFlags & CNT_HIDETOOLBAR); + bool bBottomToolbar = (m_pContainer->m_dwFlags & CNT_BOTTOMTOOLBAR) != 0; bool bNick = m_si->iType != GCW_SERVER && m_bNicklistEnabled; bool bInfoPanel = m_pPanel.isActive(); int panelHeight = m_pPanel.getHeight() + 1; - int iSplitterX = m_pContainer->settings->iSplitterX; + int iSplitterX = m_pContainer->m_pSettings->iSplitterX; RECT rcTabs; GetClientRect(m_hwnd, &rcTabs); @@ -502,7 +502,7 @@ bool CChatRoomDlg::OnInitDialog() Chat_SetFilters(m_si); - m_iSplitterY = m_pContainer->settings->iSplitterY; + m_iSplitterY = m_pContainer->m_pSettings->iSplitterY; if (m_bIsAutosizingInput) m_iSplitterY = GetDefaultMinimumInputHeight(); @@ -608,8 +608,8 @@ void CChatRoomDlg::OnDestroy() m_pContainer->ClearMargins(); PostMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 1); - if (m_pContainer->dwFlags & CNT_SIDEBAR) - m_pContainer->SideBar->removeSession(this); + if (m_pContainer->m_dwFlags & CNT_SIDEBAR) + m_pContainer->m_pSideBar->removeSession(this); mir_free(m_enteredText); CSuper::OnDestroy(); @@ -650,7 +650,7 @@ void CChatRoomDlg::onClick_OK(CCtrlButton*) m_si->pMI->idleTimeStamp = time(0); UpdateStatusBar(); if (m_pContainer) - if (fSound && !nen_options.iNoSounds && !(m_pContainer->dwFlags & CNT_NOSOUND)) + if (fSound && !nen_options.iNoSounds && !(m_pContainer->m_dwFlags & CNT_NOSOUND)) Skin_PlaySound("ChatSent"); SetFocus(m_message.GetHwnd()); @@ -696,7 +696,7 @@ void CChatRoomDlg::onChange_Message(CCtrlEdit*) if (m_pContainer->m_hwndActive == m_hwnd) UpdateReadChars(); m_dwLastActivity = GetTickCount(); - m_pContainer->dwLastActivity = m_dwLastActivity; + m_pContainer->m_dwLastActivity = m_dwLastActivity; m_btnOk.SendMsg(BUTTONSETASNORMAL, m_message.GetRichTextLength() != 0, 0); m_btnOk.Enable(m_message.GetRichTextLength() != 0); @@ -745,14 +745,14 @@ void CChatRoomDlg::CloseTab() return; } - m_pContainer->iChilds--; + m_pContainer->m_iChilds--; int i = GetTabIndexFromHWND(m_hwndParent, m_hwnd); // after closing a tab, we need to activate the tab to the left side of // the previously open tab. // normally, this tab has the same index after the deletion of the formerly active tab // unless, of course, we closed the last (rightmost) tab. - if (!m_pContainer->bDontSmartClose && iTabs > 1) { + if (!m_pContainer->m_bDontSmartClose && iTabs > 1) { if (i == iTabs - 1) i--; else @@ -857,7 +857,7 @@ void CChatRoomDlg::UpdateOptions() void CChatRoomDlg::UpdateStatusBar() { - if (m_pContainer->m_hwndActive != m_hwnd || m_pContainer->hwndStatus == nullptr || CMimAPI::m_shutDown || m_wszStatusBar[0]) + if (m_pContainer->m_hwndActive != m_hwnd || m_pContainer->m_hwndStatus == nullptr || CMimAPI::m_shutDown || m_wszStatusBar[0]) return; if (m_si->pszModule == nullptr) @@ -869,7 +869,7 @@ void CChatRoomDlg::UpdateStatusBar() return; int x = 12; - x += Chat_GetTextPixelSize(mi->ptszModDispName, (HFONT)SendMessage(m_pContainer->hwndStatus, WM_GETFONT, 0, 0), true); + x += Chat_GetTextPixelSize(mi->ptszModDispName, (HFONT)SendMessage(m_pContainer->m_hwndStatus, WM_GETFONT, 0, 0), true); x += GetSystemMetrics(SM_CXSMICON); wchar_t szFinalStatusBarText[512]; @@ -896,7 +896,7 @@ void CChatRoomDlg::UpdateStatusBar() else wcsncpy_s(szFinalStatusBarText, mi->ptszModDispName, _TRUNCATE); } - SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)szFinalStatusBarText); + SendMessage(m_pContainer->m_hwndStatus, SB_SETTEXT, 0, (LPARAM)szFinalStatusBarText); tabUpdateStatusBar(); m_pPanel.Invalidate(); if (m_pWnd) @@ -1176,7 +1176,7 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) bool isShift, isAlt, isCtrl; KbdState(isShift, isCtrl, isAlt); - if (!isAlt && !isCtrl && !(m_pContainer->dwFlags & CNT_NOSOUND) && wParam != VK_ESCAPE && !(wParam == VK_TAB && PluginConfig.m_bAllowTab)) + if (!isAlt && !isCtrl && !(m_pContainer->m_dwFlags & CNT_NOSOUND) && wParam != VK_ESCAPE && !(wParam == VK_TAB && PluginConfig.m_bAllowTab)) Skin_PlaySound("SoundOnTyping"); if (isCtrl && !isAlt && !isShift) @@ -1867,7 +1867,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) iSplitterX = 35; if (iSplitterX > rc.right - rc.left - 35) iSplitterX = rc.right - rc.left - 35; - m_pContainer->settings->iSplitterX = iSplitterX; + m_pContainer->m_pSettings->iSplitterX = iSplitterX; Resize(); } else if ((HWND)lParam == GetDlgItem(m_hwnd, IDC_SPLITTERY) || lParam == -1) { @@ -1877,12 +1877,12 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) ScreenToClient(m_hwnd, &pt); m_iSplitterY = rc.bottom - pt.y + 3 + DPISCALEY_S(23); - int iMinHeight = DPISCALEY_S(23) + ((m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR) ? 21 : 0); + int iMinHeight = DPISCALEY_S(23) + ((m_pContainer->m_dwFlags & CNT_BOTTOMTOOLBAR) ? 21 : 0); if (m_iSplitterY < iMinHeight) m_iSplitterY = iMinHeight; if (m_iSplitterY > rc.bottom - rc.top - DPISCALEY_S(40)) m_iSplitterY = rc.bottom - rc.top - DPISCALEY_S(40); - m_pContainer->settings->iSplitterY = m_iSplitterY; + m_pContainer->m_pSettings->iSplitterY = m_iSplitterY; UpdateToolbarBG(); Resize(); } @@ -1913,7 +1913,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_ACTIVATE: case WM_MOUSEACTIVATE: if (LOWORD(wParam) != WA_ACTIVE) { - m_pContainer->hwndSaved = nullptr; + m_pContainer->m_hwndSaved = nullptr; break; } @@ -1940,7 +1940,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) if (msg == WM_SYSKEYUP) { if (wp == VK_MENU) if (!m_bkeyProcessed && !(GetKeyState(VK_CONTROL) & 0x8000) && !(GetKeyState(VK_SHIFT) & 0x8000) && !(lp & (1 << 24))) - m_pContainer->MenuBar->autoShow(); + m_pContainer->m_pMenuBar->autoShow(); return _dlgReturn(m_hwnd, 0); } @@ -1962,7 +1962,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) } if (msg == WM_LBUTTONDOWN || msg == WM_RBUTTONDOWN || msg == WM_MBUTTONDOWN) - m_pContainer->MenuBar->Cancel(); + m_pContainer->m_pMenuBar->Cancel(); if ((msg == WM_KEYDOWN || msg == WM_SYSKEYDOWN) && !(GetKeyState(VK_RMENU) & 0x8000)) { if (DM_GenericHotkeysCheck(&message)) { @@ -2026,7 +2026,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) SendMessage(((LPNMHDR)lParam)->hwndFrom, EM_EXGETSEL, 0, (LPARAM)&sel); if (sel.cpMin == sel.cpMax) { UINT msg = ((ENLINK*)lParam)->msg; - m_pContainer->MenuBar->Cancel(); + m_pContainer->m_pMenuBar->Cancel(); TEXTRANGE tr; tr.lpstrText = nullptr; @@ -2426,10 +2426,10 @@ void ShowRoom(TContainerData *pContainer, SESSION_INFO *si) if (pContainer->m_hwndActive) ShowWindow(pContainer->m_hwndActive, SW_HIDE); - int iTabIndex_wanted = M.GetDword(hContact, "tabindex", pContainer->iChilds * 100); + int iTabIndex_wanted = M.GetDword(hContact, "tabindex", pContainer->m_iChilds * 100); int iCount = TabCtrl_GetItemCount(hwndTab); - pContainer->iTabIndex = iCount; + pContainer->m_iTabIndex = iCount; if (iCount > 0) { for (int i = iCount - 1; i >= 0; i--) { HWND hwnd = GetTabWindow(hwndTab, i); @@ -2437,7 +2437,7 @@ void ShowRoom(TContainerData *pContainer, SESSION_INFO *si) if (dat) { int relPos = M.GetDword(dat->m_hContact, "tabindex", i * 100); if (iTabIndex_wanted <= relPos) - pContainer->iTabIndex = i; + pContainer->m_iTabIndex = i; } } } @@ -2445,11 +2445,11 @@ void ShowRoom(TContainerData *pContainer, SESSION_INFO *si) TCITEM item = {}; item.pszText = newcontactname; item.mask = TCIF_TEXT | TCIF_IMAGE; - int iTabId = TabCtrl_InsertItem(hwndTab, pContainer->iTabIndex, &item); + int iTabId = TabCtrl_InsertItem(hwndTab, pContainer->m_iTabIndex, &item); SendMessage(hwndTab, EM_REFRESHWITHOUTCLIP, 0, 0); TabCtrl_SetCurSel(hwndTab, iTabId); - pContainer->iChilds++; + pContainer->m_iChilds++; CChatRoomDlg *pDlg = new CChatRoomDlg(si); pDlg->m_iTabID = iTabId; @@ -2461,8 +2461,8 @@ void ShowRoom(TContainerData *pContainer, SESSION_INFO *si) item.lParam = (LPARAM)hwndNew; TabCtrl_SetItem(hwndTab, iTabId, &item); - if (pContainer->dwFlags & CNT_SIDEBAR) - pContainer->SideBar->addSession(pDlg, pContainer->iTabIndex); + if (pContainer->m_dwFlags & CNT_SIDEBAR) + pContainer->m_pSideBar->addSession(pDlg, pContainer->m_iTabIndex); SendMessage(pContainer->m_hwnd, WM_SIZE, 0, 0); // if the container is minimized, then pop it up... diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index d68931640e..61cd0cea61 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -57,6 +57,71 @@ void TContainerData::InitRedraw() ::SetTimer(m_hwnd, (UINT_PTR)this, 100, nullptr);
}
+void TContainerData::SetIcon(CTabBaseDlg *pDlg, HICON hIcon)
+{
+ HICON hIconMsg = PluginConfig.g_IconMsgEvent;
+
+ if (Win7Taskbar->haveLargeIcons()) {
+ if (hIcon == PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING] || hIcon == hIconMsg) {
+ Win7Taskbar->setOverlayIcon(m_hwnd, (LPARAM)hIcon);
+ if (GetForegroundWindow() != m_hwnd)
+ SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
+ if (hIcon == hIconMsg)
+ m_hIconTaskbarOverlay = hIconMsg;
+ return;
+ }
+
+ if (pDlg) {
+ if (pDlg->m_hTaskbarIcon != nullptr) {
+ DestroyIcon(pDlg->m_hTaskbarIcon);
+ pDlg->m_hTaskbarIcon = nullptr;
+ }
+
+ if (pDlg->m_pContainer->m_dwFlags & CNT_AVATARSONTASKBAR)
+ pDlg->m_hTaskbarIcon = pDlg->IconFromAvatar();
+
+ HICON hIconBig = (pDlg->m_cache) ? Skin_LoadProtoIcon(pDlg->m_cache->getProto(), pDlg->m_cache->getStatus(), true) : nullptr;
+ if (pDlg->m_hTaskbarIcon) {
+ SendMessage(m_hwnd, WM_SETICON, ICON_BIG, (LPARAM)pDlg->m_hTaskbarIcon);
+ SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
+ Win7Taskbar->setOverlayIcon(m_hwnd, (LPARAM)(pDlg->m_hTabIcon ? (LPARAM)pDlg->m_hTabIcon : (LPARAM)hIcon));
+ }
+ else {
+ SendMessage(m_hwnd, WM_SETICON, ICON_BIG, hIconBig ? (LPARAM)hIconBig : (LPARAM)hIcon);
+ SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
+
+ if (pDlg->m_pContainer->m_hIconTaskbarOverlay)
+ Win7Taskbar->setOverlayIcon(m_hwnd, (LPARAM)pDlg->m_pContainer->m_hIconTaskbarOverlay);
+ else if (Win7Taskbar->haveAlwaysGroupingMode() && fForceOverlayIcons)
+ Win7Taskbar->setOverlayIcon(m_hwnd, (LPARAM)hIcon);
+ else
+ Win7Taskbar->clearOverlayIcon(m_hwnd);
+ }
+ return;
+ }
+ }
+
+ // default handling (no win7 taskbar)
+ if (hIcon == PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]) { // always set typing icon, but don't save it...
+ SendMessage(m_hwnd, WM_SETICON, ICON_BIG, (LPARAM)PluginConfig.g_IconTypingEventBig);
+ SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
+ return;
+ }
+
+ HICON hIconBig = nullptr;
+ if (hIcon == hIconMsg)
+ hIconBig = Skin_LoadIcon(SKINICON_EVENT_MESSAGE, true);
+
+ if (m_hIcon == STICK_ICON_MSG && hIcon != hIconMsg && m_dwFlags & CNT_NEED_UPDATETITLE) {
+ hIcon = hIconMsg;
+ hIconBig = Skin_LoadIcon(SKINICON_EVENT_MESSAGE, true);
+ }
+ SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
+ if (nullptr != hIconBig && reinterpret_cast<HICON>(CALLSERVICE_NOTFOUND) != hIconBig)
+ SendMessage(m_hwnd, WM_SETICON, ICON_BIG, LPARAM(hIconBig));
+ m_hIcon = (hIcon == hIconMsg) ? STICK_ICON_MSG : 0;
+}
+
void TContainerData::UpdateTabs()
{
HWND hwndTab = GetDlgItem(m_hwnd, IDC_MSGTABS);
@@ -74,29 +139,31 @@ void TContainerData::UpdateTabs() void TContainerData::UpdateTitle(MCONTACT hContact, CTabBaseDlg *pDlg)
{
- if (pDlg) { // lParam != 0 means sent by a chat window
+ // pDlg != 0 means sent by a chat window
+ if (pDlg) {
wchar_t szText[512];
GetWindowText(pDlg->GetHwnd(), szText, _countof(szText));
szText[_countof(szText) - 1] = 0;
SetWindowText(m_hwnd, szText);
- SendMessage(m_hwnd, DM_SETICON, (WPARAM)pDlg, (LPARAM)(pDlg->m_hTabIcon != pDlg->m_hTabStatusIcon ? pDlg->m_hTabIcon : pDlg->m_hTabStatusIcon));
+ SetIcon(pDlg, (pDlg->m_hTabIcon != pDlg->m_hTabStatusIcon) ? pDlg->m_hTabIcon : pDlg->m_hTabStatusIcon);
return;
}
- CTabBaseDlg *dat = nullptr;
- if (hContact == 0) { // no hContact given - obtain the hContact for the active tab
+ // no hContact given - obtain the hContact for the active tab
+ if (hContact == 0) {
if (m_hwndActive && IsWindow(m_hwndActive))
- dat = (CTabBaseDlg*)GetWindowLongPtr(m_hwndActive, GWLP_USERDATA);
+ pDlg = (CTabBaseDlg*)GetWindowLongPtr(m_hwndActive, GWLP_USERDATA);
}
else {
HWND hwnd = Srmm_FindWindow(hContact);
if (hwnd != nullptr)
- dat = (CTabBaseDlg*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ pDlg = (CTabBaseDlg*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
}
- if (dat) {
- SendMessage(m_hwnd, DM_SETICON, (WPARAM)dat, (LPARAM)(dat->m_hXStatusIcon ? dat->m_hXStatusIcon : dat->m_hTabStatusIcon));
+
+ if (pDlg) {
+ SetIcon(pDlg, pDlg->m_hXStatusIcon ? pDlg->m_hXStatusIcon : pDlg->m_hTabStatusIcon);
CMStringW szTitle;
- if (dat->FormatTitleBar(settings->szTitleFormat, szTitle))
+ if (pDlg->FormatTitleBar(m_pSettings->szTitleFormat, szTitle))
SetWindowText(m_hwnd, szTitle);
}
}
@@ -111,7 +178,7 @@ void TSAPI SetAeroMargins(TContainerData *pContainer) return;
if (!M.isAero() || CSkin::m_skinEnabled) {
- pContainer->MenuBar->setAero(false);
+ pContainer->m_pMenuBar->setAero(false);
return;
}
@@ -130,21 +197,21 @@ void TSAPI SetAeroMargins(TContainerData *pContainer) MARGINS m;
m.cyTopHeight = pt.y;
- pContainer->MenuBar->setAero(true);
+ pContainer->m_pMenuBar->setAero(true);
// bottom part
GetWindowRect(dat->GetHwnd(), &rcWnd);
pt.x = rcWnd.left;
LONG sbar_left, sbar_right;
- if (!pContainer->SideBar->isActive()) {
- pt.y = rcWnd.bottom + ((pContainer->iChilds > 1 || !(pContainer->dwFlags & CNT_HIDETABS)) ? pContainer->tBorder : 0);
+ if (!pContainer->m_pSideBar->isActive()) {
+ pt.y = rcWnd.bottom + ((pContainer->m_iChilds > 1 || !(pContainer->m_dwFlags & CNT_HIDETABS)) ? pContainer->m_tBorder : 0);
sbar_left = 0, sbar_right = 0;
}
else {
pt.y = rcWnd.bottom;
- sbar_left = (pContainer->SideBar->getFlags() & CSideBar::SIDEBARORIENTATION_LEFT ? pContainer->SideBar->getWidth() : 0);
- sbar_right = (pContainer->SideBar->getFlags() & CSideBar::SIDEBARORIENTATION_RIGHT ? pContainer->SideBar->getWidth() : 0);
+ sbar_left = (pContainer->m_pSideBar->getFlags() & CSideBar::SIDEBARORIENTATION_LEFT ? pContainer->m_pSideBar->getWidth() : 0);
+ sbar_right = (pContainer->m_pSideBar->getFlags() & CSideBar::SIDEBARORIENTATION_RIGHT ? pContainer->m_pSideBar->getWidth() : 0);
}
ScreenToClient(pContainer->m_hwnd, &pt);
GetClientRect(pContainer->m_hwnd, &rcWnd);
@@ -153,13 +220,13 @@ void TSAPI SetAeroMargins(TContainerData *pContainer) if (m.cyBottomHeight < 0 || m.cyBottomHeight >= rcWnd.bottom)
m.cyBottomHeight = 0;
- m.cxLeftWidth = pContainer->tBorder_outer_left;
- m.cxRightWidth = pContainer->tBorder_outer_right;
+ m.cxLeftWidth = pContainer->m_tBorder_outer_left;
+ m.cxRightWidth = pContainer->m_tBorder_outer_right;
m.cxLeftWidth += sbar_left;
m.cxRightWidth += sbar_right;
- if (memcmp(&m, &pContainer->mOld, sizeof(MARGINS)) != 0) {
- pContainer->mOld = m;
+ if (memcmp(&m, &pContainer->m_mOld, sizeof(MARGINS)) != 0) {
+ pContainer->m_mOld = m;
CMimAPI::m_pfnDwmExtendFrameIntoClientArea(pContainer->m_hwnd, &m);
}
}
@@ -176,7 +243,7 @@ static LRESULT CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, HDC dcFrame = GetDCEx(hwndDlg, nullptr, DCX_WINDOW |/*DCX_INTERSECTRGN|*/0x10000); // GetWindowDC(hwndDlg);
LONG clip_top, clip_left;
RECT rcText;
- HDC dcMem = CreateCompatibleDC(pContainer->cachedDC ? pContainer->cachedDC : dcFrame);
+ HDC dcMem = CreateCompatibleDC(pContainer->m_cachedDC ? pContainer->m_cachedDC : dcFrame);
RECT rcWindow, rcClient;
POINT pt, pt1;
@@ -201,7 +268,7 @@ static LRESULT CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, ExcludeClipRect(dcFrame, clip_left, clip_top, clip_left + (pt1.x - pt.x), clip_top + (pt1.y - pt.y));
ExcludeClipRect(dcMem, clip_left, clip_top, clip_left + (pt1.x - pt.x), clip_top + (pt1.y - pt.y));
- CSkin::DrawItem(dcMem, &rcWindow, &SkinItems[pContainer->ncActive ? ID_EXTBKFRAME : ID_EXTBKFRAMEINACTIVE]);
+ CSkin::DrawItem(dcMem, &rcWindow, &SkinItems[pContainer->m_ncActive ? ID_EXTBKFRAME : ID_EXTBKFRAMEINACTIVE]);
wchar_t szWindowText[512];
GetWindowText(hwndDlg, szWindowText, _countof(szWindowText));
@@ -226,17 +293,17 @@ static LRESULT CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, DrawIconEx(dcMem, 4 + CSkin::m_SkinnedFrame_left + CSkin::m_bClipBorder + CSkin::m_titleBarLeftOff, rcText.top + (rcText.bottom - rcText.top) / 2 - 8, hIcon, 16, 16, 0, nullptr, DI_NORMAL);
// title buttons
- pContainer->rcClose.top = pContainer->rcMin.top = pContainer->rcMax.top = CSkin::m_titleButtonTopOff;
- pContainer->rcClose.bottom = pContainer->rcMin.bottom = pContainer->rcMax.bottom = CSkin::m_titleButtonTopOff + CSkin::m_titleBarButtonSize.cy;
+ pContainer->m_rcClose.top = pContainer->m_rcMin.top = pContainer->m_rcMax.top = CSkin::m_titleButtonTopOff;
+ pContainer->m_rcClose.bottom = pContainer->m_rcMin.bottom = pContainer->m_rcMax.bottom = CSkin::m_titleButtonTopOff + CSkin::m_titleBarButtonSize.cy;
- pContainer->rcClose.right = rcWindow.right - 10 - CSkin::m_titleBarRightOff;
- pContainer->rcClose.left = pContainer->rcClose.right - CSkin::m_titleBarButtonSize.cx;
+ pContainer->m_rcClose.right = rcWindow.right - 10 - CSkin::m_titleBarRightOff;
+ pContainer->m_rcClose.left = pContainer->m_rcClose.right - CSkin::m_titleBarButtonSize.cx;
- pContainer->rcMax.right = pContainer->rcClose.left - 2;
- pContainer->rcMax.left = pContainer->rcMax.right - CSkin::m_titleBarButtonSize.cx;
+ pContainer->m_rcMax.right = pContainer->m_rcClose.left - 2;
+ pContainer->m_rcMax.left = pContainer->m_rcMax.right - CSkin::m_titleBarButtonSize.cx;
- pContainer->rcMin.right = pContainer->rcMax.left - 2;
- pContainer->rcMin.left = pContainer->rcMin.right - CSkin::m_titleBarButtonSize.cx;
+ pContainer->m_rcMin.right = pContainer->m_rcMax.left - 2;
+ pContainer->m_rcMin.left = pContainer->m_rcMin.right - CSkin::m_titleBarButtonSize.cx;
CSkinItem *item_normal = &SkinItems[ID_EXTBKTITLEBUTTON];
CSkinItem *item_hot = &SkinItems[ID_EXTBKTITLEBUTTONMOUSEOVER];
@@ -247,20 +314,20 @@ static LRESULT CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, switch (i) {
case 0:
- pRect = &pContainer->rcMin;
+ pRect = &pContainer->m_rcMin;
hIcon = CSkin::m_minIcon;
break;
case 1:
- pRect = &pContainer->rcMax;
+ pRect = &pContainer->m_rcMax;
hIcon = CSkin::m_maxIcon;
break;
case 2:
- pRect = &pContainer->rcClose;
+ pRect = &pContainer->m_rcClose;
hIcon = CSkin::m_closeIcon;
break;
}
if (pRect) {
- CSkinItem *item = pContainer->buttons[i].isPressed ? item_pressed : (pContainer->buttons[i].isHot ? item_hot : item_normal);
+ CSkinItem *item = pContainer->m_buttons[i].isPressed ? item_pressed : (pContainer->m_buttons[i].isHot ? item_hot : item_normal);
CSkin::DrawItem(dcMem, pRect, item);
DrawIconEx(dcMem, pRect->left + ((pRect->right - pRect->left) / 2 - 8), pRect->top + ((pRect->bottom - pRect->top) / 2 - 8), hIcon, 16, 16, 0, nullptr, DI_NORMAL);
}
@@ -281,24 +348,24 @@ static LRESULT CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, GetClientRect(hwndDlg, &rcClient);
int width = rcClient.right - rcClient.left;
int height = rcClient.bottom - rcClient.top;
- if (width != pContainer->oldDCSize.cx || height != pContainer->oldDCSize.cy) {
+ if (width != pContainer->m_oldDCSize.cx || height != pContainer->m_oldDCSize.cy) {
CSkinItem *sbaritem = &SkinItems[ID_EXTBKSTATUSBAR];
- BOOL statusBarSkinnd = !(pContainer->dwFlags & CNT_NOSTATUSBAR) && !sbaritem->IGNORED;
- LONG sbarDelta = statusBarSkinnd ? pContainer->statusBarHeight : 0;
+ BOOL statusBarSkinnd = !(pContainer->m_dwFlags & CNT_NOSTATUSBAR) && !sbaritem->IGNORED;
+ LONG sbarDelta = statusBarSkinnd ? pContainer->m_statusBarHeight : 0;
- pContainer->oldDCSize.cx = width;
- pContainer->oldDCSize.cy = height;
+ pContainer->m_oldDCSize.cx = width;
+ pContainer->m_oldDCSize.cy = height;
- if (pContainer->cachedDC) {
- SelectObject(pContainer->cachedDC, pContainer->oldHBM);
- DeleteObject(pContainer->cachedHBM);
- DeleteDC(pContainer->cachedDC);
+ if (pContainer->m_cachedDC) {
+ SelectObject(pContainer->m_cachedDC, pContainer->m_oldHBM);
+ DeleteObject(pContainer->m_cachedHBM);
+ DeleteDC(pContainer->m_cachedDC);
}
- pContainer->cachedDC = CreateCompatibleDC(hdcReal);
- pContainer->cachedHBM = CreateCompatibleBitmap(hdcReal, width, height);
- pContainer->oldHBM = (HBITMAP)SelectObject(pContainer->cachedDC, pContainer->cachedHBM);
+ pContainer->m_cachedDC = CreateCompatibleDC(hdcReal);
+ pContainer->m_cachedHBM = CreateCompatibleBitmap(hdcReal, width, height);
+ pContainer->m_oldHBM = (HBITMAP)SelectObject(pContainer->m_cachedDC, pContainer->m_cachedHBM);
- HDC hdc = pContainer->cachedDC;
+ HDC hdc = pContainer->m_cachedDC;
if (!CSkin::DrawItem(hdc, &rcClient, &SkinItems[0]))
FillRect(hdc, &rcClient, GetSysColorBrush(COLOR_3DFACE));
@@ -307,7 +374,7 @@ static LRESULT CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, CSkin::DrawItem(hdc, &rcClient, sbaritem);
}
}
- BitBlt(hdcReal, 0, 0, width, height, pContainer->cachedDC, 0, 0, SRCCOPY);
+ BitBlt(hdcReal, 0, 0, width, height, pContainer->m_cachedDC, 0, 0, SRCCOPY);
EndPaint(hwndDlg, &ps);
return 0;
}
@@ -324,34 +391,34 @@ static LRESULT CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, RECT rcWindow;
GetWindowRect(hwndDlg, &rcWindow);
- memcpy(&pContainer->oldbuttons[0], &pContainer->buttons[0], sizeof(TitleBtn) * 3);
- memset(&pContainer->buttons[0], 0, (sizeof(TitleBtn) * 3));
+ memcpy(&pContainer->m_oldbuttons[0], &pContainer->m_buttons[0], sizeof(TitleBtn) * 3);
+ memset(&pContainer->m_buttons[0], 0, (sizeof(TitleBtn) * 3));
- if (pt.x >= (rcWindow.left + pContainer->rcMin.left) && pt.x <= (rcWindow.left + pContainer->rcClose.right) && pt.y < rcWindow.top + 24 && wParam != HTTOPRIGHT) {
+ if (pt.x >= (rcWindow.left + pContainer->m_rcMin.left) && pt.x <= (rcWindow.left + pContainer->m_rcClose.right) && pt.y < rcWindow.top + 24 && wParam != HTTOPRIGHT) {
LRESULT result = 0; //DefWindowProc(hwndDlg, msg, wParam, lParam);
HDC hdc = GetWindowDC(hwndDlg);
LONG left = rcWindow.left;
pt.y = 10;
- bool isMin = pt.x >= left + pContainer->rcMin.left && pt.x <= left + pContainer->rcMin.right;
- bool isMax = pt.x >= left + pContainer->rcMax.left && pt.x <= left + pContainer->rcMax.right;
- bool isClose = pt.x >= left + pContainer->rcClose.left && pt.x <= left + pContainer->rcClose.right;
+ bool isMin = pt.x >= left + pContainer->m_rcMin.left && pt.x <= left + pContainer->m_rcMin.right;
+ bool isMax = pt.x >= left + pContainer->m_rcMax.left && pt.x <= left + pContainer->m_rcMax.right;
+ bool isClose = pt.x >= left + pContainer->m_rcClose.left && pt.x <= left + pContainer->m_rcClose.right;
if (msg == WM_NCMOUSEMOVE) {
if (isMax)
- pContainer->buttons[BTN_MAX].isHot = TRUE;
+ pContainer->m_buttons[BTN_MAX].isHot = TRUE;
else if (isMin)
- pContainer->buttons[BTN_MIN].isHot = TRUE;
+ pContainer->m_buttons[BTN_MIN].isHot = TRUE;
else if (isClose)
- pContainer->buttons[BTN_CLOSE].isHot = TRUE;
+ pContainer->m_buttons[BTN_CLOSE].isHot = TRUE;
}
else if (msg == WM_NCLBUTTONDOWN) {
if (isMax)
- pContainer->buttons[BTN_MAX].isPressed = TRUE;
+ pContainer->m_buttons[BTN_MAX].isPressed = TRUE;
else if (isMin)
- pContainer->buttons[BTN_MIN].isPressed = TRUE;
+ pContainer->m_buttons[BTN_MIN].isPressed = TRUE;
else if (isClose)
- pContainer->buttons[BTN_CLOSE].isPressed = TRUE;
+ pContainer->m_buttons[BTN_CLOSE].isPressed = TRUE;
}
else if (msg == WM_NCLBUTTONUP) {
if (isMin)
@@ -366,28 +433,28 @@ static LRESULT CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, PostMessage(hwndDlg, WM_SYSCOMMAND, SC_CLOSE, 0);
}
for (int i = 0; i < 3; i++) {
- if (pContainer->buttons[i].isHot != pContainer->oldbuttons[i].isHot) {
+ if (pContainer->m_buttons[i].isHot != pContainer->m_oldbuttons[i].isHot) {
RECT *rc;
HICON hIcon;
switch (i) {
case 0:
- rc = &pContainer->rcMin;
+ rc = &pContainer->m_rcMin;
hIcon = CSkin::m_minIcon;
break;
case 1:
- rc = &pContainer->rcMax;
+ rc = &pContainer->m_rcMax;
hIcon = CSkin::m_maxIcon;
break;
case 2:
- rc = &pContainer->rcClose;
+ rc = &pContainer->m_rcClose;
hIcon = CSkin::m_closeIcon;
break;
default:
continue; // shall never happen
}
if (rc) {
- CSkinItem *item = &SkinItems[pContainer->buttons[i].isPressed ? ID_EXTBKTITLEBUTTONPRESSED : (pContainer->buttons[i].isHot ? ID_EXTBKTITLEBUTTONMOUSEOVER : ID_EXTBKTITLEBUTTON)];
+ CSkinItem *item = &SkinItems[pContainer->m_buttons[i].isPressed ? ID_EXTBKTITLEBUTTONPRESSED : (pContainer->m_buttons[i].isHot ? ID_EXTBKTITLEBUTTONMOUSEOVER : ID_EXTBKTITLEBUTTON)];
CSkin::DrawItem(hdc, rc, item);
DrawIconEx(hdc, rc->left + ((rc->right - rc->left) / 2 - 8), rc->top + ((rc->bottom - rc->top) / 2 - 8), hIcon, 16, 16, 0, nullptr, DI_NORMAL);
}
@@ -432,7 +499,7 @@ static LRESULT CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, case WM_NCACTIVATE:
if (pContainer) {
- pContainer->ncActive = wParam;
+ pContainer->m_ncActive = wParam;
if (bSkinned && CSkin::m_frameSkins) {
SendMessage(hwndDlg, WM_NCPAINT, 0, 0);
return 1;
@@ -450,7 +517,7 @@ static LRESULT CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, break;
case WM_NCHITTEST:
- if (pContainer && (pContainer->dwFlags & CNT_NOTITLE)) {
+ if (pContainer && (pContainer->m_dwFlags & CNT_NOTITLE)) {
RECT r;
GetWindowRect(hwndDlg, &r);
@@ -482,10 +549,10 @@ static LRESULT CALLBACK ContainerWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, break;
case WM_TIMER:
- if (wParam == (WPARAM)pContainer && pContainer->hwndStatus) {
+ if (wParam == (WPARAM)pContainer && pContainer->m_hwndStatus) {
SendMessage(pContainer->m_hwnd, WM_SIZE, 0, 0);
- SendMessage(pContainer->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW) | 2, 0);
- InvalidateRect(pContainer->hwndStatus, nullptr, TRUE);
+ SendMessage(pContainer->m_hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW) | 2, 0);
+ InvalidateRect(pContainer->m_hwndStatus, nullptr, TRUE);
KillTimer(hwndDlg, wParam);
}
break;
@@ -524,21 +591,21 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, pContainer->m_hwnd = hwndDlg;
{
- DWORD dwCreateFlags = pContainer->dwFlags;
- pContainer->isCloned = (dwCreateFlags & CNT_CREATE_CLONED);
- pContainer->fPrivateThemeChanged = FALSE;
+ DWORD dwCreateFlags = pContainer->m_dwFlags;
+ pContainer->m_isCloned = (dwCreateFlags & CNT_CREATE_CLONED);
+ pContainer->m_fPrivateThemeChanged = FALSE;
SendMessage(hwndDlg, DM_OPTIONSAPPLIED, 0, 0); // set options...
- pContainer->dwFlags |= dwCreateFlags;
+ pContainer->m_dwFlags |= dwCreateFlags;
LoadOverrideTheme(pContainer);
DWORD ws = GetWindowLongPtr(hwndTab, GWL_STYLE);
- if (pContainer->dwFlagsEx & TCF_FLAT)
+ if (pContainer->m_dwFlagsEx & TCF_FLAT)
ws |= TCS_BUTTONS;
pContainer->ClearMargins();
- if (pContainer->dwFlagsEx & TCF_SINGLEROWTABCONTROL) {
+ if (pContainer->m_dwFlagsEx & TCF_SINGLEROWTABCONTROL) {
ws &= ~TCS_MULTILINE;
ws |= TCS_SINGLELINE;
ws |= TCS_FIXEDWIDTH;
@@ -551,13 +618,13 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, }
SetWindowLongPtr(hwndTab, GWL_STYLE, ws);
- pContainer->buttonItems = g_ButtonSet.items;
+ pContainer->m_buttonItems = g_ButtonSet.items;
- pContainer->dwFlags = ((pContainer->dwFlagsEx & (TCF_SBARLEFT | TCF_SBARRIGHT)) ?
- pContainer->dwFlags | CNT_SIDEBAR : pContainer->dwFlags & ~CNT_SIDEBAR);
+ pContainer->m_dwFlags = ((pContainer->m_dwFlagsEx & (TCF_SBARLEFT | TCF_SBARRIGHT)) ?
+ pContainer->m_dwFlags | CNT_SIDEBAR : pContainer->m_dwFlags & ~CNT_SIDEBAR);
- pContainer->SideBar = new CSideBar(pContainer);
- pContainer->MenuBar = new CMenuBar(hwndDlg, pContainer);
+ pContainer->m_pSideBar = new CSideBar(pContainer);
+ pContainer->m_pMenuBar = new CMenuBar(hwndDlg, pContainer);
SetClassLongPtr(hwndDlg, GCL_STYLE, GetClassLongPtr(hwndDlg, GCL_STYLE) & ~(CS_VREDRAW | CS_HREDRAW));
SetClassLongPtr(hwndTab, GCL_STYLE, GetClassLongPtr(hwndTab, GCL_STYLE) & ~(CS_VREDRAW | CS_HREDRAW));
@@ -582,11 +649,11 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, ws = GetWindowLongPtr(hwndTab, GWL_EXSTYLE);
SetWindowLongPtr(hwndTab, GWL_EXSTYLE, ws | WS_EX_CONTROLPARENT);
- LONG x_pad = M.GetByte("x-pad", 3) + (pContainer->dwFlagsEx & TCF_CLOSEBUTTON ? 7 : 0);
- LONG y_pad = M.GetByte("y-pad", 3) + ((pContainer->dwFlags & CNT_TABSBOTTOM) ? 1 : 0);
+ LONG x_pad = M.GetByte("x-pad", 3) + (pContainer->m_dwFlagsEx & TCF_CLOSEBUTTON ? 7 : 0);
+ LONG y_pad = M.GetByte("y-pad", 3) + ((pContainer->m_dwFlags & CNT_TABSBOTTOM) ? 1 : 0);
- if (pContainer->dwFlagsEx & TCF_FLAT)
- y_pad++; //(pContainer->dwFlags & CNT_TABSBOTTOM ? 1 : 2);
+ if (pContainer->m_dwFlagsEx & TCF_FLAT)
+ y_pad++; //(pContainer->m_dwFlags & CNT_TABSBOTTOM ? 1 : 2);
TabCtrl_SetPadding(hwndTab, x_pad, y_pad);
@@ -606,19 +673,19 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, }
else pContainer->m_hwndTip = nullptr;
- if (pContainer->dwFlags & CNT_CREATE_MINIMIZED) {
+ if (pContainer->m_dwFlags & CNT_CREATE_MINIMIZED) {
WINDOWPLACEMENT wp = { 0 };
wp.length = sizeof(wp);
SetWindowLongPtr(hwndDlg, GWL_STYLE, GetWindowLongPtr(hwndDlg, GWL_STYLE) & ~WS_VISIBLE);
ShowWindow(hwndDlg, SW_SHOWMINNOACTIVE);
SendMessage(hwndDlg, DM_RESTOREWINDOWPOS, 0, 0);
- //GetClientRect(hwndDlg, &pContainer->rcSaved);
+ //GetClientRect(hwndDlg, &pContainer->m_rcSaved);
ShowWindow(hwndDlg, SW_SHOWMINNOACTIVE);
GetWindowPlacement(hwndDlg, &wp);
- pContainer->rcSaved.left = pContainer->rcSaved.top = 0;
- pContainer->rcSaved.right = wp.rcNormalPosition.right - wp.rcNormalPosition.left;
- pContainer->rcSaved.bottom = wp.rcNormalPosition.bottom - wp.rcNormalPosition.top;
+ pContainer->m_rcSaved.left = pContainer->m_rcSaved.top = 0;
+ pContainer->m_rcSaved.right = wp.rcNormalPosition.right - wp.rcNormalPosition.left;
+ pContainer->m_rcSaved.bottom = wp.rcNormalPosition.bottom - wp.rcNormalPosition.top;
}
else {
SendMessage(hwndDlg, DM_RESTOREWINDOWPOS, 0, 0);
@@ -635,23 +702,23 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, case DM_RESTOREWINDOWPOS:
// retrieve the container window geometry information from the database.
- if (pContainer->isCloned && pContainer->hContactFrom != 0 && !(pContainer->dwFlags & CNT_GLOBALSIZE)) {
- if (Utils_RestoreWindowPosition(hwndDlg, pContainer->hContactFrom, SRMSGMOD_T, "split")) {
- if (Utils_RestoreWindowPositionNoMove(hwndDlg, pContainer->hContactFrom, SRMSGMOD_T, "split"))
+ if (pContainer->m_isCloned && pContainer->m_hContactFrom != 0 && !(pContainer->m_dwFlags & CNT_GLOBALSIZE)) {
+ if (Utils_RestoreWindowPosition(hwndDlg, pContainer->m_hContactFrom, SRMSGMOD_T, "split")) {
+ if (Utils_RestoreWindowPositionNoMove(hwndDlg, pContainer->m_hContactFrom, SRMSGMOD_T, "split"))
if (Utils_RestoreWindowPosition(hwndDlg, 0, SRMSGMOD_T, "split"))
if (Utils_RestoreWindowPositionNoMove(hwndDlg, 0, SRMSGMOD_T, "split"))
SetWindowPos(hwndDlg, nullptr, 50, 50, 450, 300, SWP_NOZORDER | SWP_NOACTIVATE);
}
}
else {
- if (pContainer->dwFlags & CNT_GLOBALSIZE) {
+ if (pContainer->m_dwFlags & CNT_GLOBALSIZE) {
if (Utils_RestoreWindowPosition(hwndDlg, 0, SRMSGMOD_T, "split"))
if (Utils_RestoreWindowPositionNoMove(hwndDlg, 0, SRMSGMOD_T, "split"))
SetWindowPos(hwndDlg, nullptr, 50, 50, 450, 300, SWP_NOZORDER | SWP_NOACTIVATE);
}
else {
char szCName[CONTAINER_NAMELEN + 20];
- mir_snprintf(szCName, "%s%d", CONTAINER_PREFIX, pContainer->iContainerIndex);
+ mir_snprintf(szCName, "%s%d", CONTAINER_PREFIX, pContainer->m_iContainerIndex);
if (Utils_RestoreWindowPosition(hwndDlg, 0, SRMSGMOD_T, szCName)) {
if (Utils_RestoreWindowPositionNoMove(hwndDlg, 0, SRMSGMOD_T, szCName))
if (Utils_RestoreWindowPosition(hwndDlg, 0, SRMSGMOD_T, "split"))
@@ -664,51 +731,51 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, case WM_SIZE:
if (IsIconic(hwndDlg))
- pContainer->dwFlags |= CNT_DEFERREDSIZEREQUEST;
+ pContainer->m_dwFlags |= CNT_DEFERREDSIZEREQUEST;
else {
RECT rcClient, rcUnadjusted;
GetClientRect(hwndDlg, &rcClient);
- pContainer->MenuBar->getClientRect();
+ pContainer->m_pMenuBar->getClientRect();
- if (pContainer->hwndStatus) {
+ if (pContainer->m_hwndStatus) {
dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
- SendMessage(pContainer->hwndStatus, WM_USER + 101, 0, (LPARAM)dat);
+ SendMessage(pContainer->m_hwndStatus, WM_USER + 101, 0, (LPARAM)dat);
RECT rcs;
- GetWindowRect(pContainer->hwndStatus, &rcs);
- pContainer->statusBarHeight = (rcs.bottom - rcs.top) + 1;
- SendMessage(pContainer->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW) | 2, 0);
+ GetWindowRect(pContainer->m_hwndStatus, &rcs);
+ pContainer->m_statusBarHeight = (rcs.bottom - rcs.top) + 1;
+ SendMessage(pContainer->m_hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW) | 2, 0);
}
- else pContainer->statusBarHeight = 0;
+ else pContainer->m_statusBarHeight = 0;
- CopyRect(&pContainer->rcSaved, &rcClient);
+ CopyRect(&pContainer->m_rcSaved, &rcClient);
rcUnadjusted = rcClient;
- pContainer->MenuBar->Resize(LOWORD(lParam));
- LONG rebarHeight = pContainer->MenuBar->getHeight();
- pContainer->MenuBar->Show((pContainer->dwFlags & CNT_NOMENUBAR) ? SW_HIDE : SW_SHOW);
+ pContainer->m_pMenuBar->Resize(LOWORD(lParam));
+ LONG rebarHeight = pContainer->m_pMenuBar->getHeight();
+ pContainer->m_pMenuBar->Show((pContainer->m_dwFlags & CNT_NOMENUBAR) ? SW_HIDE : SW_SHOW);
- LONG sbarWidth = pContainer->SideBar->getWidth();
- LONG sbarWidth_left = pContainer->SideBar->getFlags() & CSideBar::SIDEBARORIENTATION_LEFT ? sbarWidth : 0;
+ LONG sbarWidth = pContainer->m_pSideBar->getWidth();
+ LONG sbarWidth_left = pContainer->m_pSideBar->getFlags() & CSideBar::SIDEBARORIENTATION_LEFT ? sbarWidth : 0;
if (lParam) {
DWORD dwSWPFlags = SWP_NOACTIVATE | SWP_NOZORDER | SWP_DEFERERASE | SWP_NOCOPYBITS; // | SWP_NOSENDCHANGING | SWP_ASYNCWINDOWPOS;
- SetWindowPos(hwndTab, nullptr, pContainer->tBorder_outer_left + sbarWidth_left, pContainer->tBorder_outer_top + rebarHeight,
- (rcClient.right - rcClient.left) - (pContainer->tBorder_outer_left + pContainer->tBorder_outer_right + sbarWidth),
- (rcClient.bottom - rcClient.top) - pContainer->statusBarHeight - (pContainer->tBorder_outer_top + pContainer->tBorder_outer_bottom) - rebarHeight, dwSWPFlags);
+ SetWindowPos(hwndTab, nullptr, pContainer->m_tBorder_outer_left + sbarWidth_left, pContainer->m_tBorder_outer_top + rebarHeight,
+ (rcClient.right - rcClient.left) - (pContainer->m_tBorder_outer_left + pContainer->m_tBorder_outer_right + sbarWidth),
+ (rcClient.bottom - rcClient.top) - pContainer->m_statusBarHeight - (pContainer->m_tBorder_outer_top + pContainer->m_tBorder_outer_bottom) - rebarHeight, dwSWPFlags);
}
- pContainer->SideBar->resizeScrollWnd(sbarWidth_left ? pContainer->tBorder_outer_left : rcClient.right - pContainer->tBorder_outer_right - (sbarWidth - 2),
- pContainer->tBorder_outer_top + rebarHeight, 0,
- (rcClient.bottom - rcClient.top) - pContainer->statusBarHeight - (pContainer->tBorder_outer_top + pContainer->tBorder_outer_bottom) - rebarHeight);
+ pContainer->m_pSideBar->resizeScrollWnd(sbarWidth_left ? pContainer->m_tBorder_outer_left : rcClient.right - pContainer->m_tBorder_outer_right - (sbarWidth - 2),
+ pContainer->m_tBorder_outer_top + rebarHeight, 0,
+ (rcClient.bottom - rcClient.top) - pContainer->m_statusBarHeight - (pContainer->m_tBorder_outer_top + pContainer->m_tBorder_outer_bottom) - rebarHeight);
AdjustTabClientRect(pContainer, &rcClient);
- BOOL sizeChanged = (((rcClient.right - rcClient.left) != pContainer->preSIZE.cx) || ((rcClient.bottom - rcClient.top) != pContainer->preSIZE.cy));
+ BOOL sizeChanged = (((rcClient.right - rcClient.left) != pContainer->m_preSIZE.cx) || ((rcClient.bottom - rcClient.top) != pContainer->m_preSIZE.cy));
if (sizeChanged) {
- pContainer->preSIZE.cx = rcClient.right - rcClient.left;
- pContainer->preSIZE.cy = rcClient.bottom - rcClient.top;
+ pContainer->m_preSIZE.cx = rcClient.right - rcClient.left;
+ pContainer->m_preSIZE.cy = rcClient.bottom - rcClient.top;
}
// we care about all client sessions, but we really resize only the active tab (hwndActive)
@@ -721,7 +788,7 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, if (hDlg == pContainer->m_hwndActive) {
SetWindowPos(hDlg, nullptr, rcClient.left, rcClient.top, (rcClient.right - rcClient.left), (rcClient.bottom - rcClient.top),
SWP_NOSENDCHANGING | SWP_NOACTIVATE/*|SWP_NOCOPYBITS*/);
- if (!pContainer->bSizingLoop && sizeChanged) {
+ if (!pContainer->m_bSizingLoop && sizeChanged) {
dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
if (dat)
dat->DM_ScrollToBottom(0, 1);
@@ -730,15 +797,15 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, else if (sizeChanged)
SendMessage(hDlg, DM_CHECKSIZE, 0, 0);
}
- pContainer->SideBar->scrollIntoView();
+ pContainer->m_pSideBar->scrollIntoView();
if (!M.isAero()) { // aero mode uses buffered paint, no forced redraw needed
- RedrawWindow(hwndTab, nullptr, nullptr, RDW_INVALIDATE | (pContainer->bSizingLoop ? RDW_ERASE : 0));
- RedrawWindow(hwndDlg, nullptr, nullptr, (bSkinned ? RDW_FRAME : 0) | RDW_INVALIDATE | ((pContainer->bSizingLoop || wParam == SIZE_RESTORED) ? RDW_ERASE : 0));
+ RedrawWindow(hwndTab, nullptr, nullptr, RDW_INVALIDATE | (pContainer->m_bSizingLoop ? RDW_ERASE : 0));
+ RedrawWindow(hwndDlg, nullptr, nullptr, (bSkinned ? RDW_FRAME : 0) | RDW_INVALIDATE | ((pContainer->m_bSizingLoop || wParam == SIZE_RESTORED) ? RDW_ERASE : 0));
}
- if (pContainer->hwndStatus)
- InvalidateRect(pContainer->hwndStatus, nullptr, FALSE);
+ if (pContainer->m_hwndStatus)
+ InvalidateRect(pContainer->m_hwndStatus, nullptr, FALSE);
if ((CSkin::m_bClipBorder != 0 || CSkin::m_bRoundedCorner) && CSkin::m_frameSkins) {
HRGN rgn;
@@ -762,15 +829,15 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, case WM_NOTIFY:
if (pContainer == nullptr)
break;
- if (pContainer->MenuBar) {
- LRESULT processed = pContainer->MenuBar->processMsg(msg, wParam, lParam);
+ if (pContainer->m_pMenuBar) {
+ LRESULT processed = pContainer->m_pMenuBar->processMsg(msg, wParam, lParam);
if (processed != -1) {
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, processed);
return(processed);
}
}
- if (pContainer->hwndStatus != nullptr && ((LPNMHDR)lParam)->hwndFrom == pContainer->hwndStatus) {
+ if (pContainer->m_hwndStatus != nullptr && ((LPNMHDR)lParam)->hwndFrom == pContainer->m_hwndStatus) {
switch (((LPNMHDR)lParam)->code) {
case NM_CLICK:
case NM_RCLICK:
@@ -778,7 +845,7 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, int nPanel;
if (nm->dwItemSpec == 0xFFFFFFFE) {
nPanel = 2;
- SendMessage(pContainer->hwndStatus, SB_GETRECT, nPanel, (LPARAM)&rc);
+ SendMessage(pContainer->m_hwndStatus, SB_GETRECT, nPanel, (LPARAM)&rc);
if (nm->pt.x > rc.left && nm->pt.x < rc.right)
goto panel_found;
else
@@ -788,7 +855,7 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, panel_found:
if (nPanel == 2) {
dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
- SendMessage(pContainer->hwndStatus, SB_GETRECT, nPanel, (LPARAM)&rc);
+ SendMessage(pContainer->m_hwndStatus, SB_GETRECT, nPanel, (LPARAM)&rc);
if (dat)
dat->CheckStatusIconClick(nm->pt, rc, 2, ((LPNMHDR)lParam)->code);
}
@@ -894,7 +961,7 @@ panel_found: CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_SELECTCONTAINER), hwndDlg, SelectContainerDlgProc, (LPARAM)hDlg);
break;
case ID_TABMENU_CONTAINEROPTIONS:
- if (pContainer->hWndOptions == nullptr)
+ if (pContainer->m_hWndOptions == nullptr)
CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_CONTAINEROPTIONS), hwndDlg, DlgProcContainerOptions, (LPARAM)pContainer);
break;
case ID_TABMENU_CLOSECONTAINER:
@@ -908,12 +975,12 @@ panel_found: case WM_COMMAND:
{
- bool fProcessContactMenu = pContainer->MenuBar->isContactMenu();
- bool fProcessMainMenu = pContainer->MenuBar->isMainMenu();
- pContainer->MenuBar->Cancel();
+ bool fProcessContactMenu = pContainer->m_pMenuBar->isContactMenu();
+ bool fProcessMainMenu = pContainer->m_pMenuBar->isMainMenu();
+ pContainer->m_pMenuBar->Cancel();
dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
- DWORD dwOldFlags = pContainer->dwFlags;
+ DWORD dwOldFlags = pContainer->m_dwFlags;
if (dat) {
if (fProcessContactMenu)
@@ -932,18 +999,18 @@ panel_found: GetWindowRect(hwndDlg, &rc);
{
LONG dwNewLeft;
- bool fVisible = pContainer->SideBar->isVisible();
+ bool fVisible = pContainer->m_pSideBar->isVisible();
if (fVisible) {
- dwNewLeft = pContainer->SideBar->getWidth();
- pContainer->SideBar->setVisible(false);
+ dwNewLeft = pContainer->m_pSideBar->getWidth();
+ pContainer->m_pSideBar->setVisible(false);
}
else {
- pContainer->SideBar->setVisible(true);
- dwNewLeft = -(pContainer->SideBar->getWidth());
+ pContainer->m_pSideBar->setVisible(true);
+ dwNewLeft = -(pContainer->m_pSideBar->getWidth());
}
- pContainer->preSIZE.cx = pContainer->preSIZE.cy = 0;
- pContainer->oldDCSize.cx = pContainer->oldDCSize.cy = 0;
+ pContainer->m_preSIZE.cx = pContainer->m_preSIZE.cy = 0;
+ pContainer->m_oldDCSize.cx = pContainer->m_oldDCSize.cy = 0;
}
PostMessage(hwndDlg, WM_SIZE, 0, 1);
@@ -953,7 +1020,7 @@ panel_found: case IDC_SIDEBARUP:
{
HWND hwnd = GetFocus();
- pContainer->SideBar->processScrollerButtons(LOWORD(wParam));
+ pContainer->m_pSideBar->processScrollerButtons(LOWORD(wParam));
SetFocus(hwnd);
}
break;
@@ -988,33 +1055,33 @@ panel_found: break;
case ID_VIEW_SHOWSTATUSBAR:
- ApplyContainerSetting(pContainer, CNT_NOSTATUSBAR, pContainer->dwFlags & CNT_NOSTATUSBAR ? 0 : 1, true);
+ ApplyContainerSetting(pContainer, CNT_NOSTATUSBAR, pContainer->m_dwFlags & CNT_NOSTATUSBAR ? 0 : 1, true);
break;
case ID_VIEW_VERTICALMAXIMIZE:
- ApplyContainerSetting(pContainer, CNT_VERTICALMAX, pContainer->dwFlags & CNT_VERTICALMAX ? 0 : 1, false);
+ ApplyContainerSetting(pContainer, CNT_VERTICALMAX, pContainer->m_dwFlags & CNT_VERTICALMAX ? 0 : 1, false);
break;
case ID_VIEW_BOTTOMTOOLBAR:
- ApplyContainerSetting(pContainer, CNT_BOTTOMTOOLBAR, pContainer->dwFlags & CNT_BOTTOMTOOLBAR ? 0 : 1, false);
+ ApplyContainerSetting(pContainer, CNT_BOTTOMTOOLBAR, pContainer->m_dwFlags & CNT_BOTTOMTOOLBAR ? 0 : 1, false);
Srmm_Broadcast(DM_CONFIGURETOOLBAR, 0, 1);
return 0;
case ID_VIEW_SHOWTOOLBAR:
- ApplyContainerSetting(pContainer, CNT_HIDETOOLBAR, pContainer->dwFlags & CNT_HIDETOOLBAR ? 0 : 1, false);
+ ApplyContainerSetting(pContainer, CNT_HIDETOOLBAR, pContainer->m_dwFlags & CNT_HIDETOOLBAR ? 0 : 1, false);
Srmm_Broadcast(DM_CONFIGURETOOLBAR, 0, 1);
return 0;
case ID_VIEW_SHOWMENUBAR:
- ApplyContainerSetting(pContainer, CNT_NOMENUBAR, pContainer->dwFlags & CNT_NOMENUBAR ? 0 : 1, true);
+ ApplyContainerSetting(pContainer, CNT_NOMENUBAR, pContainer->m_dwFlags & CNT_NOMENUBAR ? 0 : 1, true);
break;
case ID_VIEW_SHOWTITLEBAR:
- ApplyContainerSetting(pContainer, CNT_NOTITLE, pContainer->dwFlags & CNT_NOTITLE ? 0 : 1, true);
+ ApplyContainerSetting(pContainer, CNT_NOTITLE, pContainer->m_dwFlags & CNT_NOTITLE ? 0 : 1, true);
break;
case ID_VIEW_TABSATBOTTOM:
- ApplyContainerSetting(pContainer, CNT_TABSBOTTOM, pContainer->dwFlags & CNT_TABSBOTTOM ? 0 : 1, false);
+ ApplyContainerSetting(pContainer, CNT_TABSBOTTOM, pContainer->m_dwFlags & CNT_TABSBOTTOM ? 0 : 1, false);
break;
case ID_VIEW_SHOWMULTISENDCONTACTLIST:
@@ -1034,19 +1101,19 @@ panel_found: return 0;
case ID_EVENTPOPUPS_SHOWPOPUPSIFWINDOWISMINIMIZED:
- ApplyContainerSetting(pContainer, CNT_DONTREPORT, pContainer->dwFlags & CNT_DONTREPORT ? 0 : 1, false);
+ ApplyContainerSetting(pContainer, CNT_DONTREPORT, pContainer->m_dwFlags & CNT_DONTREPORT ? 0 : 1, false);
return 0;
case ID_EVENTPOPUPS_SHOWPOPUPSIFWINDOWISUNFOCUSED:
- ApplyContainerSetting(pContainer, CNT_DONTREPORTUNFOCUSED, pContainer->dwFlags & CNT_DONTREPORTUNFOCUSED ? 0 : 1, false);
+ ApplyContainerSetting(pContainer, CNT_DONTREPORTUNFOCUSED, pContainer->m_dwFlags & CNT_DONTREPORTUNFOCUSED ? 0 : 1, false);
return 0;
case ID_EVENTPOPUPS_SHOWPOPUPSIFWINDOWISFOCUSED:
- ApplyContainerSetting(pContainer, CNT_DONTREPORTFOCUSED, pContainer->dwFlags & CNT_DONTREPORTFOCUSED ? 0 : 1, false);
+ ApplyContainerSetting(pContainer, CNT_DONTREPORTFOCUSED, pContainer->m_dwFlags & CNT_DONTREPORTFOCUSED ? 0 : 1, false);
return 0;
case ID_EVENTPOPUPS_SHOWPOPUPSFORALLINACTIVESESSIONS:
- ApplyContainerSetting(pContainer, CNT_ALWAYSREPORTINACTIVE, pContainer->dwFlags & CNT_ALWAYSREPORTINACTIVE ? 0 : 1, false);
+ ApplyContainerSetting(pContainer, CNT_ALWAYSREPORTINACTIVE, pContainer->m_dwFlags & CNT_ALWAYSREPORTINACTIVE ? 0 : 1, false);
return 0;
case ID_WINDOWFLASHING_DISABLEFLASHING:
@@ -1096,7 +1163,7 @@ panel_found: break;
}
- if (pContainer->dwFlags != dwOldFlags)
+ if (pContainer->m_dwFlags != dwOldFlags)
SendMessage(hwndDlg, DM_CONFIGURECONTAINER, 0, 0);
}
break;
@@ -1107,20 +1174,20 @@ panel_found: SIZE sz;
sz.cx = rc.right - rc.left;
sz.cy = rc.bottom - rc.top;
- pContainer->oldSize = sz;
- pContainer->bSizingLoop = TRUE;
+ pContainer->m_oldSize = sz;
+ pContainer->m_bSizingLoop = TRUE;
}
break;
case WM_EXITSIZEMOVE:
GetClientRect(hwndTab, &rc);
- if (!((rc.right - rc.left) == pContainer->oldSize.cx && (rc.bottom - rc.top) == pContainer->oldSize.cy)) {
+ if (!((rc.right - rc.left) == pContainer->m_oldSize.cx && (rc.bottom - rc.top) == pContainer->m_oldSize.cy)) {
dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
if (dat)
dat->DM_ScrollToBottom(0, 0);
SendMessage(pContainer->m_hwndActive, WM_SIZE, 0, 0);
}
- pContainer->bSizingLoop = FALSE;
+ pContainer->m_bSizingLoop = FALSE;
break;
// determine minimum and maximum size limits
@@ -1146,9 +1213,9 @@ panel_found: // so let's add the container's vertical padding (title bar, tab bar,
// window border, status bar) to this value
if (pContainer->m_hwndActive)
- mmi->ptMinTrackSize.y = pContainer->uChildMinHeight + (pContainer->m_hwndActive ? ((rcWindow.bottom - rcWindow.top) - rcClient.bottom) : 0);
+ mmi->ptMinTrackSize.y = pContainer->m_uChildMinHeight + (pContainer->m_hwndActive ? ((rcWindow.bottom - rcWindow.top) - rcClient.bottom) : 0);
- if (pContainer->dwFlags & CNT_VERTICALMAX || (GetKeyState(VK_CONTROL) & 0x8000)) {
+ if (pContainer->m_dwFlags & CNT_VERTICALMAX || (GetKeyState(VK_CONTROL) & 0x8000)) {
RECT rcDesktop = { 0 };
BOOL fDesktopValid = FALSE;
int monitorXOffset = 0;
@@ -1187,11 +1254,11 @@ panel_found: case WM_TIMER:
if (wParam == TIMERID_HEARTBEAT) {
- if (GetForegroundWindow() != hwndDlg && (pContainer->settings->autoCloseSeconds > 0) && !pContainer->fHidden) {
+ if (GetForegroundWindow() != hwndDlg && (pContainer->m_pSettings->autoCloseSeconds > 0) && !pContainer->m_bHidden) {
BOOL fResult = TRUE;
- BroadCastContainer(pContainer, DM_CHECKAUTOHIDE, (WPARAM)pContainer->settings->autoCloseSeconds, (LPARAM)&fResult);
+ BroadCastContainer(pContainer, DM_CHECKAUTOHIDE, (WPARAM)pContainer->m_pSettings->autoCloseSeconds, (LPARAM)&fResult);
- if (fResult && nullptr == pContainer->hWndOptions)
+ if (fResult && nullptr == pContainer->m_hWndOptions)
PostMessage(hwndDlg, WM_CLOSE, 1, 0);
}
@@ -1208,37 +1275,37 @@ panel_found: case WM_SYSCOMMAND:
switch (wParam) {
case IDM_STAYONTOP:
- SetWindowPos(hwndDlg, (pContainer->dwFlags & CNT_STICKY) ? HWND_NOTOPMOST : HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
- CheckMenuItem(GetSystemMenu(hwndDlg, FALSE), IDM_STAYONTOP, (pContainer->dwFlags & CNT_STICKY) ? MF_BYCOMMAND | MF_UNCHECKED : MF_BYCOMMAND | MF_CHECKED);
- ApplyContainerSetting(pContainer, CNT_STICKY, pContainer->dwFlags & CNT_STICKY ? 0 : 1, false);
+ SetWindowPos(hwndDlg, (pContainer->m_dwFlags & CNT_STICKY) ? HWND_NOTOPMOST : HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
+ CheckMenuItem(GetSystemMenu(hwndDlg, FALSE), IDM_STAYONTOP, (pContainer->m_dwFlags & CNT_STICKY) ? MF_BYCOMMAND | MF_UNCHECKED : MF_BYCOMMAND | MF_CHECKED);
+ ApplyContainerSetting(pContainer, CNT_STICKY, pContainer->m_dwFlags & CNT_STICKY ? 0 : 1, false);
break;
case IDM_NOTITLE:
- pContainer->oldSize.cx = 0;
- pContainer->oldSize.cy = 0;
+ pContainer->m_oldSize.cx = 0;
+ pContainer->m_oldSize.cy = 0;
- CheckMenuItem(GetSystemMenu(hwndDlg, FALSE), IDM_NOTITLE, (pContainer->dwFlags & CNT_NOTITLE) ? MF_BYCOMMAND | MF_UNCHECKED : MF_BYCOMMAND | MF_CHECKED);
- ApplyContainerSetting(pContainer, CNT_NOTITLE, pContainer->dwFlags & CNT_NOTITLE ? 0 : 1, true);
+ CheckMenuItem(GetSystemMenu(hwndDlg, FALSE), IDM_NOTITLE, (pContainer->m_dwFlags & CNT_NOTITLE) ? MF_BYCOMMAND | MF_UNCHECKED : MF_BYCOMMAND | MF_CHECKED);
+ ApplyContainerSetting(pContainer, CNT_NOTITLE, pContainer->m_dwFlags & CNT_NOTITLE ? 0 : 1, true);
break;
case IDM_MOREOPTIONS:
if (IsIconic(pContainer->m_hwnd))
SendMessage(pContainer->m_hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
- if (pContainer->hWndOptions == nullptr)
+ if (pContainer->m_hWndOptions == nullptr)
CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_CONTAINEROPTIONS), hwndDlg, DlgProcContainerOptions, (LPARAM)pContainer);
break;
case SC_MAXIMIZE:
- pContainer->oldSize.cx = pContainer->oldSize.cy = 0;
+ pContainer->m_oldSize.cx = pContainer->m_oldSize.cy = 0;
break;
case SC_RESTORE:
- pContainer->oldSize.cx = pContainer->oldSize.cy = 0;
+ pContainer->m_oldSize.cx = pContainer->m_oldSize.cy = 0;
pContainer->ClearMargins();
break;
case SC_MINIMIZE:
dat = (CTabBaseDlg*)(GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA));
if (dat) {
- GetWindowRect(pContainer->m_hwndActive, &pContainer->rcLogSaved);
- pContainer->ptLogSaved.x = pContainer->rcLogSaved.left;
- pContainer->ptLogSaved.y = pContainer->rcLogSaved.top;
- ScreenToClient(hwndDlg, &pContainer->ptLogSaved);
+ GetWindowRect(pContainer->m_hwndActive, &pContainer->m_rcLogSaved);
+ pContainer->m_ptLogSaved.x = pContainer->m_rcLogSaved.left;
+ pContainer->m_ptLogSaved.y = pContainer->m_rcLogSaved.top;
+ ScreenToClient(hwndDlg, &pContainer->m_ptLogSaved);
}
}
break;
@@ -1282,11 +1349,11 @@ panel_found: break;
case WM_INITMENUPOPUP:
- pContainer->MenuBar->setActive(reinterpret_cast<HMENU>(wParam));
+ pContainer->m_pMenuBar->setActive(reinterpret_cast<HMENU>(wParam));
break;
case WM_LBUTTONDOWN:
- if (pContainer->dwFlags & CNT_NOTITLE) {
+ if (pContainer->m_dwFlags & CNT_NOTITLE) {
GetCursorPos(&pt);
return SendMessage(hwndDlg, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
}
@@ -1295,7 +1362,7 @@ panel_found: // pass the WM_ACTIVATE msg to the active message dialog child
case WM_NCACTIVATE:
if (IsWindowVisible(hwndDlg))
- pContainer->fHidden = false;
+ pContainer->m_bHidden = false;
break;
case WM_ACTIVATE:
@@ -1308,14 +1375,14 @@ panel_found: if (LOWORD(wParam == WA_INACTIVE) && (HWND)lParam != PluginConfig.g_hwndHotkeyHandler && GetParent((HWND)lParam) != hwndDlg) {
BOOL fTransAllowed = !bSkinned || PluginConfig.m_bIsVista;
- if (pContainer->dwFlags & CNT_TRANSPARENCY && fTransAllowed) {
- SetLayeredWindowAttributes(hwndDlg, Skin->getColorKey(), (BYTE)HIWORD(pContainer->settings->dwTransparency), (pContainer->dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
+ if (pContainer->m_dwFlags & CNT_TRANSPARENCY && fTransAllowed) {
+ SetLayeredWindowAttributes(hwndDlg, Skin->getColorKey(), (BYTE)HIWORD(pContainer->m_pSettings->dwTransparency), (pContainer->m_dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
}
}
- pContainer->hwndSaved = nullptr;
+ pContainer->m_hwndSaved = nullptr;
if (LOWORD(wParam) != WA_ACTIVE) {
- pContainer->MenuBar->Cancel();
+ pContainer->m_pMenuBar->Cancel();
if (HWND hDlg = GetTabWindow(hwndTab, TabCtrl_GetCurSel(hwndTab)))
SendMessage(hDlg, WM_ACTIVATE, WA_INACTIVE, 0);
@@ -1327,26 +1394,26 @@ panel_found: BOOL fTransAllowed = !bSkinned || PluginConfig.m_WinVerMajor >= 6;
FlashContainer(pContainer, 0, 0);
- pContainer->dwFlashingStarted = 0;
+ pContainer->m_dwFlashingStarted = 0;
pLastActiveContainer = pContainer;
- if (pContainer->dwFlags & CNT_DEFERREDTABSELECT) {
- pContainer->dwFlags &= ~CNT_DEFERREDTABSELECT;
+ if (pContainer->m_dwFlags & CNT_DEFERREDTABSELECT) {
+ pContainer->m_dwFlags &= ~CNT_DEFERREDTABSELECT;
SendMessage(hwndDlg, WM_SYSCOMMAND, SC_RESTORE, 0);
NMHDR nmhdr = { hwndTab, IDC_MSGTABS, TCN_SELCHANGE };
SendMessage(hwndDlg, WM_NOTIFY, 0, (LPARAM)&nmhdr); // do it via a WM_NOTIFY / TCN_SELCHANGE to simulate user-activation
}
- if (pContainer->dwFlags & CNT_DEFERREDSIZEREQUEST) {
- pContainer->dwFlags &= ~CNT_DEFERREDSIZEREQUEST;
+ if (pContainer->m_dwFlags & CNT_DEFERREDSIZEREQUEST) {
+ pContainer->m_dwFlags &= ~CNT_DEFERREDSIZEREQUEST;
SendMessage(hwndDlg, WM_SIZE, 0, 0);
}
- if (pContainer->dwFlags & CNT_TRANSPARENCY && fTransAllowed) {
- DWORD trans = LOWORD(pContainer->settings->dwTransparency);
- SetLayeredWindowAttributes(hwndDlg, Skin->getColorKey(), (BYTE)trans, (pContainer->dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
+ if (pContainer->m_dwFlags & CNT_TRANSPARENCY && fTransAllowed) {
+ DWORD trans = LOWORD(pContainer->m_pSettings->dwTransparency);
+ SetLayeredWindowAttributes(hwndDlg, Skin->getColorKey(), (BYTE)trans, (pContainer->m_dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
}
- if (pContainer->dwFlags & CNT_NEED_UPDATETITLE) {
- pContainer->dwFlags &= ~CNT_NEED_UPDATETITLE;
+ if (pContainer->m_dwFlags & CNT_NEED_UPDATETITLE) {
+ pContainer->m_dwFlags &= ~CNT_NEED_UPDATETITLE;
if (pContainer->m_hwndActive) {
hContact = 0;
SendMessage(pContainer->m_hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
@@ -1356,8 +1423,8 @@ panel_found: }
HWND hDlg = GetTabWindow(hwndTab, TabCtrl_GetCurSel(hwndTab));
- if (pContainer->dwFlags & CNT_DEFERREDCONFIGURE && hDlg) {
- pContainer->dwFlags &= ~CNT_DEFERREDCONFIGURE;
+ if (pContainer->m_dwFlags & CNT_DEFERREDCONFIGURE && hDlg) {
+ pContainer->m_dwFlags &= ~CNT_DEFERREDCONFIGURE;
pContainer->m_hwndActive = hDlg;
SendMessage(hwndDlg, WM_SYSCOMMAND, SC_RESTORE, 0);
if (pContainer->m_hwndActive != nullptr && IsWindow(pContainer->m_hwndActive)) {
@@ -1382,10 +1449,10 @@ panel_found: case DM_CLOSETABATMOUSE:
if (HWND hDlg = GetTabWindow(hwndTab, GetTabItemFromMouse(hwndTab, (POINT*)lParam))) {
if (hDlg != pContainer->m_hwndActive) {
- pContainer->bDontSmartClose = TRUE;
+ pContainer->m_bDontSmartClose = TRUE;
SendMessage(hDlg, WM_CLOSE, 0, 1);
RedrawWindow(hwndDlg, nullptr, nullptr, RDW_INVALIDATE);
- pContainer->bDontSmartClose = FALSE;
+ pContainer->m_bDontSmartClose = FALSE;
}
else SendMessage(hDlg, WM_CLOSE, 0, 1);
}
@@ -1417,12 +1484,12 @@ panel_found: CSkin::DrawItem(hdc, &rc, &SkinItems[ID_EXTBKCONTAINER]);
else {
CSkin::FillBack(hdc, &rc);
- if (pContainer->SideBar->isActive() && pContainer->SideBar->isVisible()) {
+ if (pContainer->m_pSideBar->isActive() && pContainer->m_pSideBar->isVisible()) {
HPEN hPen = ::CreatePen(PS_SOLID, 1, PluginConfig.m_cRichBorders ? PluginConfig.m_cRichBorders : ::GetSysColor(COLOR_3DSHADOW));
HPEN hOldPen = reinterpret_cast<HPEN>(::SelectObject(hdc, hPen));
- LONG x = (pContainer->SideBar->getFlags() & CSideBar::SIDEBARORIENTATION_LEFT ? pContainer->SideBar->getWidth() - 2 + pContainer->tBorder_outer_left :
- rc.right - pContainer->SideBar->getWidth() + 1 - pContainer->tBorder_outer_right);
+ LONG x = (pContainer->m_pSideBar->getFlags() & CSideBar::SIDEBARORIENTATION_LEFT ? pContainer->m_pSideBar->getWidth() - 2 + pContainer->m_tBorder_outer_left :
+ rc.right - pContainer->m_pSideBar->getWidth() + 1 - pContainer->m_tBorder_outer_right);
::MoveToEx(hdc, x, rc.top, nullptr);
::LineTo(hdc, x, rc.bottom);
::SelectObject(hdc, hOldPen);
@@ -1444,18 +1511,18 @@ panel_found: szTitleFormat[0] = 0;
- if (pContainer->isCloned && pContainer->hContactFrom != 0) {
- pContainer->settings = &PluginConfig.globalContainerSettings;
+ if (pContainer->m_isCloned && pContainer->m_hContactFrom != 0) {
+ pContainer->m_pSettings = &PluginConfig.globalContainerSettings;
- pContainer->szRelThemeFile[0] = pContainer->szAbsThemeFile[0] = 0;
+ pContainer->m_szRelThemeFile[0] = pContainer->m_szAbsThemeFile[0] = 0;
mir_snprintf(szCname, "%s_theme", CONTAINER_PREFIX);
- if (!db_get_ws(pContainer->hContactFrom, SRMSGMOD_T, szCname, &dbv))
+ if (!db_get_ws(pContainer->m_hContactFrom, SRMSGMOD_T, szCname, &dbv))
szThemeName = dbv.pwszVal;
}
else {
Utils::ReadPrivateContainerSettings(pContainer);
if (szThemeName == nullptr) {
- mir_snprintf(szCname, "%s%d_theme", CONTAINER_PREFIX, pContainer->iContainerIndex);
+ mir_snprintf(szCname, "%s%d_theme", CONTAINER_PREFIX, pContainer->m_iContainerIndex);
if (!db_get_ws(0, SRMSGMOD_T, szCname, &dbv))
szThemeName = dbv.pwszVal;
}
@@ -1463,13 +1530,13 @@ panel_found: Utils::SettingsToContainer(pContainer);
if (szThemeName != nullptr) {
- PathToAbsoluteW(szThemeName, pContainer->szAbsThemeFile, M.getDataPath());
- wcsncpy_s(pContainer->szRelThemeFile, szThemeName, _TRUNCATE);
+ PathToAbsoluteW(szThemeName, pContainer->m_szAbsThemeFile, M.getDataPath());
+ wcsncpy_s(pContainer->m_szRelThemeFile, szThemeName, _TRUNCATE);
db_free(&dbv);
}
- else pContainer->szAbsThemeFile[0] = pContainer->szRelThemeFile[0] = 0;
+ else pContainer->m_szAbsThemeFile[0] = pContainer->m_szRelThemeFile[0] = 0;
- pContainer->ltr_templates = pContainer->rtl_templates = nullptr;
+ pContainer->m_ltr_templates = pContainer->m_rtl_templates = nullptr;
}
break;
@@ -1481,7 +1548,7 @@ panel_found: SetWindowPos(hwndDlg, nullptr, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, SWP_NOZORDER | SWP_NOACTIVATE);
RedrawWindow(hwndDlg, nullptr, nullptr, RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN);
- if (pContainer->hwndStatus != nullptr && pContainer->m_hwndActive != nullptr)
+ if (pContainer->m_hwndStatus != nullptr && pContainer->m_hwndActive != nullptr)
PostMessage(pContainer->m_hwndActive, DM_STATUSBARCHANGED, 0, 0);
return 0;
@@ -1492,38 +1559,38 @@ panel_found: DWORD wsold, ws = wsold = GetWindowLongPtr(hwndDlg, GWL_STYLE);
if (!CSkin::m_frameSkins) {
- ws = (pContainer->dwFlags & CNT_NOTITLE) ?
+ ws = (pContainer->m_dwFlags & CNT_NOTITLE) ?
((IsWindowVisible(hwndDlg) ? WS_VISIBLE : 0) | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CLIPCHILDREN | WS_THICKFRAME | (CSkin::m_frameSkins ? WS_SYSMENU : WS_SYSMENU | WS_SIZEBOX)) :
ws | WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN;
}
SetWindowLongPtr(hwndDlg, GWL_STYLE, ws);
- pContainer->tBorder = M.GetByte((bSkinned ? "S_tborder" : "tborder"), 2);
- pContainer->tBorder_outer_left = g_ButtonSet.left + M.GetByte((bSkinned ? "S_tborder_outer_left" : "tborder_outer_left"), 2);
- pContainer->tBorder_outer_right = g_ButtonSet.right + M.GetByte((bSkinned ? "S_tborder_outer_right" : "tborder_outer_right"), 2);
- pContainer->tBorder_outer_top = g_ButtonSet.top + M.GetByte((bSkinned ? "S_tborder_outer_top" : "tborder_outer_top"), 2);
- pContainer->tBorder_outer_bottom = g_ButtonSet.bottom + M.GetByte((bSkinned ? "S_tborder_outer_bottom" : "tborder_outer_bottom"), 2);
+ pContainer->m_tBorder = M.GetByte((bSkinned ? "S_tborder" : "tborder"), 2);
+ pContainer->m_tBorder_outer_left = g_ButtonSet.left + M.GetByte((bSkinned ? "S_tborder_outer_left" : "tborder_outer_left"), 2);
+ pContainer->m_tBorder_outer_right = g_ButtonSet.right + M.GetByte((bSkinned ? "S_tborder_outer_right" : "tborder_outer_right"), 2);
+ pContainer->m_tBorder_outer_top = g_ButtonSet.top + M.GetByte((bSkinned ? "S_tborder_outer_top" : "tborder_outer_top"), 2);
+ pContainer->m_tBorder_outer_bottom = g_ButtonSet.bottom + M.GetByte((bSkinned ? "S_tborder_outer_bottom" : "tborder_outer_bottom"), 2);
sBarHeight = (UINT)M.GetByte((bSkinned ? "S_sbarheight" : "sbarheight"), 0);
if (LOBYTE(LOWORD(GetVersion())) >= 5) {
BOOL fTransAllowed = !bSkinned || PluginConfig.m_WinVerMajor >= 6;
DWORD exold, ex = exold = GetWindowLongPtr(hwndDlg, GWL_EXSTYLE);
- ex = (pContainer->dwFlags & CNT_TRANSPARENCY && (!CSkin::m_skinEnabled || fTransAllowed)) ? ex | WS_EX_LAYERED : ex & ~(WS_EX_LAYERED);
+ ex = (pContainer->m_dwFlags & CNT_TRANSPARENCY && (!CSkin::m_skinEnabled || fTransAllowed)) ? ex | WS_EX_LAYERED : ex & ~(WS_EX_LAYERED);
SetWindowLongPtr(hwndDlg, GWL_EXSTYLE, ex);
- if (pContainer->dwFlags & CNT_TRANSPARENCY && fTransAllowed) {
- DWORD trans = LOWORD(pContainer->settings->dwTransparency);
- SetLayeredWindowAttributes(hwndDlg, Skin->getColorKey(), (BYTE)trans, (/* pContainer->bSkinned ? LWA_COLORKEY : */ 0) | (pContainer->dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
+ if (pContainer->m_dwFlags & CNT_TRANSPARENCY && fTransAllowed) {
+ DWORD trans = LOWORD(pContainer->m_pSettings->dwTransparency);
+ SetLayeredWindowAttributes(hwndDlg, Skin->getColorKey(), (BYTE)trans, (/* pContainer->m_bSkinned ? LWA_COLORKEY : */ 0) | (pContainer->m_dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
}
}
if (!CSkin::m_frameSkins)
- CheckMenuItem(hSysmenu, IDM_NOTITLE, (pContainer->dwFlags & CNT_NOTITLE) ? MF_BYCOMMAND | MF_CHECKED : MF_BYCOMMAND | MF_UNCHECKED);
+ CheckMenuItem(hSysmenu, IDM_NOTITLE, (pContainer->m_dwFlags & CNT_NOTITLE) ? MF_BYCOMMAND | MF_CHECKED : MF_BYCOMMAND | MF_UNCHECKED);
- CheckMenuItem(hSysmenu, IDM_STAYONTOP, pContainer->dwFlags & CNT_STICKY ? MF_BYCOMMAND | MF_CHECKED : MF_BYCOMMAND | MF_UNCHECKED);
- SetWindowPos(hwndDlg, (pContainer->dwFlags & CNT_STICKY) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOREDRAW | SWP_NOCOPYBITS);
+ CheckMenuItem(hSysmenu, IDM_STAYONTOP, pContainer->m_dwFlags & CNT_STICKY ? MF_BYCOMMAND | MF_CHECKED : MF_BYCOMMAND | MF_UNCHECKED);
+ SetWindowPos(hwndDlg, (pContainer->m_dwFlags & CNT_STICKY) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOREDRAW | SWP_NOCOPYBITS);
if (ws != wsold) {
GetWindowRect(hwndDlg, &rc);
if ((ws & WS_CAPTION) != (wsold & WS_CAPTION)) {
@@ -1536,13 +1603,13 @@ panel_found: }
}
- pContainer->dwFlags = ((pContainer->dwFlagsEx & (TCF_SBARLEFT | TCF_SBARRIGHT)) ?
- pContainer->dwFlags | CNT_SIDEBAR : pContainer->dwFlags & ~CNT_SIDEBAR);
+ pContainer->m_dwFlags = ((pContainer->m_dwFlagsEx & (TCF_SBARLEFT | TCF_SBARRIGHT)) ?
+ pContainer->m_dwFlags | CNT_SIDEBAR : pContainer->m_dwFlags & ~CNT_SIDEBAR);
- pContainer->SideBar->Init();
+ pContainer->m_pSideBar->Init();
ws = wsold = GetWindowLongPtr(hwndTab, GWL_STYLE);
- if (pContainer->dwFlags & CNT_TABSBOTTOM)
+ if (pContainer->m_dwFlags & CNT_TABSBOTTOM)
ws |= (TCS_BOTTOM);
else
ws &= ~(TCS_BOTTOM);
@@ -1551,19 +1618,19 @@ panel_found: RedrawWindow(hwndTab, nullptr, nullptr, RDW_INVALIDATE);
}
- if (pContainer->dwFlags & CNT_NOSTATUSBAR) {
- if (pContainer->hwndStatus) {
- DestroyWindow(pContainer->hwndStatus);
- pContainer->hwndStatus = nullptr;
- pContainer->statusBarHeight = 0;
+ if (pContainer->m_dwFlags & CNT_NOSTATUSBAR) {
+ if (pContainer->m_hwndStatus) {
+ DestroyWindow(pContainer->m_hwndStatus);
+ pContainer->m_hwndStatus = nullptr;
+ pContainer->m_statusBarHeight = 0;
SendMessage(hwndDlg, DM_STATUSBARCHANGED, 0, 0);
}
}
- else if (pContainer->hwndStatus == nullptr) {
- pContainer->hwndStatus = CreateWindowEx(0, L"TSStatusBarClass", nullptr, SBT_TOOLTIPS | WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, hwndDlg, nullptr, g_plugin.getInst(), nullptr);
+ else if (pContainer->m_hwndStatus == nullptr) {
+ pContainer->m_hwndStatus = CreateWindowEx(0, L"TSStatusBarClass", nullptr, SBT_TOOLTIPS | WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, hwndDlg, nullptr, g_plugin.getInst(), nullptr);
if (sBarHeight && bSkinned)
- SendMessage(pContainer->hwndStatus, SB_SETMINHEIGHT, sBarHeight, 0);
+ SendMessage(pContainer->m_hwndStatus, SB_SETMINHEIGHT, sBarHeight, 0);
}
if (pContainer->m_hwndActive != nullptr) {
hContact = 0;
@@ -1626,78 +1693,10 @@ panel_found: }
return 0;
- case DM_SETICON:
- {
- dat = (CTabBaseDlg*)wParam;
- HICON hIconMsg = PluginConfig.g_IconMsgEvent;
- HICON hIconBig = (dat && dat->m_cache) ? Skin_LoadProtoIcon(dat->m_cache->getProto(), dat->m_cache->getStatus(), true) : nullptr;
-
- if (Win7Taskbar->haveLargeIcons()) {
- if ((HICON)lParam == PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING] || (HICON)lParam == hIconMsg) {
- Win7Taskbar->setOverlayIcon(hwndDlg, lParam);
- if (GetForegroundWindow() != hwndDlg)
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, lParam);
- if ((HICON)lParam == hIconMsg)
- pContainer->hIconTaskbarOverlay = hIconMsg;
- break;
- }
-
- if (dat) {
- if (dat->m_hTaskbarIcon == nullptr)
- dat->m_hTaskbarIcon = ((dat->m_pContainer->dwFlags & CNT_AVATARSONTASKBAR) ? dat->IconFromAvatar() : nullptr);
- else {
- if (!(dat->m_pContainer->dwFlags & CNT_AVATARSONTASKBAR)) {
- DestroyIcon(dat->m_hTaskbarIcon);
- dat->m_hTaskbarIcon = nullptr;
- }
- }
-
- if (dat->m_hTaskbarIcon) {
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)dat->m_hTaskbarIcon);
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, lParam);
- Win7Taskbar->setOverlayIcon(hwndDlg, (LPARAM)(dat->m_hTabIcon ? (LPARAM)dat->m_hTabIcon : lParam));
- }
- else {
- if (nullptr == hIconBig || (HICON)CALLSERVICE_NOTFOUND == hIconBig)
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)lParam);
- else
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIconBig);
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, lParam);
- if (dat->m_pContainer->hIconTaskbarOverlay)
- Win7Taskbar->setOverlayIcon(hwndDlg, (LPARAM)dat->m_pContainer->hIconTaskbarOverlay);
- else if (Win7Taskbar->haveAlwaysGroupingMode() && fForceOverlayIcons)
- Win7Taskbar->setOverlayIcon(hwndDlg, lParam);
- else
- Win7Taskbar->clearOverlayIcon(hwndDlg);
- }
- return 0;
- }
- }
-
- // default handling (no win7 taskbar)
- if ((HICON)lParam == PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]) { // always set typing icon, but don't save it...
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)PluginConfig.g_IconTypingEventBig);
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, lParam);
- break;
- }
- if (reinterpret_cast<HICON>(lParam) == hIconMsg)
- hIconBig = Skin_LoadIcon(SKINICON_EVENT_MESSAGE, true);
-
- if (pContainer->hIcon == STICK_ICON_MSG && (HICON)lParam != hIconMsg && pContainer->dwFlags & CNT_NEED_UPDATETITLE) {
- lParam = (LPARAM)hIconMsg;
- hIconBig = Skin_LoadIcon(SKINICON_EVENT_MESSAGE, true);
- }
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, lParam);
- if (nullptr != hIconBig && reinterpret_cast<HICON>(CALLSERVICE_NOTFOUND) != hIconBig)
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, LPARAM(hIconBig));
- pContainer->hIcon = (lParam == (LPARAM)hIconMsg) ? STICK_ICON_MSG : 0;
- }
- return 0;
-
case WM_DRAWITEM:
{
DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT *)lParam;
- if (dis->hwndItem == pContainer->hwndStatus && !(pContainer->dwFlags & CNT_NOSTATUSBAR)) {
+ if (dis->hwndItem == pContainer->m_hwndStatus && !(pContainer->m_dwFlags & CNT_NOSTATUSBAR)) {
dat = (CTabBaseDlg*)GetWindowLongPtr(pContainer->m_hwndActive, GWLP_USERDATA);
if (dat)
dat->DrawStatusIcons(dis->hDC, dis->rcItem, 2);
@@ -1716,7 +1715,7 @@ panel_found: if (!IsIconic(hwndDlg))
GetClientRect(hwndDlg, pRect);
else
- CopyRect(pRect, &pContainer->rcSaved);
+ CopyRect(pRect, &pContainer->m_rcSaved);
AdjustTabClientRect(pContainer, pRect);
}
}
@@ -1725,39 +1724,39 @@ panel_found: case WM_DESTROY:
pContainer->m_hwnd = nullptr;
pContainer->m_hwndActive = nullptr;
- if (pContainer->hwndStatus)
- DestroyWindow(pContainer->hwndStatus);
+ if (pContainer->m_hwndStatus)
+ DestroyWindow(pContainer->m_hwndStatus);
// mir_free private theme...
- if (pContainer->theme.isPrivate) {
- mir_free(pContainer->ltr_templates);
- mir_free(pContainer->rtl_templates);
- mir_free(pContainer->theme.logFonts);
- mir_free(pContainer->theme.fontColors);
- mir_free(pContainer->theme.rtfFonts);
+ if (pContainer->m_theme.isPrivate) {
+ mir_free(pContainer->m_ltr_templates);
+ mir_free(pContainer->m_rtl_templates);
+ mir_free(pContainer->m_theme.logFonts);
+ mir_free(pContainer->m_theme.fontColors);
+ mir_free(pContainer->m_theme.rtfFonts);
}
if (pContainer->m_hwndTip)
DestroyWindow(pContainer->m_hwndTip);
RemoveContainerFromList(pContainer);
- if (pContainer->cachedDC) {
- SelectObject(pContainer->cachedDC, pContainer->oldHBM);
- DeleteObject(pContainer->cachedHBM);
- DeleteDC(pContainer->cachedDC);
+ if (pContainer->m_cachedDC) {
+ SelectObject(pContainer->m_cachedDC, pContainer->m_oldHBM);
+ DeleteObject(pContainer->m_cachedHBM);
+ DeleteDC(pContainer->m_cachedDC);
}
- if (pContainer->cachedToolbarDC) {
- SelectObject(pContainer->cachedToolbarDC, pContainer->oldhbmToolbarBG);
- DeleteObject(pContainer->hbmToolbarBG);
- DeleteDC(pContainer->cachedToolbarDC);
+ if (pContainer->m_cachedToolbarDC) {
+ SelectObject(pContainer->m_cachedToolbarDC, pContainer->m_oldhbmToolbarBG);
+ DeleteObject(pContainer->m_hbmToolbarBG);
+ DeleteDC(pContainer->m_cachedToolbarDC);
}
return 0;
case WM_NCDESTROY:
if (pContainer) {
- delete pContainer->MenuBar;
- delete pContainer->SideBar;
- if (pContainer->settings != &PluginConfig.globalContainerSettings)
- mir_free(pContainer->settings);
+ delete pContainer->m_pMenuBar;
+ delete pContainer->m_pSideBar;
+ if (pContainer->m_pSettings != &PluginConfig.globalContainerSettings)
+ mir_free(pContainer->m_pSettings);
mir_free(pContainer);
}
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0);
@@ -1766,7 +1765,7 @@ panel_found: case WM_CLOSE:
if (PluginConfig.m_bHideOnClose && !lParam) {
ShowWindow(hwndDlg, SW_HIDE);
- pContainer->fHidden = true;
+ pContainer->m_bHidden = true;
}
else {
if (TabCtrl_GetItemCount(hwndTab) > 1) {
@@ -1785,23 +1784,23 @@ panel_found: SendMessage(hDlg, DM_CHECKQUEUEFORCLOSE, 0, (LPARAM)&iOpenJobs);
}
if (iOpenJobs && pContainer) {
- if (pContainer->exFlags & CNT_EX_CLOSEWARN)
+ if (pContainer->m_exFlags & CNT_EX_CLOSEWARN)
return TRUE;
- pContainer->exFlags |= CNT_EX_CLOSEWARN;
+ pContainer->m_exFlags |= CNT_EX_CLOSEWARN;
LRESULT result = SendQueue::WarnPendingJobs(iOpenJobs);
- pContainer->exFlags &= ~CNT_EX_CLOSEWARN;
+ pContainer->m_exFlags &= ~CNT_EX_CLOSEWARN;
if (result == IDNO)
return TRUE;
}
}
// save geometry information to the database...
- if (!(pContainer->dwFlags & CNT_GLOBALSIZE)) {
+ if (!(pContainer->m_dwFlags & CNT_GLOBALSIZE)) {
WINDOWPLACEMENT wp = { 0 };
wp.length = sizeof(wp);
if (GetWindowPlacement(hwndDlg, &wp) != 0) {
- if (pContainer->isCloned && pContainer->hContactFrom != 0) {
+ if (pContainer->m_isCloned && pContainer->m_hContactFrom != 0) {
HWND hDlg = GetTabWindow(hwndTab, TabCtrl_GetCurSel(hwndTab));
SendMessage(hDlg, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
db_set_b(hContact, SRMSGMOD_T, "splitmax", (BYTE)((wp.showCmd == SW_SHOWMAXIMIZED) ? 1 : 0));
@@ -1818,13 +1817,13 @@ panel_found: }
else {
char szCName[40];
- mir_snprintf(szCName, "%s%dx", CONTAINER_PREFIX, pContainer->iContainerIndex);
+ mir_snprintf(szCName, "%s%dx", CONTAINER_PREFIX, pContainer->m_iContainerIndex);
db_set_dw(0, SRMSGMOD_T, szCName, wp.rcNormalPosition.left);
- mir_snprintf(szCName, "%s%dy", CONTAINER_PREFIX, pContainer->iContainerIndex);
+ mir_snprintf(szCName, "%s%dy", CONTAINER_PREFIX, pContainer->m_iContainerIndex);
db_set_dw(0, SRMSGMOD_T, szCName, wp.rcNormalPosition.top);
- mir_snprintf(szCName, "%s%dwidth", CONTAINER_PREFIX, pContainer->iContainerIndex);
+ mir_snprintf(szCName, "%s%dwidth", CONTAINER_PREFIX, pContainer->m_iContainerIndex);
db_set_dw(0, SRMSGMOD_T, szCName, wp.rcNormalPosition.right - wp.rcNormalPosition.left);
- mir_snprintf(szCName, "%s%dheight", CONTAINER_PREFIX, pContainer->iContainerIndex);
+ mir_snprintf(szCName, "%s%dheight", CONTAINER_PREFIX, pContainer->m_iContainerIndex);
db_set_dw(0, SRMSGMOD_T, szCName, wp.rcNormalPosition.bottom - wp.rcNormalPosition.top);
db_set_b(0, SRMSGMOD_T, "splitmax", (BYTE)((wp.showCmd == SW_SHOWMAXIMIZED) ? 1 : 0));
@@ -1833,25 +1832,25 @@ panel_found: }
// clear temp flags which should NEVER be saved...
- if (pContainer->isCloned && pContainer->hContactFrom != 0) {
+ if (pContainer->m_isCloned && pContainer->m_hContactFrom != 0) {
- pContainer->dwFlags &= ~(CNT_DEFERREDCONFIGURE | CNT_CREATE_MINIMIZED | CNT_DEFERREDSIZEREQUEST | CNT_CREATE_CLONED);
+ pContainer->m_dwFlags &= ~(CNT_DEFERREDCONFIGURE | CNT_CREATE_MINIMIZED | CNT_DEFERREDSIZEREQUEST | CNT_CREATE_CLONED);
for (int i = 0; i < TabCtrl_GetItemCount(hwndTab); i++) {
if (HWND hDlg = GetTabWindow(hwndTab, i)) {
SendMessage(hDlg, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
char szCName[40];
mir_snprintf(szCName, "%s_theme", CONTAINER_PREFIX);
- if (mir_wstrlen(pContainer->szRelThemeFile) > 1) {
- if (pContainer->fPrivateThemeChanged == TRUE) {
- PathToRelativeW(pContainer->szRelThemeFile, pContainer->szAbsThemeFile, M.getDataPath());
- db_set_ws(hContact, SRMSGMOD_T, szCName, pContainer->szRelThemeFile);
- pContainer->fPrivateThemeChanged = FALSE;
+ if (mir_wstrlen(pContainer->m_szRelThemeFile) > 1) {
+ if (pContainer->m_fPrivateThemeChanged == TRUE) {
+ PathToRelativeW(pContainer->m_szRelThemeFile, pContainer->m_szAbsThemeFile, M.getDataPath());
+ db_set_ws(hContact, SRMSGMOD_T, szCName, pContainer->m_szRelThemeFile);
+ pContainer->m_fPrivateThemeChanged = FALSE;
}
}
else {
db_unset(hContact, SRMSGMOD_T, szCName);
- pContainer->fPrivateThemeChanged = FALSE;
+ pContainer->m_fPrivateThemeChanged = FALSE;
}
}
}
@@ -1894,10 +1893,10 @@ TContainerData* TSAPI CreateContainer(const wchar_t *name, int iTemp, MCONTACT h ptrW tszName(db_get_wsa(0, CONTAINER_KEY, szCounter));
if (tszName == nullptr) {
if (iFirstFree != -1) {
- pContainer->iContainerIndex = iFirstFree;
+ pContainer->m_iContainerIndex = iFirstFree;
itoa(iFirstFree, szCounter, 10);
}
- else pContainer->iContainerIndex = i;
+ else pContainer->m_iContainerIndex = i;
db_set_ws(0, CONTAINER_KEY, szCounter, name);
BuildContainerMenu();
@@ -1905,7 +1904,7 @@ TContainerData* TSAPI CreateContainer(const wchar_t *name, int iTemp, MCONTACT h }
if (!wcsncmp(tszName, name, CONTAINER_NAMELEN)) {
- pContainer->iContainerIndex = i;
+ pContainer->m_iContainerIndex = i;
iFound = TRUE;
}
else if (!wcsncmp(tszName, L"**free**", CONTAINER_NAMELEN))
@@ -1914,14 +1913,14 @@ TContainerData* TSAPI CreateContainer(const wchar_t *name, int iTemp, MCONTACT h }
else {
iTemp |= CNT_CREATEFLAG_CLONED;
- pContainer->iContainerIndex = 1;
+ pContainer->m_iContainerIndex = 1;
}
if (iTemp & CNT_CREATEFLAG_MINIMIZED)
- pContainer->dwFlags = CNT_CREATE_MINIMIZED;
+ pContainer->m_dwFlags = CNT_CREATE_MINIMIZED;
if (iTemp & CNT_CREATEFLAG_CLONED) {
- pContainer->dwFlags |= CNT_CREATE_CLONED;
- pContainer->hContactFrom = hContactFrom;
+ pContainer->m_dwFlags |= CNT_CREATE_CLONED;
+ pContainer->m_hContactFrom = hContactFrom;
}
pContainer->m_hwnd = CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_MSGCONTAINER), nullptr, DlgProcContainer, (LPARAM)pContainer);
return pContainer;
@@ -1970,7 +1969,7 @@ int TSAPI ActivateTabFromHWND(HWND hwndTab, HWND hwnd) // enumerates tabs and closes all of them, but the one in dat
void TSAPI CloseOtherTabs(HWND hwndTab, CTabBaseDlg &dat)
{
- for (int idxt = 0; idxt < dat.m_pContainer->iChilds;) {
+ for (int idxt = 0; idxt < dat.m_pContainer->m_iChilds;) {
HWND otherTab = GetTabWindow(hwndTab, idxt);
if (otherTab != nullptr && otherTab != dat.GetHwnd())
SendMessage(otherTab, WM_CLOSE, 1, 0);
@@ -2068,12 +2067,12 @@ static TContainerData* TSAPI RemoveContainerFromList(TContainerData *pContainer) void TSAPI AdjustTabClientRect(TContainerData *pContainer, RECT *rc)
{
HWND hwndTab = GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS);
- DWORD tBorder = pContainer->tBorder;
+ DWORD tBorder = pContainer->m_tBorder;
DWORD dwStyle = GetWindowLongPtr(hwndTab, GWL_STYLE);
RECT rcTab, rcTabOrig;
GetClientRect(hwndTab, &rcTab);
- if (!(pContainer->dwFlags & CNT_SIDEBAR) && (pContainer->iChilds > 1 || !(pContainer->dwFlags & CNT_HIDETABS))) {
+ if (!(pContainer->m_dwFlags & CNT_SIDEBAR) && (pContainer->m_iChilds > 1 || !(pContainer->m_dwFlags & CNT_HIDETABS))) {
rcTabOrig = rcTab;
TabCtrl_AdjustRect(hwndTab, FALSE, &rcTab);
DWORD dwTopPad = rcTab.top - rcTabOrig.top;
@@ -2082,7 +2081,7 @@ void TSAPI AdjustTabClientRect(TContainerData *pContainer, RECT *rc) rc->right -= tBorder;
if (dwStyle & TCS_BUTTONS) {
- if (pContainer->dwFlags & CNT_TABSBOTTOM) {
+ if (pContainer->m_dwFlags & CNT_TABSBOTTOM) {
int nCount = TabCtrl_GetItemCount(hwndTab);
if (nCount > 0) {
RECT rcItem;
@@ -2096,7 +2095,7 @@ void TSAPI AdjustTabClientRect(TContainerData *pContainer, RECT *rc) }
}
else {
- if (pContainer->dwFlags & CNT_TABSBOTTOM)
+ if (pContainer->m_dwFlags & CNT_TABSBOTTOM)
rc->bottom = rcTab.bottom + 2;
else {
rc->top += (dwTopPad - 2);
@@ -2111,9 +2110,9 @@ void TSAPI AdjustTabClientRect(TContainerData *pContainer, RECT *rc) rc->bottom = rcTab.bottom;
rc->top = rcTab.top;
}
- rc->right -= (pContainer->tBorder_outer_left + pContainer->tBorder_outer_right);
- if (pContainer->SideBar->isVisible())
- rc->right -= pContainer->SideBar->getWidth();
+ rc->right -= (pContainer->m_tBorder_outer_left + pContainer->m_tBorder_outer_right);
+ if (pContainer->m_pSideBar->isVisible())
+ rc->right -= pContainer->m_pSideBar->getWidth();
}
// retrieve the container name for the given contact handle.
@@ -2225,7 +2224,7 @@ HMENU TSAPI BuildContainerMenu() void TSAPI FlashContainer(TContainerData *pContainer, int iMode, int iCount)
{
- if (pContainer->dwFlags & CNT_NOFLASH) // container should never flash
+ if (pContainer->m_dwFlags & CNT_NOFLASH) // container should never flash
return;
FLASHWINFO fwi;
@@ -2234,7 +2233,7 @@ void TSAPI FlashContainer(TContainerData *pContainer, int iMode, int iCount) if (iMode) {
fwi.dwFlags = FLASHW_ALL;
- if (pContainer->dwFlags & CNT_FLASHALWAYS)
+ if (pContainer->m_dwFlags & CNT_FLASHALWAYS)
fwi.dwFlags |= FLASHW_TIMER;
else
fwi.uCount = (iCount == 0) ? M.GetByte("nrflash", 4) : iCount;
@@ -2244,21 +2243,21 @@ void TSAPI FlashContainer(TContainerData *pContainer, int iMode, int iCount) else fwi.dwFlags = FLASHW_STOP;
fwi.hwnd = pContainer->m_hwnd;
- pContainer->dwFlashingStarted = GetTickCount();
+ pContainer->m_dwFlashingStarted = GetTickCount();
FlashWindowEx(&fwi);
}
void TSAPI ReflashContainer(TContainerData *pContainer)
{
- DWORD dwStartTime = pContainer->dwFlashingStarted;
+ DWORD dwStartTime = pContainer->m_dwFlashingStarted;
if (pContainer->IsActive()) // dont care about active windows
return;
- if (pContainer->dwFlags & CNT_NOFLASH || pContainer->dwFlashingStarted == 0)
+ if (pContainer->m_dwFlags & CNT_NOFLASH || pContainer->m_dwFlashingStarted == 0)
return; // dont care about containers which should never flash
- if (pContainer->dwFlags & CNT_FLASHALWAYS)
+ if (pContainer->m_dwFlags & CNT_FLASHALWAYS)
FlashContainer(pContainer, 1, 0);
else {
// recalc the remaining flashes
@@ -2273,7 +2272,7 @@ void TSAPI ReflashContainer(TContainerData *pContainer) FlashWindow(pContainer->m_hwnd, TRUE);
}
}
- pContainer->dwFlashingStarted = dwStartTime;
+ pContainer->m_dwFlashingStarted = dwStartTime;
}
// broadcasts a message to all child windows (tabs/sessions)
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp index a266c37886..9c8e9fe395 100644 --- a/plugins/TabSRMM/src/containeroptions.cpp +++ b/plugins/TabSRMM/src/containeroptions.cpp @@ -36,7 +36,7 @@ static void MY_CheckDlgButton(HWND hWnd, UINT id, int iCheck) static void ReloadGlobalContainerSettings(bool fForceReconfig)
{
for (TContainerData *p = pFirstContainer; p; p = p->pNext) {
- if (!p->settings->fPrivate) {
+ if (!p->m_pSettings->fPrivate) {
Utils::SettingsToContainer(p);
if (fForceReconfig)
SendMessage(p->m_hwnd, DM_CONFIGURECONTAINER, 0, 0);
@@ -60,27 +60,27 @@ void TSAPI ApplyContainerSetting(TContainerData *pContainer, DWORD flags, UINT m bool isEx = (mode & 0xffff0000) ? true : false;
bool set = (mode & 0x01) ? true : false;
- if (!pContainer->settings->fPrivate) {
+ if (!pContainer->m_pSettings->fPrivate) {
if (!isEx)
- pContainer->dwFlags = (set ? pContainer->dwFlags | flags : pContainer->dwFlags & ~flags);
+ pContainer->m_dwFlags = (set ? pContainer->m_dwFlags | flags : pContainer->m_dwFlags & ~flags);
else
- pContainer->dwFlagsEx = (set ? pContainer->dwFlagsEx | flags : pContainer->dwFlagsEx & ~flags);
+ pContainer->m_dwFlagsEx = (set ? pContainer->m_dwFlagsEx | flags : pContainer->m_dwFlagsEx & ~flags);
Utils::ContainerToSettings(pContainer);
if (flags & CNT_INFOPANEL)
BroadCastContainer(pContainer, DM_SETINFOPANEL, 0, 0);
if (flags & CNT_SIDEBAR) {
for (TContainerData *p = pFirstContainer; p; p = p->pNext)
- if (!p->settings->fPrivate)
+ if (!p->m_pSettings->fPrivate)
SendMessage(p->m_hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
}
else ReloadGlobalContainerSettings(fForceResize);
}
else {
if (!isEx)
- pContainer->dwFlags = (set ? pContainer->dwFlags | flags : pContainer->dwFlags & ~flags);
+ pContainer->m_dwFlags = (set ? pContainer->m_dwFlags | flags : pContainer->m_dwFlags & ~flags);
else
- pContainer->dwFlagsEx = (set ? pContainer->dwFlagsEx | flags : pContainer->dwFlagsEx & ~flags);
+ pContainer->m_dwFlagsEx = (set ? pContainer->m_dwFlagsEx | flags : pContainer->m_dwFlagsEx & ~flags);
Utils::ContainerToSettings(pContainer);
if (flags & CNT_SIDEBAR)
SendMessage(pContainer->m_hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0);
@@ -151,13 +151,13 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
pContainer = (TContainerData*)lParam;
- pContainer->hWndOptions = hwndDlg;
+ pContainer->m_hWndOptions = hwndDlg;
SetWindowText(hwndDlg, TranslateT("Container options"));
wchar_t szNewTitle[128];
mir_snwprintf(szNewTitle, L"%s", !mir_wstrcmp(pContainer->m_wszName, L"default") ? TranslateT("Default container") : pContainer->m_wszName);
SetDlgItemText(hwndDlg, IDC_HEADERBAR, szNewTitle);
Utils::enableDlgControl(hwndDlg, IDC_O_HIDETITLE, !CSkin::m_frameSkins);
- CheckDlgButton(hwndDlg, IDC_CNTPRIVATE, pContainer->settings->fPrivate ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CNTPRIVATE, pContainer->m_pSettings->fPrivate ? BST_CHECKED : BST_UNCHECKED);
SendDlgItemMessage(hwndDlg, IDC_TABMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Tabs at the top"));
SendDlgItemMessage(hwndDlg, IDC_TABMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Tabs at the bottom"));
@@ -176,13 +176,13 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, SendDlgItemMessage(hwndDlg, IDC_SBARLAYOUT, CB_INSERTSTRING, -1, (LPARAM)TranslateW(sblayouts[i].szName));
/* bits 24 - 31 of dwFlagsEx hold the side bar layout id */
- SendDlgItemMessage(hwndDlg, IDC_SBARLAYOUT, CB_SETCURSEL, (WPARAM)((pContainer->settings->dwFlagsEx & 0xff000000) >> 24), 0);
+ SendDlgItemMessage(hwndDlg, IDC_SBARLAYOUT, CB_SETCURSEL, (WPARAM)((pContainer->m_pSettings->dwFlagsEx & 0xff000000) >> 24), 0);
- SendMessage(hwndDlg, DM_SC_INITDIALOG, 0, (LPARAM)pContainer->settings);
+ SendMessage(hwndDlg, DM_SC_INITDIALOG, 0, (LPARAM)pContainer->m_pSettings);
SendDlgItemMessage(hwndDlg, IDC_TITLEFORMAT, EM_LIMITTEXT, TITLE_FORMATLEN - 1, 0);
- SetDlgItemText(hwndDlg, IDC_TITLEFORMAT, pContainer->settings->szTitleFormat);
- SetDlgItemText(hwndDlg, IDC_THEME, pContainer->szRelThemeFile);
+ SetDlgItemText(hwndDlg, IDC_TITLEFORMAT, pContainer->m_pSettings->szTitleFormat);
+ SetDlgItemText(hwndDlg, IDC_THEME, pContainer->m_szRelThemeFile);
for (int i = 0; i < _countof(o_pages); i++) {
tvis.hParent = nullptr;
tvis.hInsertAfter = TVI_LAST;
@@ -208,7 +208,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, SendDlgItemMessage(hwndDlg, IDC_TITLEBOX, WM_SETFONT, (WPARAM)hFont, TRUE);
- if (pContainer->isCloned && pContainer->hContactFrom != 0) {
+ if (pContainer->m_isCloned && pContainer->m_hContactFrom != 0) {
Utils::showDlgControl(hwndDlg, IDC_CNTPRIVATE, SW_HIDE);
Utils::showDlgControl(hwndDlg, IDC_O_CNTPRIVATE, SW_HIDE);
}
@@ -234,19 +234,19 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, case IDC_CNTPRIVATE:
if (IsDlgButtonChecked(hwndDlg, IDC_CNTPRIVATE)) {
Utils::ReadPrivateContainerSettings(pContainer, true);
- pContainer->settings->fPrivate = true;
+ pContainer->m_pSettings->fPrivate = true;
}
else {
- if (pContainer->settings != &PluginConfig.globalContainerSettings) {
+ if (pContainer->m_pSettings != &PluginConfig.globalContainerSettings) {
char szCname[40];
- mir_snprintf(szCname, "%s%d", CNT_BASEKEYNAME, pContainer->iContainerIndex);
- Utils::WriteContainerSettingsToDB(0, pContainer->settings, szCname);
- mir_free(pContainer->settings);
+ mir_snprintf(szCname, "%s%d", CNT_BASEKEYNAME, pContainer->m_iContainerIndex);
+ Utils::WriteContainerSettingsToDB(0, pContainer->m_pSettings, szCname);
+ mir_free(pContainer->m_pSettings);
}
- pContainer->settings = &PluginConfig.globalContainerSettings;
- pContainer->settings->fPrivate = false;
+ pContainer->m_pSettings = &PluginConfig.globalContainerSettings;
+ pContainer->m_pSettings->fPrivate = false;
}
- SendMessage(hwndDlg, DM_SC_INITDIALOG, 0, (LPARAM)pContainer->settings);
+ SendMessage(hwndDlg, DM_SC_INITDIALOG, 0, (LPARAM)pContainer->m_pSettings);
goto do_apply;
case IDC_TRANSPARENCY:
@@ -299,18 +299,18 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, case IDOK:
case IDC_APPLY:
- SendMessage(hwndDlg, DM_SC_BUILDLIST, 0, (LPARAM)pContainer->settings);
+ SendMessage(hwndDlg, DM_SC_BUILDLIST, 0, (LPARAM)pContainer->m_pSettings);
- pContainer->settings->dwTransparency = MAKELONG((WORD)SendDlgItemMessage(hwndDlg, IDC_TRANSPARENCY_ACTIVE, TBM_GETPOS, 0, 0),
+ pContainer->m_pSettings->dwTransparency = MAKELONG((WORD)SendDlgItemMessage(hwndDlg, IDC_TRANSPARENCY_ACTIVE, TBM_GETPOS, 0, 0),
(WORD)SendDlgItemMessage(hwndDlg, IDC_TRANSPARENCY_INACTIVE, TBM_GETPOS, 0, 0));
- pContainer->settings->avatarMode = (WORD)SendDlgItemMessage(hwndDlg, IDC_AVATARMODE, CB_GETCURSEL, 0, 0);
- pContainer->settings->ownAvatarMode = (WORD)SendDlgItemMessage(hwndDlg, IDC_OWNAVATARMODE, CB_GETCURSEL, 0, 0);
+ pContainer->m_pSettings->avatarMode = (WORD)SendDlgItemMessage(hwndDlg, IDC_AVATARMODE, CB_GETCURSEL, 0, 0);
+ pContainer->m_pSettings->ownAvatarMode = (WORD)SendDlgItemMessage(hwndDlg, IDC_OWNAVATARMODE, CB_GETCURSEL, 0, 0);
- GetDlgItemText(hwndDlg, IDC_TITLEFORMAT, pContainer->settings->szTitleFormat, TITLE_FORMATLEN);
- pContainer->settings->szTitleFormat[TITLE_FORMATLEN - 1] = 0;
+ GetDlgItemText(hwndDlg, IDC_TITLEFORMAT, pContainer->m_pSettings->szTitleFormat, TITLE_FORMATLEN);
+ pContainer->m_pSettings->szTitleFormat[TITLE_FORMATLEN - 1] = 0;
- pContainer->szRelThemeFile[0] = pContainer->szAbsThemeFile[0] = 0;
+ pContainer->m_szRelThemeFile[0] = pContainer->m_szAbsThemeFile[0] = 0;
if (GetWindowTextLength(GetDlgItem(hwndDlg, IDC_THEME)) > 0) {
wchar_t szFinalThemeFile[MAX_PATH], szFilename[MAX_PATH];
@@ -319,17 +319,17 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, szFilename[MAX_PATH - 1] = 0;
PathToAbsoluteW(szFilename, szFinalThemeFile, M.getDataPath());
- if (mir_wstrcmp(szFilename, pContainer->szRelThemeFile))
- pContainer->fPrivateThemeChanged = TRUE;
+ if (mir_wstrcmp(szFilename, pContainer->m_szRelThemeFile))
+ pContainer->m_fPrivateThemeChanged = TRUE;
if (PathFileExists(szFinalThemeFile))
- wcsncpy_s(pContainer->szRelThemeFile, szFilename, _TRUNCATE);
+ wcsncpy_s(pContainer->m_szRelThemeFile, szFilename, _TRUNCATE);
else
- pContainer->szRelThemeFile[0] = 0;
+ pContainer->m_szRelThemeFile[0] = 0;
}
else {
- pContainer->szRelThemeFile[0] = 0;
- pContainer->fPrivateThemeChanged = TRUE;
+ pContainer->m_szRelThemeFile[0] = 0;
+ pContainer->m_fPrivateThemeChanged = TRUE;
}
Utils::SettingsToContainer(pContainer);
@@ -534,7 +534,7 @@ do_apply: Utils::enableDlgControl(hwndDlg, IDC_APPLY, true); case WM_DESTROY:
Window_FreeIcon_IcoLib(hwndDlg);
- pContainer->hWndOptions = nullptr;
+ pContainer->m_hWndOptions = nullptr;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0);
HFONT hFont = (HFONT)SendDlgItemMessage(hwndDlg, IDC_TITLEBOX, WM_GETFONT, 0, 0);
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp index 70f9bd0ec9..7a940de17b 100644 --- a/plugins/TabSRMM/src/controls.cpp +++ b/plugins/TabSRMM/src/controls.cpp @@ -137,7 +137,7 @@ void CMenuBar::releaseHook() LONG CMenuBar::getHeight() const
{
- return((m_pContainer->dwFlags & CNT_NOMENUBAR) ? 0 : m_size_y);
+ return((m_pContainer->m_dwFlags & CNT_NOMENUBAR) ? 0 : m_size_y);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -186,7 +186,7 @@ LONG_PTR CMenuBar::processMsg(const UINT msg, const WPARAM, const LPARAM lParam) }
}
else if (msg == WM_LBUTTONDOWN) {
- if (m_pContainer->dwFlags & CNT_NOTITLE) {
+ if (m_pContainer->m_dwFlags & CNT_NOTITLE) {
POINT pt;
::GetCursorPos(&pt);
return ::SendMessage(m_pContainer->m_hwnd, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(pt.x, pt.y));
@@ -440,31 +440,31 @@ void CMenuBar::updateState(const HMENU hMenu) const {
CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(m_pContainer->m_hwndActive, GWLP_USERDATA);
if (dat) {
- ::CheckMenuItem(hMenu, ID_VIEW_SHOWMENUBAR, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_NOMENUBAR ? MF_UNCHECKED : MF_CHECKED);
- ::CheckMenuItem(hMenu, ID_VIEW_SHOWSTATUSBAR, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_NOSTATUSBAR ? MF_UNCHECKED : MF_CHECKED);
+ ::CheckMenuItem(hMenu, ID_VIEW_SHOWMENUBAR, MF_BYCOMMAND | m_pContainer->m_dwFlags & CNT_NOMENUBAR ? MF_UNCHECKED : MF_CHECKED);
+ ::CheckMenuItem(hMenu, ID_VIEW_SHOWSTATUSBAR, MF_BYCOMMAND | m_pContainer->m_dwFlags & CNT_NOSTATUSBAR ? MF_UNCHECKED : MF_CHECKED);
::CheckMenuItem(hMenu, ID_VIEW_SHOWAVATAR, MF_BYCOMMAND | (dat->m_bShowAvatar ? MF_CHECKED : MF_UNCHECKED));
- ::CheckMenuItem(hMenu, ID_VIEW_SHOWTITLEBAR, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_NOTITLE ? MF_UNCHECKED : MF_CHECKED);
+ ::CheckMenuItem(hMenu, ID_VIEW_SHOWTITLEBAR, MF_BYCOMMAND | m_pContainer->m_dwFlags & CNT_NOTITLE ? MF_UNCHECKED : MF_CHECKED);
::EnableMenuItem(hMenu, ID_VIEW_SHOWTITLEBAR, CSkin::m_skinEnabled && CSkin::m_frameSkins ? MF_GRAYED : MF_ENABLED);
- ::CheckMenuItem(hMenu, ID_VIEW_TABSATBOTTOM, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_TABSBOTTOM ? MF_CHECKED : MF_UNCHECKED);
- ::CheckMenuItem(hMenu, ID_VIEW_VERTICALMAXIMIZE, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_VERTICALMAX ? MF_CHECKED : MF_UNCHECKED);
- ::CheckMenuItem(hMenu, ID_VIEW_SHOWTOOLBAR, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_HIDETOOLBAR ? MF_UNCHECKED : MF_CHECKED);
- ::CheckMenuItem(hMenu, ID_VIEW_BOTTOMTOOLBAR, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR ? MF_CHECKED : MF_UNCHECKED);
+ ::CheckMenuItem(hMenu, ID_VIEW_TABSATBOTTOM, MF_BYCOMMAND | m_pContainer->m_dwFlags & CNT_TABSBOTTOM ? MF_CHECKED : MF_UNCHECKED);
+ ::CheckMenuItem(hMenu, ID_VIEW_VERTICALMAXIMIZE, MF_BYCOMMAND | m_pContainer->m_dwFlags & CNT_VERTICALMAX ? MF_CHECKED : MF_UNCHECKED);
+ ::CheckMenuItem(hMenu, ID_VIEW_SHOWTOOLBAR, MF_BYCOMMAND | m_pContainer->m_dwFlags & CNT_HIDETOOLBAR ? MF_UNCHECKED : MF_CHECKED);
+ ::CheckMenuItem(hMenu, ID_VIEW_BOTTOMTOOLBAR, MF_BYCOMMAND | m_pContainer->m_dwFlags & CNT_BOTTOMTOOLBAR ? MF_CHECKED : MF_UNCHECKED);
::CheckMenuItem(hMenu, ID_VIEW_SHOWMULTISENDCONTACTLIST, MF_BYCOMMAND | (dat->m_sendMode & SMODE_MULTIPLE) ? MF_CHECKED : MF_UNCHECKED);
- ::CheckMenuItem(hMenu, ID_VIEW_STAYONTOP, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_STICKY ? MF_CHECKED : MF_UNCHECKED);
+ ::CheckMenuItem(hMenu, ID_VIEW_STAYONTOP, MF_BYCOMMAND | m_pContainer->m_dwFlags & CNT_STICKY ? MF_CHECKED : MF_UNCHECKED);
::EnableMenuItem(hMenu, 2, MF_BYPOSITION | (nen_options.bWindowCheck ? MF_GRAYED : MF_ENABLED));
- ::CheckMenuItem(hMenu, ID_EVENTPOPUPS_DISABLEALLEVENTPOPUPS, MF_BYCOMMAND | m_pContainer->dwFlags & (CNT_DONTREPORT | CNT_DONTREPORTUNFOCUSED | CNT_DONTREPORTFOCUSED | CNT_ALWAYSREPORTINACTIVE) ? MF_UNCHECKED : MF_CHECKED);
- ::CheckMenuItem(hMenu, ID_EVENTPOPUPS_SHOWPOPUPSIFWINDOWISMINIMIZED, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_DONTREPORT ? MF_CHECKED : MF_UNCHECKED);
- ::CheckMenuItem(hMenu, ID_EVENTPOPUPS_SHOWPOPUPSFORALLINACTIVESESSIONS, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_ALWAYSREPORTINACTIVE ? MF_CHECKED : MF_UNCHECKED);
- ::CheckMenuItem(hMenu, ID_EVENTPOPUPS_SHOWPOPUPSIFWINDOWISUNFOCUSED, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_DONTREPORTUNFOCUSED ? MF_CHECKED : MF_UNCHECKED);
- ::CheckMenuItem(hMenu, ID_EVENTPOPUPS_SHOWPOPUPSIFWINDOWISFOCUSED, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_DONTREPORTFOCUSED ? MF_CHECKED : MF_UNCHECKED);
-
- ::CheckMenuItem(hMenu, ID_WINDOWFLASHING_USEDEFAULTVALUES, MF_BYCOMMAND | (m_pContainer->dwFlags & (CNT_NOFLASH | CNT_FLASHALWAYS)) ? MF_UNCHECKED : MF_CHECKED);
- ::CheckMenuItem(hMenu, ID_WINDOWFLASHING_DISABLEFLASHING, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_NOFLASH ? MF_CHECKED : MF_UNCHECKED);
- ::CheckMenuItem(hMenu, ID_WINDOWFLASHING_FLASHUNTILFOCUSED, MF_BYCOMMAND | m_pContainer->dwFlags & CNT_FLASHALWAYS ? MF_CHECKED : MF_UNCHECKED);
+ ::CheckMenuItem(hMenu, ID_EVENTPOPUPS_DISABLEALLEVENTPOPUPS, MF_BYCOMMAND | m_pContainer->m_dwFlags & (CNT_DONTREPORT | CNT_DONTREPORTUNFOCUSED | CNT_DONTREPORTFOCUSED | CNT_ALWAYSREPORTINACTIVE) ? MF_UNCHECKED : MF_CHECKED);
+ ::CheckMenuItem(hMenu, ID_EVENTPOPUPS_SHOWPOPUPSIFWINDOWISMINIMIZED, MF_BYCOMMAND | m_pContainer->m_dwFlags & CNT_DONTREPORT ? MF_CHECKED : MF_UNCHECKED);
+ ::CheckMenuItem(hMenu, ID_EVENTPOPUPS_SHOWPOPUPSFORALLINACTIVESESSIONS, MF_BYCOMMAND | m_pContainer->m_dwFlags & CNT_ALWAYSREPORTINACTIVE ? MF_CHECKED : MF_UNCHECKED);
+ ::CheckMenuItem(hMenu, ID_EVENTPOPUPS_SHOWPOPUPSIFWINDOWISUNFOCUSED, MF_BYCOMMAND | m_pContainer->m_dwFlags & CNT_DONTREPORTUNFOCUSED ? MF_CHECKED : MF_UNCHECKED);
+ ::CheckMenuItem(hMenu, ID_EVENTPOPUPS_SHOWPOPUPSIFWINDOWISFOCUSED, MF_BYCOMMAND | m_pContainer->m_dwFlags & CNT_DONTREPORTFOCUSED ? MF_CHECKED : MF_UNCHECKED);
+
+ ::CheckMenuItem(hMenu, ID_WINDOWFLASHING_USEDEFAULTVALUES, MF_BYCOMMAND | (m_pContainer->m_dwFlags & (CNT_NOFLASH | CNT_FLASHALWAYS)) ? MF_UNCHECKED : MF_CHECKED);
+ ::CheckMenuItem(hMenu, ID_WINDOWFLASHING_DISABLEFLASHING, MF_BYCOMMAND | m_pContainer->m_dwFlags & CNT_NOFLASH ? MF_CHECKED : MF_UNCHECKED);
+ ::CheckMenuItem(hMenu, ID_WINDOWFLASHING_FLASHUNTILFOCUSED, MF_BYCOMMAND | m_pContainer->m_dwFlags & CNT_FLASHALWAYS ? MF_CHECKED : MF_UNCHECKED);
}
}
@@ -496,8 +496,8 @@ void CMenuBar::configureMenu() const void CMenuBar::autoShow(const int showcmd)
{
- if (m_mustAutoHide && !(m_pContainer->dwFlags & CNT_NOMENUBAR)) {
- m_pContainer->dwFlags |= CNT_NOMENUBAR;
+ if (m_mustAutoHide && !(m_pContainer->m_dwFlags & CNT_NOMENUBAR)) {
+ m_pContainer->m_dwFlags |= CNT_NOMENUBAR;
m_mustAutoHide = false;
::SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 1);
releaseHook();
@@ -508,9 +508,9 @@ void CMenuBar::autoShow(const int showcmd) return;
}
- if (m_pContainer->dwFlags & CNT_NOMENUBAR) {
+ if (m_pContainer->m_dwFlags & CNT_NOMENUBAR) {
m_mustAutoHide = true;
- m_pContainer->dwFlags &= ~CNT_NOMENUBAR;
+ m_pContainer->m_dwFlags &= ~CNT_NOMENUBAR;
::SendMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 1);
}
else // do nothing, already visible
@@ -923,7 +923,7 @@ LONG_PTR CALLBACK CTabBaseDlg::StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM rcLastStatusBarClick.top = pt.y - 2;
rcLastStatusBarClick.bottom = pt.y + 2;
- if (pContainer->dwFlags & CNT_NOTITLE) {
+ if (pContainer->m_dwFlags & CNT_NOTITLE) {
POINT pt1 = pt;
ScreenToClient(hWnd, &pt1);
@@ -960,7 +960,7 @@ LONG_PTR CALLBACK CTabBaseDlg::StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM if (!mir_strcmp(sid->szModule, MSG_ICON_MODULE)) {
if (sid->dwId == MSG_ICON_SOUND)
mir_snwprintf(wBuf, TranslateT("Sounds are %s. Click to toggle status, hold Shift and click to set for all open containers"),
- pContainer->dwFlags & CNT_NOSOUND ? TranslateT("disabled") : TranslateT("enabled"));
+ pContainer->m_dwFlags & CNT_NOSOUND ? TranslateT("disabled") : TranslateT("enabled"));
else if (sid->dwId == MSG_ICON_UTN && (!dat->isChat() || dat->m_si->iType == GCW_PRIVMESS)) {
int mtnStatus = g_plugin.getByte(dat->m_hContact, SRMSGSET_TYPING, g_plugin.getByte(SRMSGSET_TYPINGNEW, SRMSGDEFSET_TYPINGNEW));
@@ -989,12 +989,12 @@ LONG_PTR CALLBACK CTabBaseDlg::StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM CallService("mToolTip/ShowTipW", (WPARAM)wBuf, (LPARAM)&ti);
}
- if (SendMessage(dat->m_pContainer->hwndStatus, SB_GETTEXT, 0, (LPARAM)wBuf)) {
+ if (SendMessage(dat->m_pContainer->m_hwndStatus, SB_GETTEXT, 0, (LPARAM)wBuf)) {
HDC hdc;
- int iLen = SendMessage(dat->m_pContainer->hwndStatus, SB_GETTEXTLENGTH, 0, 0);
+ int iLen = SendMessage(dat->m_pContainer->m_hwndStatus, SB_GETTEXTLENGTH, 0, 0);
SendMessage(hWnd, SB_GETRECT, 0, (LPARAM)&rc);
- GetTextExtentPoint32(hdc = GetDC(dat->m_pContainer->hwndStatus), wBuf, iLen, &size);
- ReleaseDC(dat->m_pContainer->hwndStatus, hdc);
+ GetTextExtentPoint32(hdc = GetDC(dat->m_pContainer->m_hwndStatus), wBuf, iLen, &size);
+ ReleaseDC(dat->m_pContainer->m_hwndStatus, hdc);
if (PtInRect(&rc, pt) && ((rc.right - rc.left) < size.cx)) {
if (dat->isChat()) {
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index 9ac79c631f..3f113e3632 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -739,15 +739,15 @@ int tabSRMM_ShowPopup(MCONTACT hContact, MEVENT hDbEvent, WORD eventType, int wi if (nen_options.bWindowCheck && windowOpen) // no popups at all for open windows... no exceptions
return 0;
- if (pContainer->dwFlags & CNT_DONTREPORT && (IsIconic(pContainer->m_hwnd))) // in tray counts as "minimised"
+ if (pContainer->m_dwFlags & CNT_DONTREPORT && (IsIconic(pContainer->m_hwnd))) // in tray counts as "minimised"
goto passed;
- if (pContainer->dwFlags & CNT_DONTREPORTUNFOCUSED)
+ if (pContainer->m_dwFlags & CNT_DONTREPORTUNFOCUSED)
if (!IsIconic(pContainer->m_hwnd) && !pContainer->IsActive())
goto passed;
- if (pContainer->dwFlags & CNT_ALWAYSREPORTINACTIVE) {
- if (pContainer->dwFlags & CNT_DONTREPORTFOCUSED)
+ if (pContainer->m_dwFlags & CNT_ALWAYSREPORTINACTIVE) {
+ if (pContainer->m_dwFlags & CNT_DONTREPORTFOCUSED)
goto passed;
if (pContainer->m_hwndActive != hwndChild)
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 525f3746ee..c825414a33 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -130,7 +130,7 @@ bool CTabBaseDlg::DM_GenericHotkeysCheck(MSG *message) return true; case TABSRMM_HK_CONTAINEROPTIONS: - if (m_pContainer->hWndOptions == nullptr) + if (m_pContainer->m_hWndOptions == nullptr) CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_CONTAINEROPTIONS), m_pContainer->m_hwnd, DlgProcContainerOptions, (LPARAM)m_pContainer); return true; @@ -155,7 +155,7 @@ bool CTabBaseDlg::DM_GenericHotkeysCheck(MSG *message) return true; case TABSRMM_HK_TOGGLESIDEBAR: - if (m_pContainer->SideBar->isActive()) + if (m_pContainer->m_pSideBar->isActive()) SendMessage(m_hwnd, WM_COMMAND, IDC_TOGGLESIDEBAR, 0); return true; @@ -329,9 +329,9 @@ LRESULT CTabBaseDlg::DM_MsgWindowCmdHandler(UINT cmd, WPARAM wParam, LPARAM lPar case IDC_TOGGLETOOLBAR: if (lParam == 1) - ApplyContainerSetting(m_pContainer, CNT_NOMENUBAR, m_pContainer->dwFlags & CNT_NOMENUBAR ? 0 : 1, true); + ApplyContainerSetting(m_pContainer, CNT_NOMENUBAR, m_pContainer->m_dwFlags & CNT_NOMENUBAR ? 0 : 1, true); else - ApplyContainerSetting(m_pContainer, CNT_HIDETOOLBAR, m_pContainer->dwFlags & CNT_HIDETOOLBAR ? 0 : 1, true); + ApplyContainerSetting(m_pContainer, CNT_HIDETOOLBAR, m_pContainer->m_dwFlags & CNT_HIDETOOLBAR ? 0 : 1, true); break; case IDC_INFOPANELMENU: @@ -524,7 +524,7 @@ void CTabBaseDlg::DM_InitRichEdit() { bool fIsChat = isChat(); - COLORREF colour = fIsChat ? g_Settings.crLogBackground : m_pContainer->theme.bg; + COLORREF colour = fIsChat ? g_Settings.crLogBackground : m_pContainer->m_theme.bg; COLORREF inputcharcolor; char *szStreamOut = nullptr; @@ -533,7 +533,7 @@ void CTabBaseDlg::DM_InitRichEdit() SetWindowText(m_message.GetHwnd(), L""); m_log.SendMsg(EM_SETBKGNDCOLOR, 0, colour); - m_message.SendMsg(EM_SETBKGNDCOLOR, 0, m_pContainer->theme.inputbg); + m_message.SendMsg(EM_SETBKGNDCOLOR, 0, m_pContainer->m_theme.inputbg); CHARFORMAT2A cf2; memset(&cf2, 0, sizeof(CHARFORMAT2A)); @@ -546,7 +546,7 @@ void CTabBaseDlg::DM_InitRichEdit() cf2.dwMask = CFM_COLOR | CFM_FACE | CFM_CHARSET | CFM_SIZE | CFM_WEIGHT | CFM_ITALIC | CFM_BACKCOLOR; cf2.crTextColor = inputcharcolor; cf2.bCharSet = lf.lfCharSet; - cf2.crBackColor = m_pContainer->theme.inputbg; + cf2.crBackColor = m_pContainer->m_theme.inputbg; strncpy(cf2.szFaceName, lf.lfFaceName, LF_FACESIZE); cf2.dwEffects = 0; cf2.wWeight = (WORD)lf.lfWeight; @@ -554,8 +554,8 @@ void CTabBaseDlg::DM_InitRichEdit() cf2.yHeight = abs(lf.lfHeight) * 15; } else { - LOGFONTA lf = m_pContainer->theme.logFonts[MSGFONTID_MESSAGEAREA]; - inputcharcolor = m_pContainer->theme.fontColors[MSGFONTID_MESSAGEAREA]; + LOGFONTA lf = m_pContainer->m_theme.logFonts[MSGFONTID_MESSAGEAREA]; + inputcharcolor = m_pContainer->m_theme.fontColors[MSGFONTID_MESSAGEAREA]; for (auto &it : Utils::rtf_clrs) if (it->clr == inputcharcolor) @@ -597,7 +597,7 @@ void CTabBaseDlg::DM_InitRichEdit() pf2.dxStartIndent = 30; pf2.dxRightIndent = 30; } - pf2.dxOffset = m_pContainer->theme.left_indent + 30; + pf2.dxOffset = m_pContainer->m_theme.left_indent + 30; if (!fIsChat) { ClearLog(); @@ -625,7 +625,7 @@ void CTabBaseDlg::DM_InitRichEdit() void CTabBaseDlg::DM_SetDBButtonStates() { - ButtonItem *buttonItem = m_pContainer->buttonItems; + ButtonItem *buttonItem = m_pContainer->m_buttonItems; MCONTACT hFinalContact = 0; HWND hwndContainer = m_pContainer->m_hwnd; @@ -712,7 +712,7 @@ void CTabBaseDlg::DM_ScrollToBottom(WPARAM wParam, LPARAM lParam) void CTabBaseDlg::DM_RecalcPictureSize() { - HBITMAP hbm = ((m_pPanel.isActive()) && m_pContainer->avatarMode != 3) ? m_hOwnPic : (m_ace ? m_ace->hbmPic : PluginConfig.g_hbmUnknown); + HBITMAP hbm = ((m_pPanel.isActive()) && m_pContainer->m_avatarMode != 3) ? m_hOwnPic : (m_ace ? m_ace->hbmPic : PluginConfig.g_hbmUnknown); if (hbm) { BITMAP bminfo; GetObject(hbm, sizeof(bminfo), &bminfo); @@ -724,28 +724,28 @@ void CTabBaseDlg::DM_RecalcPictureSize() void CTabBaseDlg::DM_UpdateLastMessage() const { - if (m_pContainer->hwndStatus == nullptr || m_pContainer->m_hwndActive != m_hwnd) + if (m_pContainer->m_hwndStatus == nullptr || m_pContainer->m_hwndActive != m_hwnd) return; wchar_t szBuf[100]; if (m_bShowTyping) { - SendMessage(m_pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]); + SendMessage(m_pContainer->m_hwndStatus, SB_SETICON, 0, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]); mir_snwprintf(szBuf, TranslateT("%s is typing a message..."), m_cache->getNick()); } else if (m_bStatusSet) { - SendMessage(m_pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)m_szStatusIcon); - SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)m_szStatusText.c_str()); + SendMessage(m_pContainer->m_hwndStatus, SB_SETICON, 0, (LPARAM)m_szStatusIcon); + SendMessage(m_pContainer->m_hwndStatus, SB_SETTEXT, 0, (LPARAM)m_szStatusText.c_str()); return; } else { - SendMessage(m_pContainer->hwndStatus, SB_SETICON, 0, 0); + SendMessage(m_pContainer->m_hwndStatus, SB_SETICON, 0, 0); - if (m_pContainer->dwFlags & CNT_UINSTATUSBAR) + if (m_pContainer->m_dwFlags & CNT_UINSTATUSBAR) mir_snwprintf(szBuf, L"UID: %s", m_cache->getUIN()); else if (m_lastMessage) { wchar_t date[64], time[64]; TimeZone_PrintTimeStamp(nullptr, m_lastMessage, L"d", date, _countof(date), 0); - if (m_pContainer->dwFlags & CNT_UINSTATUSBAR && mir_wstrlen(date) > 6) + if (m_pContainer->m_dwFlags & CNT_UINSTATUSBAR && mir_wstrlen(date) > 6) date[mir_wstrlen(date) - 5] = 0; TimeZone_PrintTimeStamp(nullptr, m_lastMessage, L"t", time, _countof(time), 0); mir_snwprintf(szBuf, TranslateT("Last received: %s at %s"), date, time); @@ -753,7 +753,7 @@ void CTabBaseDlg::DM_UpdateLastMessage() const else szBuf[0] = 0; } - SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)szBuf); + SendMessage(m_pContainer->m_hwndStatus, SB_SETTEXT, 0, (LPARAM)szBuf); } ///////////////////////////////////////////////////////////////////////////////////////// @@ -799,7 +799,7 @@ LRESULT CTabBaseDlg::DM_MouseWheelHandler(WPARAM wParam, LPARAM lParam) if (PtInRect(&rc, pt)) return 1; - if (m_pContainer->dwFlags & CNT_SIDEBAR) { + if (m_pContainer->m_dwFlags & CNT_SIDEBAR) { GetWindowRect(GetDlgItem(m_pContainer->m_hwnd, IDC_SIDEBARUP), &rc); GetWindowRect(GetDlgItem(m_pContainer->m_hwnd, IDC_SIDEBARDOWN), &rc1); rc.bottom = rc1.bottom; @@ -940,15 +940,15 @@ void CTabBaseDlg::DM_NotifyTyping(int mode) void CSrmmWindow::DM_OptionsApplied(WPARAM, LPARAM lParam) { m_szMicroLf[0] = 0; - if (!(m_pContainer->theme.isPrivate)) { + if (!(m_pContainer->m_theme.isPrivate)) { LoadThemeDefaults(m_pContainer); - m_dwFlags = m_pContainer->theme.dwFlags; + m_dwFlags = m_pContainer->m_theme.dwFlags; } LoadLocalFlags(); m_hTimeZone = TimeZone_CreateByContact(m_hContact, nullptr, TZF_KNOWNONLY); - m_bShowUIElements = (m_pContainer->dwFlags & CNT_HIDETOOLBAR) == 0; + m_bShowUIElements = (m_pContainer->m_dwFlags & CNT_HIDETOOLBAR) == 0; m_dwFlagsEx = M.GetByte(m_hContact, "splitoverride", 0) ? MWF_SHOW_SPLITTEROVERRIDE : 0; m_pPanel.getVisibility(); @@ -981,7 +981,7 @@ void CSrmmWindow::DM_OptionsApplied(WPARAM, LPARAM lParam) void CTabBaseDlg::DM_Typing(bool fForceOff) { HWND hwndContainer = m_pContainer->m_hwnd; - HWND hwndStatus = m_pContainer->hwndStatus; + HWND hwndStatus = m_pContainer->m_hwndStatus; if (m_nTypeMode == PROTOTYPE_SELFTYPING_ON && GetTickCount() - m_nLastTyping > TIMEOUT_TYPEOFF) DM_NotifyTyping(PROTOTYPE_SELFTYPING_OFF); @@ -1008,7 +1008,7 @@ void CTabBaseDlg::DM_Typing(bool fForceOff) m_pContainer->UpdateTitle(0); else m_pContainer->UpdateTitle(0, dat_active); - if (!(m_pContainer->dwFlags & CNT_NOFLASH) && PluginConfig.m_FlashOnMTN) + if (!(m_pContainer->m_dwFlags & CNT_NOFLASH) && PluginConfig.m_FlashOnMTN) ReflashContainer(m_pContainer); } } @@ -1031,8 +1031,8 @@ void CTabBaseDlg::DM_Typing(bool fForceOff) } if (IsIconic(hwndContainer) || !IsActive()) { SetWindowText(hwndContainer, m_wszStatusBar); - m_pContainer->dwFlags |= CNT_NEED_UPDATETITLE; - if (!(m_pContainer->dwFlags & CNT_NOFLASH) && PluginConfig.m_FlashOnMTN) + m_pContainer->m_dwFlags |= CNT_NEED_UPDATETITLE; + if (!(m_pContainer->m_dwFlags & CNT_NOFLASH) && PluginConfig.m_FlashOnMTN) ReflashContainer(m_pContainer); } @@ -1043,12 +1043,12 @@ void CTabBaseDlg::DM_Typing(bool fForceOff) } else { // active tab may show icon if status bar is disabled if (!hwndStatus) { - if (TabCtrl_GetItemCount(m_hwndParent) > 1 || !(m_pContainer->dwFlags & CNT_HIDETABS)) + if (TabCtrl_GetItemCount(m_hwndParent) > 1 || !(m_pContainer->m_dwFlags & CNT_HIDETABS)) HandleIconFeedback(this, PluginConfig.g_IconTypingEvent); } } - if ((GetForegroundWindow() != hwndContainer) || (m_pContainer->hwndStatus == nullptr) || (m_pContainer->m_hwndActive != m_hwnd)) - SendMessage(hwndContainer, DM_SETICON, (WPARAM)this, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]); + if ((GetForegroundWindow() != hwndContainer) || (m_pContainer->m_hwndStatus == nullptr) || (m_pContainer->m_hwndActive != m_hwnd)) + m_pContainer->SetIcon(this, PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]); m_bShowTyping = 1; } @@ -1063,7 +1063,7 @@ int CTabBaseDlg::DM_SplitterGlobalEvent(WPARAM wParam, LPARAM lParam) { CTabBaseDlg *srcDat = PluginConfig.lastSPlitterPos.pSrcDat; TContainerData *srcCnt = PluginConfig.lastSPlitterPos.pSrcContainer; - bool fCntGlobal = (!m_pContainer->settings->fPrivate ? true : false); + bool fCntGlobal = (!m_pContainer->m_pSettings->fPrivate ? true : false); if (m_bIsAutosizingInput) return 0; @@ -1086,7 +1086,7 @@ int CTabBaseDlg::DM_SplitterGlobalEvent(WPARAM wParam, LPARAM lParam) newPos = 0; if (this == srcDat) { - m_pContainer->settings->iSplitterY = m_iSplitterY; + m_pContainer->m_pSettings->iSplitterY = m_iSplitterY; if (fCntGlobal) SaveSplitter(); return 0; @@ -1094,7 +1094,7 @@ int CTabBaseDlg::DM_SplitterGlobalEvent(WPARAM wParam, LPARAM lParam) if (!fCntGlobal && m_pContainer != srcCnt) return 0; - if (srcCnt->settings->fPrivate && m_pContainer != srcCnt) + if (srcCnt->m_pSettings->fPrivate && m_pContainer != srcCnt) return 0; // for inactive sessions, delay the splitter repositioning until they become @@ -1153,7 +1153,7 @@ void CTabBaseDlg::DM_EventAdded(WPARAM hContact, LPARAM lParam) m_bShowTyping = 0; } HandleIconFeedback(this, (HICON)-1); - if (m_pContainer->hwndStatus) + if (m_pContainer->m_hwndStatus) PostMessage(m_hwnd, DM_UPDATELASTMESSAGE, 0, 0); } @@ -1171,9 +1171,9 @@ void CTabBaseDlg::DM_EventAdded(WPARAM hContact, LPARAM lParam) DM_AddDivider(); } if (!bDisableNotify) - tabSRMM_ShowPopup(hContact, hDbEvent, dbei.eventType, m_pContainer->fHidden ? 0 : 1, m_pContainer, m_hwnd, m_cache->getActiveProto()); + tabSRMM_ShowPopup(hContact, hDbEvent, dbei.eventType, m_pContainer->m_bHidden ? 0 : 1, m_pContainer, m_hwnd, m_cache->getActiveProto()); if (IsWindowVisible(m_pContainer->m_hwnd)) - m_pContainer->fHidden = false; + m_pContainer->m_bHidden = false; } m_cache->updateStats(TSessionStats::UPDATE_WITH_LAST_RCV, 0); @@ -1228,7 +1228,7 @@ void CTabBaseDlg::DM_EventAdded(WPARAM hContact, LPARAM lParam) ShowWindow(m_pContainer->m_hwndActive, SW_HIDE); m_pContainer->m_hwndActive = m_hwnd; m_pContainer->UpdateTitle(m_hContact); - m_pContainer->dwFlags |= CNT_DEFERREDTABSELECT; + m_pContainer->m_dwFlags |= CNT_DEFERREDTABSELECT; } } } @@ -1237,10 +1237,10 @@ void CTabBaseDlg::DM_EventAdded(WPARAM hContact, LPARAM lParam) // flash window if it is not focused if (!bDisableNotify && !bIsStatusChangeEvent) if (!IsActive() && !(dbei.flags & DBEF_SENT)) { - if (!(m_pContainer->dwFlags & CNT_NOFLASH) && !m_pContainer->IsActive()) + if (!(m_pContainer->m_dwFlags & CNT_NOFLASH) && !m_pContainer->IsActive()) FlashContainer(m_pContainer, 1, 0); - SendMessage(m_pContainer->m_hwnd, DM_SETICON, (WPARAM)this, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE)); - m_pContainer->dwFlags |= CNT_NEED_UPDATETITLE; + m_pContainer->SetIcon(this, Skin_LoadIcon(SKINICON_EVENT_MESSAGE)); + m_pContainer->m_dwFlags |= CNT_NEED_UPDATETITLE; } // play a sound @@ -1280,7 +1280,7 @@ void CTabBaseDlg::DM_HandleAutoSizeRequest(REQRESIZE* rr) iNewHeight = (cy - panelHeight) / 2; m_dynaSplitter = iNewHeight - DPISCALEY_S(2); - if (m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR) + if (m_pContainer->m_dwFlags & CNT_BOTTOMTOOLBAR) m_dynaSplitter += DPISCALEY_S(22); m_iSplitterY = m_dynaSplitter + DPISCALEY_S(34); DM_RecalcPictureSize(); @@ -1321,7 +1321,7 @@ void CTabBaseDlg::DrawStatusIcons(HDC hDC, const RECT &rc, int gap) DrawIconEx(hDC, x, y, PluginConfig.g_buttonBarIcons[ICON_DEFAULT_SOUNDS], PluginConfig.m_smcxicon, PluginConfig.m_smcyicon, 0, nullptr, DI_NORMAL); - DrawIconEx(hDC, x, y, m_pContainer->dwFlags & CNT_NOSOUND ? + DrawIconEx(hDC, x, y, m_pContainer->m_dwFlags & CNT_NOSOUND ? PluginConfig.g_iconOverlayDisabled : PluginConfig.g_iconOverlayEnabled, PluginConfig.m_smcxicon, PluginConfig.m_smcyicon, 0, nullptr, DI_NORMAL); } @@ -1374,18 +1374,18 @@ void CTabBaseDlg::CheckStatusIconClick(POINT pt, const RECT &rc, int gap, int co if (sid->dwId == MSG_ICON_SOUND && code != NM_RCLICK) { if (GetKeyState(VK_SHIFT) & 0x8000) { for (TContainerData *p = pFirstContainer; p; p = p->pNext) { - p->dwFlags = ((m_pContainer->dwFlags & CNT_NOSOUND) ? p->dwFlags | CNT_NOSOUND : p->dwFlags & ~CNT_NOSOUND); - InvalidateRect(m_pContainer->hwndStatus, nullptr, TRUE); + p->m_dwFlags = ((m_pContainer->m_dwFlags & CNT_NOSOUND) ? p->m_dwFlags | CNT_NOSOUND : p->m_dwFlags & ~CNT_NOSOUND); + InvalidateRect(m_pContainer->m_hwndStatus, nullptr, TRUE); } } else { - m_pContainer->dwFlags ^= CNT_NOSOUND; - InvalidateRect(m_pContainer->hwndStatus, nullptr, TRUE); + m_pContainer->m_dwFlags ^= CNT_NOSOUND; + InvalidateRect(m_pContainer->m_hwndStatus, nullptr, TRUE); } } else if (sid->dwId == MSG_ICON_UTN && code != NM_RCLICK && (!isChat() || m_si->iType == GCW_PRIVMESS)) { SendMessage(m_pContainer->m_hwndActive, WM_COMMAND, IDC_SELFTYPING, 0); - InvalidateRect(m_pContainer->hwndStatus, nullptr, TRUE); + InvalidateRect(m_pContainer->m_hwndStatus, nullptr, TRUE); } else if (sid->dwId == MSG_ICON_SESSION) { if (code == NM_CLICK) @@ -1401,7 +1401,7 @@ void CTabBaseDlg::CheckStatusIconClick(POINT pt, const RECT &rc, int gap, int co sicd.szModule = sid->szModule; sicd.flags = (code == NM_RCLICK ? MBCF_RIGHTBUTTON : 0); Srmm_ClickStatusIcon(m_hContact, &sicd); - InvalidateRect(m_pContainer->hwndStatus, nullptr, TRUE); + InvalidateRect(m_pContainer->m_hwndStatus, nullptr, TRUE); } } diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp index 5c1495c615..cbef09d56a 100644 --- a/plugins/TabSRMM/src/hotkeyhandler.cpp +++ b/plugins/TabSRMM/src/hotkeyhandler.cpp @@ -99,7 +99,7 @@ void TSAPI HandleMenuEntryFromhContact(MCONTACT hContact) SendMessage(hWnd, DM_QUERYCONTAINER, 0, (LPARAM)&pContainer);
if (pContainer) {
ActivateExistingTab(pContainer, hWnd);
- pContainer->hwndSaved = nullptr;
+ pContainer->m_hwndSaved = nullptr;
SetForegroundWindow(pContainer->m_hwnd);
}
else CallService(MS_MSG_SENDMESSAGE, hContact, 0);
@@ -400,8 +400,8 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (M.m_pfnDwmExtendFrameIntoClientArea)
M.m_pfnDwmExtendFrameIntoClientArea(pCont->m_hwnd, &m);
}
- if (pCont->SideBar)
- if (pCont->SideBar->isActive()) // the container for the sidebar buttons
+ if (pCont->m_pSideBar)
+ if (pCont->m_pSideBar->isActive()) // the container for the sidebar buttons
RedrawWindow(GetDlgItem(pCont->m_hwnd, 5000), nullptr, nullptr, RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW);
RedrawWindow(pCont->m_hwnd, nullptr, nullptr, RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW | RDW_ALLCHILDREN);
}
@@ -483,11 +483,11 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP case WM_DISPLAYCHANGE:
for (TContainerData *pCont = pFirstContainer; pCont; pCont = pCont->pNext)
if (CSkin::m_skinEnabled) { // invalidate cached background DCs for skinned containers
- pCont->oldDCSize.cx = pCont->oldDCSize.cy = 0;
- SelectObject(pCont->cachedDC, pCont->oldHBM);
- DeleteObject(pCont->cachedHBM);
- DeleteDC(pCont->cachedDC);
- pCont->cachedDC = nullptr;
+ pCont->m_oldDCSize.cx = pCont->m_oldDCSize.cy = 0;
+ SelectObject(pCont->m_cachedDC, pCont->m_oldHBM);
+ DeleteObject(pCont->m_cachedHBM);
+ DeleteDC(pCont->m_cachedDC);
+ pCont->m_cachedDC = nullptr;
RedrawWindow(pCont->m_hwnd, nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW | RDW_FRAME);
}
break;
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index 96d4b09732..33dd5f359a 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -79,8 +79,8 @@ void CInfoPanel::loadHeight() m_height = M.GetDword(m_dat->m_hContact, "panelheight", -1);
if (m_height == -1 || HIWORD(m_height) == 0) {
- if (m_dat->m_pContainer->settings->fPrivate)
- m_height = m_dat->m_pContainer->settings->panelheight;
+ if (m_dat->m_pContainer->m_pSettings->fPrivate)
+ m_height = m_dat->m_pContainer->m_pSettings->panelheight;
else
m_height = bSync ? m_defaultHeight : (m_isChat ? m_defaultMUCHeight : m_defaultHeight);
m_fPrivateHeight = false;
@@ -106,8 +106,8 @@ void CInfoPanel::saveHeight(bool fFlush) if (m_height < 110 && m_height >= MIN_PANELHEIGHT) { // only save valid panel splitter positions
if (!m_fPrivateHeight) {
if (!m_isChat || bSync) {
- if (m_dat->m_pContainer->settings->fPrivate)
- m_dat->m_pContainer->settings->panelheight = m_height;
+ if (m_dat->m_pContainer->m_pSettings->fPrivate)
+ m_dat->m_pContainer->m_pSettings->panelheight = m_height;
else {
PluginConfig.m_panelHeight = m_height;
m_defaultHeight = m_height;
@@ -116,8 +116,8 @@ void CInfoPanel::saveHeight(bool fFlush) }
}
else if (m_isChat && !bSync) {
- if (m_dat->m_pContainer->settings->fPrivate)
- m_dat->m_pContainer->settings->panelheight = m_height;
+ if (m_dat->m_pContainer->m_pSettings->fPrivate)
+ m_dat->m_pContainer->m_pSettings->panelheight = m_height;
else {
PluginConfig.m_MUCpanelHeight = m_height;
m_defaultMUCHeight = m_height;
@@ -147,7 +147,7 @@ void CInfoPanel::setHeight(LONG newHeight, bool fBroadcast) if (fBroadcast) {
if (!m_fPrivateHeight) {
- if (!m_dat->m_pContainer->settings->fPrivate)
+ if (!m_dat->m_pContainer->m_pSettings->fPrivate)
Srmm_Broadcast(DM_SETINFOPANEL, (WPARAM)m_dat, (LPARAM)newHeight);
else
::BroadCastContainer(m_dat->m_pContainer, DM_SETINFOPANEL, (WPARAM)m_dat, (LPARAM)newHeight);
@@ -163,7 +163,7 @@ void CInfoPanel::Configure() const void CInfoPanel::showHide() const
{
- HBITMAP hbm = (m_active && m_dat->m_pContainer->avatarMode != 3) ? m_dat->m_hOwnPic : (m_dat->m_ace ? m_dat->m_ace->hbmPic : PluginConfig.g_hbmUnknown);
+ HBITMAP hbm = (m_active && m_dat->m_pContainer->m_avatarMode != 3) ? m_dat->m_hOwnPic : (m_dat->m_ace ? m_dat->m_ace->hbmPic : PluginConfig.g_hbmUnknown);
HWND hwndDlg = m_dat->GetHwnd();
if (!m_isChat) {
@@ -223,7 +223,7 @@ bool CInfoPanel::getVisibility() return false;
}
- BYTE bDefault = (m_dat->m_pContainer->dwFlags & CNT_INFOPANEL) ? 1 : 0;
+ BYTE bDefault = (m_dat->m_pContainer->m_dwFlags & CNT_INFOPANEL) ? 1 : 0;
BYTE bContact = M.GetByte(m_dat->m_hContact, "infopanel", 0);
BYTE visible = (bContact == 0 ? bDefault : (bContact == (BYTE)-1 ? 0 : 1));
@@ -1078,7 +1078,7 @@ INT_PTR CALLBACK CInfoPanel::ConfigDlgProc(HWND hwnd, UINT msg, WPARAM wParam, L ::CheckDlgButton(hwnd, IDC_NOSYNC, M.GetByte("syncAllPanels", 0) ? BST_UNCHECKED : BST_CHECKED);
- Utils::showDlgControl(hwnd, IDC_IPCONFIG_PRIVATECONTAINER, m_dat->m_pContainer->settings->fPrivate ? SW_SHOW : SW_HIDE);
+ Utils::showDlgControl(hwnd, IDC_IPCONFIG_PRIVATECONTAINER, m_dat->m_pContainer->m_pSettings->fPrivate ? SW_SHOW : SW_HIDE);
if (!m_isChat) {
v = db_get_b(m_dat->m_hContact, SRMSGMOD_T, "hideavatar", -1);
@@ -1193,13 +1193,13 @@ INT_PTR CALLBACK CInfoPanel::ConfigDlgProc(HWND hwnd, UINT msg, WPARAM wParam, L db_set_b(0, SRMSGMOD_T, "syncAllPanels", ::IsDlgButtonChecked(hwnd, IDC_NOSYNC) ? 0 : 1);
if (BST_UNCHECKED == IsDlgButtonChecked(hwnd, IDC_NOSYNC)) {
loadHeight();
- if (!m_dat->m_pContainer->settings->fPrivate)
+ if (!m_dat->m_pContainer->m_pSettings->fPrivate)
Srmm_Broadcast(DM_SETINFOPANEL, (WPARAM)m_dat, (LPARAM)m_defaultHeight);
else
::BroadCastContainer(m_dat->m_pContainer, DM_SETINFOPANEL, (WPARAM)m_dat, (LPARAM)m_defaultHeight);
}
else {
- if (!m_dat->m_pContainer->settings->fPrivate)
+ if (!m_dat->m_pContainer->m_pSettings->fPrivate)
Srmm_Broadcast(DM_SETINFOPANEL, (WPARAM)m_dat, 0);
else
::BroadCastContainer(m_dat->m_pContainer, DM_SETINFOPANEL, (WPARAM)m_dat, 0);
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index 30e8e92d39..2cd7af03cc 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -237,7 +237,7 @@ int CMimAPI::TypingMessage(WPARAM hContact, LPARAM mode) } else fShowOnClist = false; - if ((!foundWin || !(pContainer->dwFlags & CNT_NOSOUND)) && preTyping != (mode != 0)) + if ((!foundWin || !(pContainer->m_dwFlags & CNT_NOSOUND)) && preTyping != (mode != 0)) Skin_PlaySound(mode ? "TNStart" : "TNStop"); if (g_plugin.getByte("ShowTypingPopup", 0)) { @@ -259,7 +259,7 @@ int CMimAPI::TypingMessage(WPARAM hContact, LPARAM mode) if (PluginConfig.m_bHideOnClose) { TContainerData *pCont = nullptr; SendMessage(hwnd, DM_QUERYCONTAINER, 0, (LPARAM)&pCont); - if (pCont && pCont->fHidden) + if (pCont && pCont->m_bHidden) fShow = true; } } diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 625dbe7f8a..fcd69dcf9e 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -83,7 +83,7 @@ void CTabBaseDlg::ShowPopupMenu(const CCtrlBase &pCtrl, POINT pt) EnableMenuItem(hSubMenu, IDM_PASTEFORMATTED, MF_BYCOMMAND | (m_SendFormat != 0 ? MF_ENABLED : MF_GRAYED));
EnableMenuItem(hSubMenu, ID_EDITOR_PASTEANDSENDIMMEDIATELY, MF_BYCOMMAND | (PluginConfig.m_PasteAndSend ? MF_ENABLED : MF_GRAYED));
CheckMenuItem(hSubMenu, ID_EDITOR_SHOWMESSAGELENGTHINDICATOR, MF_BYCOMMAND | (PluginConfig.m_visualMessageSizeIndicator ? MF_CHECKED : MF_UNCHECKED));
- EnableMenuItem(hSubMenu, ID_EDITOR_SHOWMESSAGELENGTHINDICATOR, MF_BYCOMMAND | (m_pContainer->hwndStatus ? MF_ENABLED : MF_GRAYED));
+ EnableMenuItem(hSubMenu, ID_EDITOR_SHOWMESSAGELENGTHINDICATOR, MF_BYCOMMAND | (m_pContainer->m_hwndStatus ? MF_ENABLED : MF_GRAYED));
}
TranslateMenu(hSubMenu);
pCtrl.SendMsg(EM_EXGETSEL, 0, (LPARAM)&sel);
@@ -151,8 +151,8 @@ void CTabBaseDlg::ShowPopupMenu(const CCtrlBase &pCtrl, POINT pt) db_set_b(0, SRMSGMOD_T, "msgsizebar", (BYTE)PluginConfig.m_visualMessageSizeIndicator);
Srmm_Broadcast(DM_CONFIGURETOOLBAR, 0, 0);
Resize();
- if (m_pContainer->hwndStatus)
- RedrawWindow(m_pContainer->hwndStatus, nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW);
+ if (m_pContainer->m_hwndStatus)
+ RedrawWindow(m_pContainer->m_hwndStatus, nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW);
break;
case ID_EDITOR_PASTEANDSENDIMMEDIATELY:
HandlePasteAndSend();
@@ -244,9 +244,9 @@ void CSrmmWindow::MsgWindowUpdateState(UINT msg) return;
if (msg == WM_ACTIVATE) {
- if (m_pContainer->dwFlags & CNT_TRANSPARENCY) {
- DWORD trans = LOWORD(m_pContainer->settings->dwTransparency);
- SetLayeredWindowAttributes(m_pContainer->m_hwnd, 0, (BYTE)trans, (m_pContainer->dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
+ if (m_pContainer->m_dwFlags & CNT_TRANSPARENCY) {
+ DWORD trans = LOWORD(m_pContainer->m_pSettings->dwTransparency);
+ SetLayeredWindowAttributes(m_pContainer->m_hwnd, 0, (BYTE)trans, (m_pContainer->m_dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
}
}
@@ -259,10 +259,10 @@ void CSrmmWindow::MsgWindowUpdateState(UINT msg) m_pWnd->activateTab();
m_pPanel.dismissConfig();
m_dwUnread = 0;
- if (m_pContainer->hwndSaved == m_hwnd)
+ if (m_pContainer->m_hwndSaved == m_hwnd)
return;
- m_pContainer->hwndSaved = m_hwnd;
+ m_pContainer->m_hwndSaved = m_hwnd;
m_dwTickLastEvent = 0;
m_dwFlags &= ~MWF_DIVIDERSET;
@@ -270,9 +270,9 @@ void CSrmmWindow::MsgWindowUpdateState(UINT msg) FlashTab(false);
m_bCanFlashTab = false;
}
- if (m_pContainer->dwFlashingStarted != 0) {
+ if (m_pContainer->m_dwFlashingStarted != 0) {
FlashContainer(m_pContainer, 0, 0);
- m_pContainer->dwFlashingStarted = 0;
+ m_pContainer->m_dwFlashingStarted = 0;
}
if (m_dwFlagsEx & MWF_SHOW_FLASHCLIST) {
m_dwFlagsEx &= ~MWF_SHOW_FLASHCLIST;
@@ -280,7 +280,7 @@ void CSrmmWindow::MsgWindowUpdateState(UINT msg) g_clistApi.pfnRemoveEvent(m_hContact, m_hFlashingEvent);
m_hFlashingEvent = 0;
}
- m_pContainer->dwFlags &= ~CNT_NEED_UPDATETITLE;
+ m_pContainer->m_dwFlags &= ~CNT_NEED_UPDATETITLE;
if ((m_dwFlags & MWF_DEFERREDREMAKELOG) && !IsIconic(m_pContainer->m_hwnd)) {
SendMessage(m_hwnd, DM_REMAKELOG, 0, 0);
@@ -290,14 +290,14 @@ void CSrmmWindow::MsgWindowUpdateState(UINT msg) if (m_dwFlags & MWF_NEEDCHECKSIZE)
PostMessage(m_hwnd, DM_SAVESIZE, 0, 0);
- m_pContainer->hIconTaskbarOverlay = nullptr;
+ m_pContainer->m_hIconTaskbarOverlay = nullptr;
m_pContainer->UpdateTitle(m_hContact);
tabUpdateStatusBar();
m_dwLastActivity = GetTickCount();
- m_pContainer->dwLastActivity = m_dwLastActivity;
+ m_pContainer->m_dwLastActivity = m_dwLastActivity;
- m_pContainer->MenuBar->configureMenu();
+ m_pContainer->m_pMenuBar->configureMenu();
UpdateTrayMenuState(this, FALSE);
if (m_pContainer->m_hwndActive == m_hwnd)
@@ -344,8 +344,8 @@ void CSrmmWindow::MsgWindowUpdateState(UINT msg) BB_SetButtonsPos();
if (M.isAero())
InvalidateRect(m_hwndParent, nullptr, FALSE);
- if (m_pContainer->dwFlags & CNT_SIDEBAR)
- m_pContainer->SideBar->setActiveItem(this);
+ if (m_pContainer->m_dwFlags & CNT_SIDEBAR)
+ m_pContainer->m_pSideBar->setActiveItem(this);
if (m_pWnd)
m_pWnd->Invalidate();
@@ -640,7 +640,7 @@ bool CSrmmWindow::OnInitDialog() m_hwndPanelPicParent = CreateWindowEx(WS_EX_TOPMOST, L"Static", L"", SS_OWNERDRAW | WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, m_hwnd, (HMENU)6000, nullptr, nullptr);
mir_subclassWindow(m_hwndPanelPicParent, CInfoPanel::avatarParentSubclass);
- m_bShowUIElements = (m_pContainer->dwFlags & CNT_HIDETOOLBAR) == 0;
+ m_bShowUIElements = (m_pContainer->m_dwFlags & CNT_HIDETOOLBAR) == 0;
m_sendMode |= m_hContact == 0 ? SMODE_MULTIPLE : 0;
m_sendMode |= M.GetByte(m_hContact, "no_ack", 0) ? SMODE_NOACK : 0;
@@ -668,7 +668,7 @@ bool CSrmmWindow::OnInitDialog() m_iLastEventType = 0xffffffff;
// load log option flags...
- m_dwFlags = m_pContainer->theme.dwFlags;
+ m_dwFlags = m_pContainer->m_theme.dwFlags;
// consider per-contact message setting overrides
if (m_hContact && M.GetDword(m_hContact, "mwmask", 0))
@@ -807,7 +807,7 @@ bool CSrmmWindow::OnInitDialog() LoadSplitter();
ShowPicture(true);
- if (m_pContainer->dwFlags & CNT_CREATE_MINIMIZED || !m_bActivate || m_pContainer->dwFlags & CNT_DEFERREDTABSELECT) {
+ if (m_pContainer->m_dwFlags & CNT_CREATE_MINIMIZED || !m_bActivate || m_pContainer->m_dwFlags & CNT_DEFERREDTABSELECT) {
m_iFlashIcon = PluginConfig.g_IconMsgEvent;
SetTimer(m_hwnd, TIMERID_FLASHWND, TIMEOUT_FLASHWND, nullptr);
m_bCanFlashTab = true;
@@ -816,8 +816,8 @@ bool CSrmmWindow::OnInitDialog() dbei.eventType = EVENTTYPE_MESSAGE;
FlashOnClist(m_hDbEventFirst, &dbei);
- SendMessage(m_pContainer->m_hwnd, DM_SETICON, (WPARAM)this, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
- m_pContainer->dwFlags |= CNT_NEED_UPDATETITLE;
+ m_pContainer->SetIcon(this, Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
+ m_pContainer->m_dwFlags |= CNT_NEED_UPDATETITLE;
m_dwFlags |= MWF_NEEDCHECKSIZE | MWF_WASBACKGROUNDCREATE | MWF_DEFERREDSCROLL;
}
@@ -827,17 +827,17 @@ bool CSrmmWindow::OnInitDialog() SetActiveWindow(m_hwnd);
SetForegroundWindow(m_hwnd);
}
- else if (m_pContainer->dwFlags & CNT_CREATE_MINIMIZED) {
+ else if (m_pContainer->m_dwFlags & CNT_CREATE_MINIMIZED) {
m_dwFlags |= MWF_DEFERREDSCROLL;
ShowWindow(m_hwnd, SW_SHOWNOACTIVATE);
m_pContainer->m_hwndActive = m_hwnd;
- m_pContainer->dwFlags |= CNT_DEFERREDCONFIGURE;
+ m_pContainer->m_dwFlags |= CNT_DEFERREDCONFIGURE;
}
m_pContainer->UpdateTitle(m_hContact);
DM_RecalcPictureSize();
m_dwLastActivity = GetTickCount() - 1000;
- m_pContainer->dwLastActivity = m_dwLastActivity;
+ m_pContainer->m_dwLastActivity = m_dwLastActivity;
if (m_hwndHPP)
mir_subclassWindow(m_hwndHPP, HPPKFSubclassProc);
@@ -845,8 +845,8 @@ bool CSrmmWindow::OnInitDialog() m_dwFlags &= ~MWF_INITMODE;
NotifyEvent(MSG_WINDOW_EVT_OPEN);
- if (m_pContainer->dwFlags & CNT_CREATE_MINIMIZED) {
- m_pContainer->dwFlags &= ~CNT_CREATE_MINIMIZED;
+ if (m_pContainer->m_dwFlags & CNT_CREATE_MINIMIZED) {
+ m_pContainer->m_dwFlags &= ~CNT_CREATE_MINIMIZED;
m_pContainer->m_hwndActive = m_hwnd;
}
return true;
@@ -856,8 +856,8 @@ void CSrmmWindow::OnDestroy() {
m_pContainer->ClearMargins();
PostMessage(m_pContainer->m_hwnd, WM_SIZE, 0, 1);
- if (m_pContainer->dwFlags & CNT_SIDEBAR)
- m_pContainer->SideBar->removeSession(this);
+ if (m_pContainer->m_dwFlags & CNT_SIDEBAR)
+ m_pContainer->m_pSideBar->removeSession(this);
m_cache->setWindowData();
if (m_hContact && M.GetByte("deletetemp", 0))
if (db_get_b(m_hContact, "CList", "NotOnList", 0))
@@ -1037,8 +1037,8 @@ void CSrmmWindow::UpdateTitle() }
if (m_iTabID >= 0) {
TabCtrl_SetItem(m_hwndParent, m_iTabID, &item);
- if (m_pContainer->dwFlags & CNT_SIDEBAR)
- m_pContainer->SideBar->updateSession(this);
+ if (m_pContainer->m_dwFlags & CNT_SIDEBAR)
+ m_pContainer->m_pSideBar->updateSession(this);
}
if (m_pContainer->m_hwndActive == m_hwnd && bChanged)
m_pContainer->UpdateTitle(m_hContact);
@@ -1058,7 +1058,7 @@ void CSrmmWindow::UpdateTitle() // care about MetaContacts and update the statusbar icon with the currently "most online" contact...
if (m_bIsMeta) {
PostMessage(m_hwnd, DM_OWNNICKCHANGED, 0, 0);
- if (m_pContainer->dwFlags & CNT_UINSTATUSBAR)
+ if (m_pContainer->m_dwFlags & CNT_UINSTATUSBAR)
DM_UpdateLastMessage();
}
}
@@ -1270,7 +1270,7 @@ void CSrmmWindow::onChange_Message(CCtrlEdit*) UpdateReadChars();
m_dwFlags |= MWF_NEEDHISTORYSAVE;
m_dwLastActivity = GetTickCount();
- m_pContainer->dwLastActivity = m_dwLastActivity;
+ m_pContainer->m_dwLastActivity = m_dwLastActivity;
UpdateSaveAndSendButton();
if (!(GetKeyState(VK_CONTROL) & 0x8000)) {
m_nLastTyping = GetTickCount();
@@ -1294,8 +1294,8 @@ int CSrmmWindow::Resizer(UTILRESIZECONTROL *urc) bool bInfoPanel = m_pPanel.isActive();
bool bErrorState = (m_dwFlags & MWF_ERRORSTATE) != 0;
- bool bShowToolbar = (m_pContainer->dwFlags & CNT_HIDETOOLBAR) == 0;
- bool bBottomToolbar = (m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR) != 0;
+ bool bShowToolbar = (m_pContainer->m_dwFlags & CNT_HIDETOOLBAR) == 0;
+ bool bBottomToolbar = (m_pContainer->m_dwFlags & CNT_BOTTOMTOOLBAR) != 0;
RECT rc, rcButton;
GetClientRect(m_log.GetHwnd(), &rc);
@@ -1481,7 +1481,7 @@ int CSrmmWindow::OnFilter(MSGFILTER *pFilter) if (msg == WM_SYSKEYUP) {
if (wp == VK_MENU)
if (!m_bkeyProcessed && !(GetKeyState(VK_CONTROL) & 0x8000) && !(GetKeyState(VK_SHIFT) & 0x8000) && !(lp & (1 << 24)))
- m_pContainer->MenuBar->autoShow();
+ m_pContainer->m_pMenuBar->autoShow();
return _dlgReturn(m_hwnd, 0);
}
@@ -1680,7 +1680,7 @@ int CSrmmWindow::OnFilter(MSGFILTER *pFilter) }
if (pFilter->nmhdr.idFrom == IDC_SRMM_MESSAGE) {
- if (GetSendButtonState(m_hwnd) != PBS_DISABLED && !(m_pContainer->dwFlags & CNT_HIDETOOLBAR))
+ if (GetSendButtonState(m_hwnd) != PBS_DISABLED && !(m_pContainer->m_dwFlags & CNT_HIDETOOLBAR))
SetFocus(GetDlgItem(m_hwnd, IDOK));
else
SetFocus(m_log.GetHwnd());
@@ -1762,7 +1762,7 @@ int CSrmmWindow::OnFilter(MSGFILTER *pFilter) case WM_LBUTTONDOWN:
{
HCURSOR hCur = GetCursor();
- m_pContainer->MenuBar->Cancel();
+ m_pContainer->m_pMenuBar->Cancel();
if (hCur == LoadCursor(nullptr, IDC_SIZENS) || hCur == LoadCursor(nullptr, IDC_SIZEWE)
|| hCur == LoadCursor(nullptr, IDC_SIZENESW) || hCur == LoadCursor(nullptr, IDC_SIZENWSE)) {
SetWindowLongPtr(m_hwnd, DWLP_MSGRESULT, TRUE);
@@ -1795,8 +1795,8 @@ int CSrmmWindow::OnFilter(MSGFILTER *pFilter) else if (!isShift) {
m_log.SendMsg(WM_COPY, 0, 0);
SetFocus(m_message.GetHwnd());
- if (m_pContainer->hwndStatus)
- SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)TranslateT("Selection copied to clipboard"));
+ if (m_pContainer->m_hwndStatus)
+ SendMessage(m_pContainer->m_hwndStatus, SB_SETTEXT, 0, (LPARAM)TranslateT("Selection copied to clipboard"));
}
}
break;
@@ -1932,7 +1932,7 @@ LRESULT CSrmmWindow::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) case WM_CHAR:
KbdState(isShift, isCtrl, isAlt);
- if (!isAlt && !isCtrl && !(m_pContainer->dwFlags & CNT_NOSOUND) && wParam != VK_ESCAPE && !(wParam == VK_TAB && PluginConfig.m_bAllowTab))
+ if (!isAlt && !isCtrl && !(m_pContainer->m_dwFlags & CNT_NOSOUND) && wParam != VK_ESCAPE && !(wParam == VK_TAB && PluginConfig.m_bAllowTab))
Skin_PlaySound("SoundOnTyping");
if (isCtrl && !isAlt) {
@@ -1985,7 +1985,7 @@ LRESULT CSrmmWindow::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) case WM_KEYDOWN:
KbdState(isShift, isCtrl, isAlt);
- if (!isAlt && !(m_pContainer->dwFlags & CNT_NOSOUND) && wParam == VK_DELETE)
+ if (!isAlt && !(m_pContainer->m_dwFlags & CNT_NOSOUND) && wParam == VK_DELETE)
Skin_PlaySound("SoundOnTyping");
if (wParam == VK_INSERT && !isShift && !isCtrl && !isAlt) {
@@ -2251,7 +2251,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) if (m_ipFieldHeight == 0)
m_ipFieldHeight = CInfoPanel::m_ipConfig.height2;
- if (m_pContainer->uChildMinHeight > 0 && HIWORD(lParam) >= m_pContainer->uChildMinHeight) {
+ if (m_pContainer->m_uChildMinHeight > 0 && HIWORD(lParam) >= m_pContainer->m_uChildMinHeight) {
if (m_iSplitterY > HIWORD(lParam) - DPISCALEY_S(MINLOGHEIGHT)) {
m_iSplitterY = HIWORD(lParam) - DPISCALEY_S(MINLOGHEIGHT);
m_dynaSplitter = m_iSplitterY - DPISCALEY_S(34);
@@ -2261,7 +2261,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) LoadSplitter();
}
- HBITMAP hbm = ((m_pPanel.isActive()) && m_pContainer->avatarMode != 3) ? m_hOwnPic : (m_ace ? m_ace->hbmPic : PluginConfig.g_hbmUnknown);
+ HBITMAP hbm = ((m_pPanel.isActive()) && m_pContainer->m_avatarMode != 3) ? m_hOwnPic : (m_ace ? m_ace->hbmPic : PluginConfig.g_hbmUnknown);
if (hbm != nullptr) {
BITMAP bminfo;
GetObject(hbm, sizeof(bminfo), &bminfo);
@@ -2279,7 +2279,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) LONG cx = rc.right;
LONG panelHeight = m_pPanel.getHeight();
- hbm = (m_pContainer->avatarMode == 3) ? m_hOwnPic : (m_ace ? m_ace->hbmPic : PluginConfig.g_hbmUnknown);
+ hbm = (m_pContainer->m_avatarMode == 3) ? m_hOwnPic : (m_ace ? m_ace->hbmPic : PluginConfig.g_hbmUnknown);
double dHeight = 0, dWidth = 0;
Utils::scaleAvatarHeightLimited(hbm, dWidth, dHeight, panelHeight - 2);
m_iPanelAvatarX = (int)dWidth;
@@ -2395,7 +2395,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) SendDlgItemMessage(m_hwnd, IDC_PROTOCOL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)(m_hXStatusIcon ? m_hXStatusIcon : GetMyContactIcon("MetaiconBar")));
if (m_pContainer->m_hwndActive == m_hwnd)
- SendMessage(m_pContainer->m_hwnd, DM_SETICON, (WPARAM)this, (LPARAM)(m_hXStatusIcon ? m_hXStatusIcon : m_hTabIcon));
+ m_pContainer->SetIcon(this, m_hXStatusIcon ? m_hXStatusIcon : m_hTabIcon);
if (m_pWnd)
m_pWnd->updateIcon(m_hXStatusIcon ? m_hXStatusIcon : m_hTabIcon);
@@ -2405,7 +2405,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) case DM_CONFIGURETOOLBAR:
// configures the toolbar only... if lParam != 0, then it also calls
// SetDialogToType() to reconfigure the message window
- m_bShowUIElements = m_pContainer->dwFlags & CNT_HIDETOOLBAR ? 0 : 1;
+ m_bShowUIElements = m_pContainer->m_dwFlags & CNT_HIDETOOLBAR ? 0 : 1;
SetWindowLongPtr(GetDlgItem(m_hwnd, IDC_SPLITTERY), GWL_EXSTYLE, GetWindowLongPtr(GetDlgItem(m_hwnd, IDC_SPLITTERY), GWL_EXSTYLE) & ~WS_EX_STATICEDGE);
@@ -2494,7 +2494,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) // attempt to fix splitter troubles..
// hardcoded limits... better solution is possible, but this works for now
int bottomtoolbarH = 0;
- if (m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR)
+ if (m_pContainer->m_dwFlags & CNT_BOTTOMTOOLBAR)
bottomtoolbarH = 22;
if (m_iSplitterY < (DPISCALEY_S(MINSPLITTERY) + 5 + bottomtoolbarH)) { // min splitter size
@@ -2614,7 +2614,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) KillTimer(m_hwnd, wParam);
mir_snwprintf(job->szErrorMsg, TranslateT("Delivery failure: %s"), TranslateT("The message send timed out"));
job->iStatus = SendQueue::SQ_ERROR;
- if (!nen_options.iNoSounds && !(m_pContainer->dwFlags & CNT_NOSOUND))
+ if (!nen_options.iNoSounds && !(m_pContainer->m_dwFlags & CNT_NOSOUND))
Skin_PlaySound("SendError");
if (!(m_dwFlags & MWF_ERRORSTATE))
sendQueue->handleError(this, iIndex);
@@ -2671,8 +2671,8 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) if (m_hwndIEView != nullptr)
SetFocus(m_message.GetHwnd());
- if (m_pContainer->dwFlags & CNT_SIDEBAR)
- m_pContainer->SideBar->Layout();
+ if (m_pContainer->m_dwFlags & CNT_SIDEBAR)
+ m_pContainer->m_pSideBar->Layout();
}
else {
Resize();
@@ -2844,7 +2844,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) case DM_UPDATEUIN:
if (m_pPanel.isActive())
m_pPanel.Invalidate();
- if (m_pContainer->dwFlags & CNT_UINSTATUSBAR)
+ if (m_pContainer->m_dwFlags & CNT_UINSTATUSBAR)
tabUpdateStatusBar();
return 0;
@@ -2973,13 +2973,13 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) return 1;
}
- m_pContainer->iChilds--;
+ m_pContainer->m_iChilds--;
// after closing a tab, we need to activate the tab to the left side of
// the previously open tab.
// normally, this tab has the same index after the deletion of the formerly active tab
// unless, of course, we closed the last (rightmost) tab.
- if (!m_pContainer->bDontSmartClose && iTabs > 1 && lParam != 3) {
+ if (!m_pContainer->m_bDontSmartClose && iTabs > 1 && lParam != 3) {
int i = GetTabIndexFromHWND(m_hwndParent, m_hwnd);
if (i == iTabs - 1)
i--;
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 58b00cbba1..81a4be9065 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -202,8 +202,8 @@ void CTabBaseDlg::FlashTab(bool bInvertMode) TCITEM item = {};
item.mask = TCIF_IMAGE;
TabCtrl_SetItem(m_hwndParent, m_iTabID, &item);
- if (m_pContainer->dwFlags & CNT_SIDEBAR)
- m_pContainer->SideBar->updateSession(this);
+ if (m_pContainer->m_dwFlags & CNT_SIDEBAR)
+ m_pContainer->m_pSideBar->updateSession(this);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -212,14 +212,14 @@ void CTabBaseDlg::FlashTab(bool bInvertMode) void CTabBaseDlg::CalcDynamicAvatarSize(BITMAP *bminfo)
{
- if (m_dwFlags & MWF_WASBACKGROUNDCREATE || m_pContainer->dwFlags & CNT_DEFERREDCONFIGURE || m_pContainer->dwFlags & CNT_CREATE_MINIMIZED || IsIconic(m_pContainer->m_hwnd))
+ if (m_dwFlags & MWF_WASBACKGROUNDCREATE || m_pContainer->m_dwFlags & CNT_DEFERREDCONFIGURE || m_pContainer->m_dwFlags & CNT_CREATE_MINIMIZED || IsIconic(m_pContainer->m_hwnd))
return; // at this stage, the layout is not yet ready...
RECT rc;
GetClientRect(m_hwnd, &rc);
- BOOL bBottomToolBar = m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR;
- BOOL bToolBar = m_pContainer->dwFlags & CNT_HIDETOOLBAR ? 0 : 1;
+ BOOL bBottomToolBar = m_pContainer->m_dwFlags & CNT_BOTTOMTOOLBAR;
+ BOOL bToolBar = m_pContainer->m_dwFlags & CNT_HIDETOOLBAR ? 0 : 1;
int iSplitOffset = m_bIsAutosizingInput ? 1 : 0;
double picAspect = (bminfo->bmWidth == 0 || bminfo->bmHeight == 0) ? 1.0 : (double)(bminfo->bmWidth / (double)bminfo->bmHeight);
@@ -308,7 +308,7 @@ int CTabBaseDlg::MsgWindowMenuHandler(int selection, int menuId) CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_SELECTCONTAINER), m_hwnd, SelectContainerDlgProc, (LPARAM)m_hwnd);
return 1;
case ID_TABMENU_CONTAINEROPTIONS:
- if (m_pContainer->hWndOptions == nullptr)
+ if (m_pContainer->m_hWndOptions == nullptr)
CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_CONTAINEROPTIONS), m_hwnd, DlgProcContainerOptions, (LPARAM)m_pContainer);
return 1;
case ID_TABMENU_CLOSECONTAINER:
@@ -402,7 +402,7 @@ int CTabBaseDlg::MsgWindowMenuHandler(int selection, int menuId) void CTabBaseDlg::UpdateReadChars() const
{
- if (!m_pContainer->hwndStatus || m_pContainer->m_hwndActive != m_hwnd)
+ if (!m_pContainer->m_hwndStatus || m_pContainer->m_hwndActive != m_hwnd)
return;
int len;
@@ -432,9 +432,9 @@ void CTabBaseDlg::UpdateReadChars() const wchar_t buf[128];
mir_snwprintf(buf, L"%s%s %d/%d", szBuf, m_lcID, m_iOpenJobs, len);
- SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, 1, (LPARAM)buf);
+ SendMessage(m_pContainer->m_hwndStatus, SB_SETTEXT, 1, (LPARAM)buf);
if (PluginConfig.m_visualMessageSizeIndicator)
- InvalidateRect(m_pContainer->hwndStatus, nullptr, FALSE);
+ InvalidateRect(m_pContainer->m_hwndStatus, nullptr, FALSE);
}
void CTabBaseDlg::UpdateSaveAndSendButton()
@@ -469,31 +469,31 @@ void CTabBaseDlg::UpdateSaveAndSendButton() void CTabBaseDlg::tabUpdateStatusBar() const
{
- if (m_pContainer->hwndStatus && m_pContainer->m_hwndActive == m_hwnd) {
+ if (m_pContainer->m_hwndStatus && m_pContainer->m_hwndActive == m_hwnd) {
if (!isChat()) {
if (m_wszStatusBar[0]) {
- SendMessage(m_pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]);
- SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)m_wszStatusBar);
+ SendMessage(m_pContainer->m_hwndStatus, SB_SETICON, 0, (LPARAM)PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING]);
+ SendMessage(m_pContainer->m_hwndStatus, SB_SETTEXT, 0, (LPARAM)m_wszStatusBar);
}
else if (m_bStatusSet) {
- SendMessage(m_pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)m_szStatusIcon);
- SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)m_szStatusText.c_str());
+ SendMessage(m_pContainer->m_hwndStatus, SB_SETICON, 0, (LPARAM)m_szStatusIcon);
+ SendMessage(m_pContainer->m_hwndStatus, SB_SETTEXT, 0, (LPARAM)m_szStatusText.c_str());
}
else {
- SendMessage(m_pContainer->hwndStatus, SB_SETICON, 0, 0);
+ SendMessage(m_pContainer->m_hwndStatus, SB_SETICON, 0, 0);
DM_UpdateLastMessage();
}
}
else {
if (m_bStatusSet) {
- SendMessage(m_pContainer->hwndStatus, SB_SETICON, 0, (LPARAM)m_szStatusIcon);
- SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, 0, (LPARAM)m_szStatusText.c_str());
+ SendMessage(m_pContainer->m_hwndStatus, SB_SETICON, 0, (LPARAM)m_szStatusIcon);
+ SendMessage(m_pContainer->m_hwndStatus, SB_SETTEXT, 0, (LPARAM)m_szStatusText.c_str());
}
- else SendMessage(m_pContainer->hwndStatus, SB_SETICON, 0, 0);
+ else SendMessage(m_pContainer->m_hwndStatus, SB_SETICON, 0, 0);
}
UpdateReadChars();
- InvalidateRect(m_pContainer->hwndStatus, nullptr, TRUE);
- SendMessage(m_pContainer->hwndStatus, WM_USER + 101, 0, (LPARAM)this);
+ InvalidateRect(m_pContainer->m_hwndStatus, nullptr, TRUE);
+ SendMessage(m_pContainer->m_hwndStatus, WM_USER + 101, 0, (LPARAM)this);
}
}
@@ -518,8 +518,8 @@ void TSAPI HandleIconFeedback(CTabBaseDlg *dat, HICON iIcon) item.iImage = 0;
item.mask = TCIF_IMAGE;
- if (dat->m_pContainer->dwFlags & CNT_SIDEBAR)
- dat->m_pContainer->SideBar->updateSession(dat);
+ if (dat->m_pContainer->m_dwFlags & CNT_SIDEBAR)
+ dat->m_pContainer->m_pSideBar->updateSession(dat);
else
TabCtrl_SetItem(GetDlgItem(dat->m_pContainer->m_hwnd, IDC_MSGTABS), dat->m_iTabID, &item);
}
@@ -550,8 +550,8 @@ void TSAPI ProcessAvatarChange(HWND hwnd, LPARAM lParam) bool CTabBaseDlg::GetAvatarVisibility()
{
- BYTE bAvatarMode = m_pContainer->avatarMode;
- BYTE bOwnAvatarMode = m_pContainer->ownAvatarMode;
+ BYTE bAvatarMode = m_pContainer->m_avatarMode;
+ BYTE bOwnAvatarMode = m_pContainer->m_ownAvatarMode;
char hideOverride = (char)M.GetByte(m_hContact, "hideavatar", -1);
// infopanel visible, consider own avatar display
@@ -708,7 +708,7 @@ void CTabBaseDlg::AdjustBottomAvatarDisplay() GetAvatarVisibility();
bool bInfoPanel = m_pPanel.isActive();
- HBITMAP hbm = (bInfoPanel && m_pContainer->avatarMode != 3) ? m_hOwnPic : (m_ace ? m_ace->hbmPic : PluginConfig.g_hbmUnknown);
+ HBITMAP hbm = (bInfoPanel && m_pContainer->m_avatarMode != 3) ? m_hOwnPic : (m_ace ? m_ace->hbmPic : PluginConfig.g_hbmUnknown);
if (hbm) {
if (m_dynaSplitter == 0 || m_iSplitterY == 0)
LoadSplitter();
@@ -730,7 +730,7 @@ void CTabBaseDlg::ShowPicture(bool showNewPic) m_pic.cy = m_pic.cx = DPISCALEY_S(60);
if (showNewPic) {
- if (m_pPanel.isActive() && m_pContainer->avatarMode != 3) {
+ if (m_pPanel.isActive() && m_pContainer->m_avatarMode != 3) {
if (!m_hwndPanelPic) {
InvalidateRect(m_hwnd, nullptr, TRUE);
UpdateWindow(m_hwnd);
@@ -841,7 +841,7 @@ BOOL CTabBaseDlg::DoRtfToTags(CMStringW &pszText) const return FALSE;
// used to filter out attributes which are already set for the default message input area font
- LOGFONTA lf = m_pContainer->theme.logFonts[MSGFONTID_MESSAGEAREA];
+ LOGFONTA lf = m_pContainer->m_theme.logFonts[MSGFONTID_MESSAGEAREA];
// create an index of colors in the module and map them to
// corresponding colors in the RTF color table
@@ -887,7 +887,7 @@ BOOL CTabBaseDlg::DoRtfToTags(CMStringW &pszText) const if (isChat()) {
if (mi && mi->bColor) {
if (iInd >= 0) {
- if (!(res.IsEmpty() && m_pContainer->theme.fontColors[MSGFONTID_MESSAGEAREA] == pColors[iInd]))
+ if (!(res.IsEmpty() && m_pContainer->m_theme.fontColors[MSGFONTID_MESSAGEAREA] == pColors[iInd]))
res.AppendFormat(L"%%c%u", iInd);
}
else if (!res.IsEmpty())
@@ -905,7 +905,7 @@ BOOL CTabBaseDlg::DoRtfToTags(CMStringW &pszText) const int iInd = RtfColorToIndex(iNumColors, pIndex, _wtoi(p + 10));
if (iInd >= 0) {
// if the entry field is empty & the color passed is the back color, skip it
- if (!(res.IsEmpty() && m_pContainer->theme.inputbg == pColors[iInd]))
+ if (!(res.IsEmpty() && m_pContainer->m_theme.inputbg == pColors[iInd]))
res.AppendFormat(L"%%f%u", iInd);
}
else if (!res.IsEmpty())
@@ -1186,8 +1186,8 @@ void CTabBaseDlg::SaveSplitter() if (m_dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE)
db_set_dw(m_hContact, SRMSGMOD_T, "splitsplity", m_iSplitterY);
else {
- if (m_pContainer->settings->fPrivate)
- m_pContainer->settings->iSplitterY = m_iSplitterY;
+ if (m_pContainer->m_pSettings->fPrivate)
+ m_pContainer->m_pSettings->iSplitterY = m_iSplitterY;
else
db_set_dw(0, SRMSGMOD_T, "splitsplity", m_iSplitterY);
}
@@ -1201,10 +1201,10 @@ void CTabBaseDlg::LoadSplitter() }
if (!(m_dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE)) {
- if (!m_pContainer->settings->fPrivate)
+ if (!m_pContainer->m_pSettings->fPrivate)
m_iSplitterY = (int)M.GetDword("splitsplity", 60);
else
- m_iSplitterY = m_pContainer->settings->iSplitterY;
+ m_iSplitterY = m_pContainer->m_pSettings->iSplitterY;
}
else m_iSplitterY = (int)M.GetDword(m_hContact, "splitsplity", M.GetDword("splitsplity", 60));
@@ -1251,7 +1251,7 @@ void CSrmmWindow::LoadContactAvatar() AdjustBottomAvatarDisplay();
CalcDynamicAvatarSize(&bm);
- if (!m_pPanel.isActive() || m_pContainer->avatarMode == 3) {
+ if (!m_pPanel.isActive() || m_pContainer->m_avatarMode == 3) {
m_iRealAvatarHeight = 0;
PostMessage(m_hwnd, WM_SIZE, 0, 0);
}
@@ -1274,7 +1274,7 @@ void CSrmmWindow::LoadOwnAvatar() else
m_hOwnPic = PluginConfig.g_hbmUnknown;
- if (m_pPanel.isActive() && m_pContainer->avatarMode != 3) {
+ if (m_pPanel.isActive() && m_pContainer->m_avatarMode != 3) {
BITMAP bm;
m_iRealAvatarHeight = 0;
@@ -1451,17 +1451,17 @@ int CTabBaseDlg::MsgWindowDrawHandler(DRAWITEMSTRUCT *dis) void TSAPI LoadThemeDefaults(TContainerData *pContainer)
{
- memset(&pContainer->theme, 0, sizeof(TLogTheme));
- pContainer->theme.bg = db_get_dw(0, FONTMODULE, SRMSGSET_BKGCOLOUR, GetSysColor(COLOR_WINDOW));
- pContainer->theme.statbg = PluginConfig.crStatus;
- pContainer->theme.oldinbg = PluginConfig.crOldIncoming;
- pContainer->theme.oldoutbg = PluginConfig.crOldOutgoing;
- pContainer->theme.inbg = PluginConfig.crIncoming;
- pContainer->theme.outbg = PluginConfig.crOutgoing;
- pContainer->theme.hgrid = db_get_dw(0, FONTMODULE, "hgrid", RGB(224, 224, 224));
- pContainer->theme.left_indent = M.GetDword("IndentAmount", 20) * 15;
- pContainer->theme.right_indent = M.GetDword("RightIndent", 20) * 15;
- pContainer->theme.inputbg = db_get_dw(0, FONTMODULE, "inputbg", SRMSGDEFSET_BKGCOLOUR);
+ memset(&pContainer->m_theme, 0, sizeof(TLogTheme));
+ pContainer->m_theme.bg = db_get_dw(0, FONTMODULE, SRMSGSET_BKGCOLOUR, GetSysColor(COLOR_WINDOW));
+ pContainer->m_theme.statbg = PluginConfig.crStatus;
+ pContainer->m_theme.oldinbg = PluginConfig.crOldIncoming;
+ pContainer->m_theme.oldoutbg = PluginConfig.crOldOutgoing;
+ pContainer->m_theme.inbg = PluginConfig.crIncoming;
+ pContainer->m_theme.outbg = PluginConfig.crOutgoing;
+ pContainer->m_theme.hgrid = db_get_dw(0, FONTMODULE, "hgrid", RGB(224, 224, 224));
+ pContainer->m_theme.left_indent = M.GetDword("IndentAmount", 20) * 15;
+ pContainer->m_theme.right_indent = M.GetDword("RightIndent", 20) * 15;
+ pContainer->m_theme.inputbg = db_get_dw(0, FONTMODULE, "inputbg", SRMSGDEFSET_BKGCOLOUR);
for (int i = 1; i <= 5; i++) {
char szTemp[40];
@@ -1469,47 +1469,47 @@ void TSAPI LoadThemeDefaults(TContainerData *pContainer) COLORREF colour = M.GetDword(szTemp, RGB(224, 224, 224));
if (colour == 0)
colour = RGB(1, 1, 1);
- pContainer->theme.custom_colors[i - 1] = colour;
+ pContainer->m_theme.custom_colors[i - 1] = colour;
}
- pContainer->theme.logFonts = logfonts;
- pContainer->theme.fontColors = fontcolors;
- pContainer->theme.rtfFonts = nullptr;
- pContainer->ltr_templates = <R_Active;
- pContainer->rtl_templates = &RTL_Active;
- pContainer->theme.dwFlags = (M.GetDword("mwflags", MWF_LOG_DEFAULT) & MWF_LOG_ALL);
- pContainer->theme.isPrivate = false;
+ pContainer->m_theme.logFonts = logfonts;
+ pContainer->m_theme.fontColors = fontcolors;
+ pContainer->m_theme.rtfFonts = nullptr;
+ pContainer->m_ltr_templates = <R_Active;
+ pContainer->m_rtl_templates = &RTL_Active;
+ pContainer->m_theme.dwFlags = (M.GetDword("mwflags", MWF_LOG_DEFAULT) & MWF_LOG_ALL);
+ pContainer->m_theme.isPrivate = false;
}
void TSAPI LoadOverrideTheme(TContainerData *pContainer)
{
- memset(&pContainer->theme, 0, sizeof(TLogTheme));
- if (mir_wstrlen(pContainer->szAbsThemeFile) > 1) {
- if (PathFileExists(pContainer->szAbsThemeFile)) {
- if (CheckThemeVersion(pContainer->szAbsThemeFile) == 0) {
+ memset(&pContainer->m_theme, 0, sizeof(TLogTheme));
+ if (mir_wstrlen(pContainer->m_szAbsThemeFile) > 1) {
+ if (PathFileExists(pContainer->m_szAbsThemeFile)) {
+ if (CheckThemeVersion(pContainer->m_szAbsThemeFile) == 0) {
LoadThemeDefaults(pContainer);
return;
}
- if (pContainer->ltr_templates == nullptr) {
- pContainer->ltr_templates = (TTemplateSet *)mir_alloc(sizeof(TTemplateSet));
- memcpy(pContainer->ltr_templates, <R_Active, sizeof(TTemplateSet));
+ if (pContainer->m_ltr_templates == nullptr) {
+ pContainer->m_ltr_templates = (TTemplateSet *)mir_alloc(sizeof(TTemplateSet));
+ memcpy(pContainer->m_ltr_templates, <R_Active, sizeof(TTemplateSet));
}
- if (pContainer->rtl_templates == nullptr) {
- pContainer->rtl_templates = (TTemplateSet *)mir_alloc(sizeof(TTemplateSet));
- memcpy(pContainer->rtl_templates, &RTL_Active, sizeof(TTemplateSet));
+ if (pContainer->m_rtl_templates == nullptr) {
+ pContainer->m_rtl_templates = (TTemplateSet *)mir_alloc(sizeof(TTemplateSet));
+ memcpy(pContainer->m_rtl_templates, &RTL_Active, sizeof(TTemplateSet));
}
- pContainer->theme.logFonts = (LOGFONTA *)mir_alloc(sizeof(LOGFONTA) * (MSGDLGFONTCOUNT + 2));
- pContainer->theme.fontColors = (COLORREF *)mir_alloc(sizeof(COLORREF) * (MSGDLGFONTCOUNT + 2));
- pContainer->theme.rtfFonts = (char *)mir_alloc((MSGDLGFONTCOUNT + 2) * RTFCACHELINESIZE);
+ pContainer->m_theme.logFonts = (LOGFONTA *)mir_alloc(sizeof(LOGFONTA) * (MSGDLGFONTCOUNT + 2));
+ pContainer->m_theme.fontColors = (COLORREF *)mir_alloc(sizeof(COLORREF) * (MSGDLGFONTCOUNT + 2));
+ pContainer->m_theme.rtfFonts = (char *)mir_alloc((MSGDLGFONTCOUNT + 2) * RTFCACHELINESIZE);
- ReadThemeFromINI(pContainer->szAbsThemeFile, pContainer, 0, THEME_READ_ALL);
- pContainer->theme.left_indent *= 15;
- pContainer->theme.right_indent *= 15;
- pContainer->theme.isPrivate = true;
+ ReadThemeFromINI(pContainer->m_szAbsThemeFile, pContainer, 0, THEME_READ_ALL);
+ pContainer->m_theme.left_indent *= 15;
+ pContainer->m_theme.right_indent *= 15;
+ pContainer->m_theme.isPrivate = true;
if (CSkin::m_skinEnabled)
- pContainer->theme.bg = SkinItems[ID_EXTBKCONTAINER].COLOR;
+ pContainer->m_theme.bg = SkinItems[ID_EXTBKCONTAINER].COLOR;
else
- pContainer->theme.bg = PluginConfig.m_fillColor ? PluginConfig.m_fillColor : GetSysColor(COLOR_WINDOW);
+ pContainer->m_theme.bg = PluginConfig.m_fillColor ? PluginConfig.m_fillColor : GetSysColor(COLOR_WINDOW);
return;
}
}
@@ -1631,18 +1631,18 @@ void CTabBaseDlg::DetermineMinHeight() {
RECT rc;
LONG height = (m_pPanel.isActive() ? m_pPanel.getHeight() + 2 : 0);
- if (!(m_pContainer->dwFlags & CNT_HIDETOOLBAR))
+ if (!(m_pContainer->m_dwFlags & CNT_HIDETOOLBAR))
height += DPISCALEY_S(24); // toolbar
GetClientRect(m_message.GetHwnd(), &rc);
height += rc.bottom; // input area
height += 40; // min space for log area and some padding
- m_pContainer->uChildMinHeight = height;
+ m_pContainer->m_uChildMinHeight = height;
}
LONG CTabBaseDlg::GetDefaultMinimumInputHeight() const
{
- LONG height = (m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR) ? DPISCALEY_S(46 + 22) : DPISCALEY_S(46);
+ LONG height = (m_pContainer->m_dwFlags & CNT_BOTTOMTOOLBAR) ? DPISCALEY_S(46 + 22) : DPISCALEY_S(46);
if (CSkin::m_skinEnabled && !SkinItems[ID_EXTBKINPUTAREA].IGNORED)
height += (SkinItems[ID_EXTBKINPUTAREA].MARGIN_BOTTOM + SkinItems[ID_EXTBKINPUTAREA].MARGIN_TOP - 2);
@@ -1652,7 +1652,7 @@ LONG CTabBaseDlg::GetDefaultMinimumInputHeight() const bool CTabBaseDlg::IsAutoSplitEnabled() const
{
- return (m_pContainer->dwFlags & CNT_AUTOSPLITTER) && !(m_dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE);
+ return (m_pContainer->m_dwFlags & CNT_AUTOSPLITTER) && !(m_dwFlagsEx & MWF_SHOW_SPLITTEROVERRIDE);
}
void CTabBaseDlg::LimitMessageText(int iLen)
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index f63371f527..84e7ddfb1d 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -309,9 +309,9 @@ static int AppendUnicodeToBuffer(CMStringA &str, const wchar_t *line, int mode) static void Build_RTF_Header(CMStringA &str, CTabBaseDlg *dat)
{
int i;
- LOGFONTA *logFonts = dat->m_pContainer->theme.logFonts;
- COLORREF *fontColors = dat->m_pContainer->theme.fontColors;
- TLogTheme *theme = &dat->m_pContainer->theme;
+ LOGFONTA *logFonts = dat->m_pContainer->m_theme.logFonts;
+ COLORREF *fontColors = dat->m_pContainer->m_theme.fontColors;
+ TLogTheme *theme = &dat->m_pContainer->m_theme;
str.Append("{\\rtf1\\ansi\\deff0{\\fonttbl");
@@ -530,7 +530,7 @@ static char* Template_CreateRTFFromDbEvent(CTabBaseDlg *dat, MCONTACT hContact, event_time = *gmtime(&local_time);
}
- TTemplateSet *this_templateset = dbei.flags & DBEF_RTL ? dat->m_pContainer->rtl_templates : dat->m_pContainer->ltr_templates;
+ TTemplateSet *this_templateset = dbei.flags & DBEF_RTL ? dat->m_pContainer->m_rtl_templates : dat->m_pContainer->m_ltr_templates;
wchar_t *szTemplate;
if (bIsStatusChangeEvent)
@@ -1128,9 +1128,9 @@ void CTabBaseDlg::ReplaceIcons(LONG startAt, int fAppend, BOOL isSent) if (cf2.crBackColor != 0)
crDefault = cf2.crBackColor;
else if (bDirection == '>')
- crDefault = (fAppend) ? m_pContainer->theme.outbg : m_pContainer->theme.oldoutbg;
+ crDefault = (fAppend) ? m_pContainer->m_theme.outbg : m_pContainer->m_theme.oldoutbg;
else
- crDefault = (fAppend) ? m_pContainer->theme.inbg : m_pContainer->theme.oldinbg;
+ crDefault = (fAppend) ? m_pContainer->m_theme.inbg : m_pContainer->m_theme.oldinbg;
TLogIcon theIcon(Logicons[bIconIndex], crDefault);
CImageDataObject::InsertBitmap(ole, theIcon.m_hBmp);
@@ -1183,7 +1183,7 @@ void CTabBaseDlg::StreamInEvents(MEVENT hDbEventFirst, int count, int fAppend, D // calc time limit for grouping
HWND hwndrtf = m_hwndIEView ? m_hwndIWebBrowserControl : m_log.GetHwnd();
- rtfFonts = m_pContainer->theme.rtfFonts ? m_pContainer->theme.rtfFonts : &(rtfFontsGlobal[0][0]);
+ rtfFonts = m_pContainer->m_theme.rtfFonts ? m_pContainer->m_theme.rtfFonts : &(rtfFontsGlobal[0][0]);
time_t now = time(0);
struct tm tm_now = *localtime(&now);
@@ -1308,8 +1308,8 @@ void CTabBaseDlg::StreamInEvents(MEVENT hDbEventFirst, int count, int fAppend, D if (m_isAutoRTL & 1)
m_log.SendMsg(EM_SETBKGNDCOLOR, 0, (LOWORD(m_iLastEventType) & DBEF_SENT)
- ? (fAppend ? m_pContainer->theme.outbg : m_pContainer->theme.oldoutbg)
- : (fAppend ? m_pContainer->theme.inbg : m_pContainer->theme.oldinbg));
+ ? (fAppend ? m_pContainer->m_theme.outbg : m_pContainer->m_theme.oldoutbg)
+ : (fAppend ? m_pContainer->m_theme.inbg : m_pContainer->m_theme.oldinbg));
if (!(m_isAutoRTL & 1)) {
GETTEXTLENGTHEX gtxl = { 0 };
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 8df3dd9aa7..99724be8b3 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -88,7 +88,7 @@ CTabBaseDlg::~CTabBaseDlg() void CTabBaseDlg::LoadSettings()
{
- m_clrInputBG = m_pContainer->theme.inputbg;
+ m_clrInputBG = m_pContainer->m_theme.inputbg;
LoadLogfont(FONTSECTION_IM, MSGFONTID_MESSAGEAREA, nullptr, &m_clrInputFG, FONTMODULE);
}
@@ -141,7 +141,7 @@ INT_PTR CTabBaseDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) if (srcDat->isChat() != isChat() && M.GetByte("syncAllPanels", 0) == 0)
return 0;
- if (m_pContainer->settings->fPrivate && srcDat->m_pContainer != m_pContainer)
+ if (m_pContainer->m_pSettings->fPrivate && srcDat->m_pContainer != m_pContainer)
return 0;
m_pPanel.setHeight((LONG)lParam);
@@ -340,16 +340,16 @@ int TSAPI MessageWindowOpened(MCONTACT hContact, HWND _hwnd) SendMessage(hwnd, DM_QUERYCONTAINER, 0, (LPARAM)&pContainer);
if (pContainer) {
- if (pContainer->dwFlags & CNT_DONTREPORT) {
+ if (pContainer->m_dwFlags & CNT_DONTREPORT) {
if (IsIconic(pContainer->m_hwnd))
return 0;
}
- if (pContainer->dwFlags & CNT_DONTREPORTUNFOCUSED) {
+ if (pContainer->m_dwFlags & CNT_DONTREPORTUNFOCUSED) {
if (!IsIconic(pContainer->m_hwnd) && !pContainer->IsActive())
return 0;
}
- if (pContainer->dwFlags & CNT_ALWAYSREPORTINACTIVE) {
- if (pContainer->dwFlags & CNT_DONTREPORTFOCUSED)
+ if (pContainer->m_dwFlags & CNT_ALWAYSREPORTINACTIVE) {
+ if (pContainer->m_dwFlags & CNT_DONTREPORTFOCUSED)
return 0;
return pContainer->m_hwndActive == hwnd;
@@ -519,7 +519,7 @@ int TSAPI ActivateExistingTab(TContainerData *pContainer, HWND hwndChild) NMHDR nmhdr = {};
nmhdr.code = TCN_SELCHANGE;
- if (TabCtrl_GetItemCount(GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS)) > 1 && !(pContainer->dwFlags & CNT_DEFERREDTABSELECT)) {
+ if (TabCtrl_GetItemCount(GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS)) > 1 && !(pContainer->m_dwFlags & CNT_DEFERREDTABSELECT)) {
TabCtrl_SetCurSel(GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS), GetTabIndexFromHWND(GetDlgItem(pContainer->m_hwnd, IDC_MSGTABS), hwndChild));
SendMessage(pContainer->m_hwnd, WM_NOTIFY, 0, (LPARAM)&nmhdr); // just select the tab and let WM_NOTIFY do the rest
}
@@ -602,10 +602,10 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, if (pContainer->m_hwndActive && bActivateTab)
ShowWindow(pContainer->m_hwndActive, SW_HIDE);
- int iTabIndex_wanted = M.GetDword(hContact, "tabindex", pContainer->iChilds * 100);
+ int iTabIndex_wanted = M.GetDword(hContact, "tabindex", pContainer->m_iChilds * 100);
int iCount = TabCtrl_GetItemCount(hwndTab);
- pContainer->iTabIndex = iCount;
+ pContainer->m_iTabIndex = iCount;
if (iCount > 0) {
for (int i = iCount - 1; i >= 0; i--) {
HWND hwnd = GetTabWindow(hwndTab, i);
@@ -613,7 +613,7 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, if (dat) {
int relPos = M.GetDword(dat->m_hContact, "tabindex", i * 100);
if (iTabIndex_wanted <= relPos)
- pContainer->iTabIndex = i;
+ pContainer->m_iTabIndex = i;
}
}
}
@@ -623,7 +623,7 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, item.mask = TCIF_TEXT | TCIF_IMAGE;
item.iImage = 0;
item.cchTextMax = _countof(tabtitle);
- int iTabId = TabCtrl_InsertItem(hwndTab, pContainer->iTabIndex, &item);
+ int iTabId = TabCtrl_InsertItem(hwndTab, pContainer->m_iTabIndex, &item);
SendMessage(hwndTab, EM_REFRESHWITHOUTCLIP, 0, 0);
if (bActivateTab)
@@ -633,7 +633,7 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, pWindow->m_hContact = hContact;
pWindow->m_iTabID = iTabId;
pWindow->m_pContainer = pContainer;
- pContainer->iChilds++;
+ pContainer->m_iChilds++;
pWindow->m_bActivate = bActivateTab;
pWindow->m_bWantPopup = bWantPopup;
@@ -646,8 +646,8 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, HWND hwndNew = pWindow->GetHwnd();
// switchbar support
- if (pContainer->dwFlags & CNT_SIDEBAR)
- pContainer->SideBar->addSession(pWindow, pContainer->iTabIndex);
+ if (pContainer->m_dwFlags & CNT_SIDEBAR)
+ pContainer->m_pSideBar->addSession(pWindow, pContainer->m_iTabIndex);
SendMessage(pContainer->m_hwnd, WM_SIZE, 0, 0);
@@ -658,8 +658,8 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, SetFocus(pContainer->m_hwndActive);
}
else {
- if (pContainer->dwFlags & CNT_NOFLASH)
- SendMessage(pContainer->m_hwnd, DM_SETICON, 0, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
+ if (pContainer->m_dwFlags & CNT_NOFLASH)
+ pContainer->SetIcon(0, Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
else
FlashContainer(pContainer, 1, 0);
}
@@ -717,7 +717,7 @@ TContainerData* TSAPI FindMatchingContainer(const wchar_t *szName) if (iMaxTabs > 0 && M.GetByte("limittabs", 0) && !wcsncmp(szName, L"default", 6)) {
// search a "default" with less than iMaxTabs opened...
for (TContainerData *p = pFirstContainer; p; p = p->pNext)
- if (!wcsncmp(p->m_wszName, L"default", 6) && p->iChilds < iMaxTabs)
+ if (!wcsncmp(p->m_wszName, L"default", 6) && p->m_iChilds < iMaxTabs)
return p;
return nullptr;
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 0b648bddd7..0e498bb327 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -175,61 +175,62 @@ struct TContainerData wchar_t m_wszName[CONTAINER_NAMELEN + 4]; // container name
HWND m_hwndActive; // active message window
HWND m_hwnd; // the container handle
- int iTabIndex; // next tab id
- int iChilds;
- int iContainerIndex;
- bool fHidden;
+ int m_iTabIndex; // next tab id
+ int m_iChilds;
+ int m_iContainerIndex;
+ bool m_bHidden;
HWND m_hwndTip; // tab - tooltips...
- BOOL bDontSmartClose; // if set, do not search and select the next possible tab after closing one.
- DWORD dwFlags;
- DWORD dwFlagsEx;
- LONG uChildMinHeight;
- int tBorder;
- int tBorder_outer_left, tBorder_outer_right, tBorder_outer_top, tBorder_outer_bottom;
- MCONTACT hContactFrom;
- BOOL isCloned;
- HWND hwndStatus;
- int statusBarHeight;
- DWORD dwLastActivity;
- int hIcon; // current window icon stick indicator
- HICON hIconTaskbarOverlay; // contains a "sticky" taskbar overlay (e.g. new message icon)
- DWORD dwFlashingStarted;
- HWND hWndOptions;
- BOOL bSizingLoop;
- wchar_t szRelThemeFile[MAX_PATH], szAbsThemeFile[MAX_PATH];
- TTemplateSet *ltr_templates, *rtl_templates;
- HDC cachedDC;
- HBITMAP cachedHBM, oldHBM;
- SIZE oldDCSize;
- RECT rcClose, rcMin, rcMax;
- TitleBtn buttons[3];
- TitleBtn oldbuttons[3];
- int ncActive;
- HWND hwndSaved;
- ButtonItem *buttonItems;
- RECT rcSaved, rcLogSaved;
- POINT ptLogSaved;
- DWORD exFlags;
- BOOL fPrivateThemeChanged;
- MARGINS mOld;
- HDC cachedToolbarDC;
- HBITMAP hbmToolbarBG, oldhbmToolbarBG;
- SIZE szOldToolbarSize;
- SIZE oldSize, preSIZE;
- WORD avatarMode, ownAvatarMode;
- BYTE bTBRenderingMode;
- TLogTheme theme;
- TContainerSettings* settings;
- CTaskbarInteract* TaskBar;
- CMenuBar *MenuBar;
- CSideBar *SideBar;
+ BOOL m_bDontSmartClose; // if set, do not search and select the next possible tab after closing one.
+ DWORD m_dwFlags;
+ DWORD m_dwFlagsEx;
+ LONG m_uChildMinHeight;
+ int m_tBorder;
+ int m_tBorder_outer_left, m_tBorder_outer_right, m_tBorder_outer_top, m_tBorder_outer_bottom;
+ MCONTACT m_hContactFrom;
+ BOOL m_isCloned;
+ HWND m_hwndStatus;
+ int m_statusBarHeight;
+ DWORD m_dwLastActivity;
+ int m_hIcon; // current window icon stick indicator
+ HICON m_hIconTaskbarOverlay; // contains a "sticky" taskbar overlay (e.g. new message icon)
+ DWORD m_dwFlashingStarted;
+ HWND m_hWndOptions;
+ BOOL m_bSizingLoop;
+ wchar_t m_szRelThemeFile[MAX_PATH], m_szAbsThemeFile[MAX_PATH];
+ TTemplateSet *m_ltr_templates, *m_rtl_templates;
+ HDC m_cachedDC;
+ HBITMAP m_cachedHBM, m_oldHBM;
+ SIZE m_oldDCSize;
+ RECT m_rcClose, m_rcMin, m_rcMax;
+ TitleBtn m_buttons[3];
+ TitleBtn m_oldbuttons[3];
+ int m_ncActive;
+ HWND m_hwndSaved;
+ ButtonItem *m_buttonItems;
+ RECT m_rcSaved, m_rcLogSaved;
+ POINT m_ptLogSaved;
+ DWORD m_exFlags;
+ BOOL m_fPrivateThemeChanged;
+ MARGINS m_mOld;
+ HDC m_cachedToolbarDC;
+ HBITMAP m_hbmToolbarBG, m_oldhbmToolbarBG;
+ SIZE m_szOldToolbarSize;
+ SIZE m_oldSize, m_preSIZE;
+ WORD m_avatarMode, m_ownAvatarMode;
+ BYTE m_bTBRenderingMode;
+ TLogTheme m_theme;
+ TContainerSettings* m_pSettings;
+ CTaskbarInteract* m_pTaskBar;
+ CMenuBar *m_pMenuBar;
+ CSideBar *m_pSideBar;
void InitRedraw();
+ void SetIcon(CTabBaseDlg *pDlg, HICON hIcon);
void UpdateTabs();
void UpdateTitle(MCONTACT, class CTabBaseDlg* = nullptr);
void ClearMargins()
- { memset(&mOld, 0xfe, sizeof(mOld));
+ { memset(&m_mOld, 0xfe, sizeof(m_mOld));
}
bool IsActive()
@@ -777,7 +778,6 @@ struct TIconDescW #define DM_UINTOCLIPBOARD (TM_USER+59)
#define DM_FORCEDREMAKELOG (TM_USER+62)
#define DM_STATUSBARCHANGED (TM_USER+64)
-#define DM_SETICON (TM_USER+68)
#define DM_CHECKQUEUEFORCLOSE (TM_USER+70)
#define DM_CHECKAUTOHIDE (TM_USER+71)
#define DM_HANDLECLISTEVENT (TM_USER+73)
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index b8571a3bed..ea6daa21ea 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -441,7 +441,7 @@ int SendQueue::ackMessage(CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam) if (dat) { // "hard" errors are handled differently in multisend. There is no option to retry - once failed, they // are discarded and the user is notified with a small log message. - if (!nen_options.iNoSounds && !(m_pContainer->dwFlags & CNT_NOSOUND)) + if (!nen_options.iNoSounds && !(m_pContainer->m_dwFlags & CNT_NOSOUND)) Skin_PlaySound("SendError"); mir_snwprintf(job.szErrorMsg, TranslateT("Delivery failure: %s"), (wchar_t*)ack->lParam); @@ -485,7 +485,7 @@ int SendQueue::ackMessage(CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam) db_event_setId(dbei.szModule, hNewEvent, (char*)ack->lParam); if (m_pContainer) - if (!nen_options.iNoSounds && !(m_pContainer->dwFlags & CNT_NOSOUND)) + if (!nen_options.iNoSounds && !(m_pContainer->m_dwFlags & CNT_NOSOUND)) Skin_PlaySound("SendMsg"); Srmm_Broadcast(DM_APPENDMCEVENT, job.hContact, hNewEvent); diff --git a/plugins/TabSRMM/src/sidebar.cpp b/plugins/TabSRMM/src/sidebar.cpp index f4942612b7..a61aa5aaad 100644 --- a/plugins/TabSRMM/src/sidebar.cpp +++ b/plugins/TabSRMM/src/sidebar.cpp @@ -148,7 +148,7 @@ const SIZE& CSideBarButton::measureItem() ::GetTextExtentPoint32(dc, tszLabel, (int)mir_wstrlen(tszLabel), &sz);
sz.cx += 28;
- if (m_dat->m_pContainer->dwFlagsEx & TCF_CLOSEBUTTON)
+ if (m_dat->m_pContainer->m_dwFlagsEx & TCF_CLOSEBUTTON)
sz.cx += 20;
if (m_sideBarLayout->dwFlags & CSideBar::SIDEBARLAYOUT_VERTICALORIENTATION)
@@ -255,7 +255,7 @@ void CSideBarButton::renderIconAndNick(const HDC hdc, const RECT *rcItem) const if (m_dat && pContainer) {
hIcon = m_dat->m_cache->getIcon(iSize);
- if (!m_dat->m_bCanFlashTab || (m_dat->m_bCanFlashTab == TRUE && m_dat->m_bTabFlash) || !(pContainer->dwFlagsEx & TCF_FLASHICON)) {
+ if (!m_dat->m_bCanFlashTab || (m_dat->m_bCanFlashTab == TRUE && m_dat->m_bTabFlash) || !(pContainer->m_dwFlagsEx & TCF_FLASHICON)) {
DWORD ix = rc.left + 4;
DWORD iy = (rc.bottom + rc.top - iSize) / 2;
if (m_dat->m_dwFlagsEx & MWF_SHOW_ISIDLE && PluginConfig.m_bIdleDetect)
@@ -269,7 +269,7 @@ void CSideBarButton::renderIconAndNick(const HDC hdc, const RECT *rcItem) const /*
* draw the close button if enabled
*/
- if (m_sideBar->getContainer()->dwFlagsEx & TCF_CLOSEBUTTON) {
+ if (m_sideBar->getContainer()->m_dwFlagsEx & TCF_CLOSEBUTTON) {
if (m_sideBar->getHoveredClose() != this)
CSkin::m_default_bf.SourceConstantAlpha = 150;
@@ -281,7 +281,7 @@ void CSideBarButton::renderIconAndNick(const HDC hdc, const RECT *rcItem) const ::SetBkMode(hdc, TRANSPARENT);
- if (!m_dat->m_bCanFlashTab || (m_dat->m_bCanFlashTab == TRUE && m_dat->m_bTabFlash) || !(pContainer->dwFlagsEx & TCF_FLASHLABEL)) {
+ if (!m_dat->m_bCanFlashTab || (m_dat->m_bCanFlashTab == TRUE && m_dat->m_bTabFlash) || !(pContainer->m_dwFlagsEx & TCF_FLASHLABEL)) {
bool fIsActive = (m_sideBar->getActiveItem() == this ? true : false);
COLORREF clr = 0;
dwTextFlags |= DT_WORD_ELLIPSIS;
@@ -307,7 +307,7 @@ int CSideBarButton::testCloseButton() const if (m_id == IDC_SIDEBARUP || m_id == IDC_SIDEBARDOWN) // scroller buttons don't have a close button
return -1;
- if (m_sideBar->getContainer()->dwFlagsEx & TCF_CLOSEBUTTON && !(getLayout()->dwFlags & CSideBar::SIDEBARLAYOUT_NOCLOSEBUTTONS)) {
+ if (m_sideBar->getContainer()->m_dwFlagsEx & TCF_CLOSEBUTTON && !(getLayout()->dwFlags & CSideBar::SIDEBARLAYOUT_NOCLOSEBUTTONS)) {
POINT pt;
::GetCursorPos(&pt);
::ScreenToClient(m_hwnd, &pt);
@@ -379,17 +379,17 @@ void CSideBar::Init() m_firstVisibleOffset = 0;
m_totalItemHeight = 0;
- m_uLayout = (m_pContainer->dwFlagsEx & 0xff000000) >> 24;
+ m_uLayout = (m_pContainer->m_dwFlagsEx & 0xff000000) >> 24;
m_uLayout = ((m_uLayout < NR_LAYOUTS) ? m_uLayout : 0);
m_currentLayout = &m_layouts[m_uLayout];
m_dwFlags = m_currentLayout->dwFlags;
- m_dwFlags = (m_pContainer->dwFlagsEx & TCF_SBARLEFT ? m_dwFlags | SIDEBARORIENTATION_LEFT : m_dwFlags & ~SIDEBARORIENTATION_LEFT);
- m_dwFlags = (m_pContainer->dwFlagsEx & TCF_SBARRIGHT ? m_dwFlags | SIDEBARORIENTATION_RIGHT : m_dwFlags & ~SIDEBARORIENTATION_RIGHT);
+ m_dwFlags = (m_pContainer->m_dwFlagsEx & TCF_SBARLEFT ? m_dwFlags | SIDEBARORIENTATION_LEFT : m_dwFlags & ~SIDEBARORIENTATION_LEFT);
+ m_dwFlags = (m_pContainer->m_dwFlagsEx & TCF_SBARRIGHT ? m_dwFlags | SIDEBARORIENTATION_RIGHT : m_dwFlags & ~SIDEBARORIENTATION_RIGHT);
- if (m_pContainer->dwFlags & CNT_SIDEBAR) {
+ if (m_pContainer->m_dwFlags & CNT_SIDEBAR) {
if (m_hwndScrollWnd == nullptr)
m_hwndScrollWnd = ::CreateWindowEx(0, L"TS_SideBarClass", L"", WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE | WS_CHILD,
0, 0, m_width, 40, m_pContainer->m_hwnd, reinterpret_cast<HMENU>(5000), g_plugin.getInst(), this);
@@ -756,12 +756,12 @@ void CSideBar::Layout(const RECT *rc, bool fOnlyCalc) RECT rcContainer;
::GetClientRect(m_pContainer->m_hwnd, &rcContainer);
- LONG dx = m_dwFlags & SIDEBARORIENTATION_LEFT ? m_pContainer->tBorder_outer_left :
- rcContainer.right - m_pContainer->tBorder_outer_right - (m_elementWidth + 4);
+ LONG dx = m_dwFlags & SIDEBARORIENTATION_LEFT ? m_pContainer->m_tBorder_outer_left :
+ rcContainer.right - m_pContainer->m_tBorder_outer_right - (m_elementWidth + 4);
- ::SetWindowPos(m_up->getHwnd(), nullptr, dx, m_pContainer->tBorder_outer_top + m_pContainer->MenuBar->getHeight(),
+ ::SetWindowPos(m_up->getHwnd(), nullptr, dx, m_pContainer->m_tBorder_outer_top + m_pContainer->m_pMenuBar->getHeight(),
m_elementWidth + 4, 14, dwFlags | SWP_SHOWWINDOW);
- ::SetWindowPos(m_down->getHwnd(), nullptr, dx, (rcContainer.bottom - 14 - m_pContainer->statusBarHeight - 1),
+ ::SetWindowPos(m_down->getHwnd(), nullptr, dx, (rcContainer.bottom - 14 - m_pContainer->m_statusBarHeight - 1),
m_elementWidth + 4, 14, dwFlags | SWP_SHOWWINDOW);
::EnableWindow(m_up->getHwnd(), topEnabled);
::EnableWindow(m_down->getHwnd(), bottomEnabled);
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp index 2b513ddeac..b8f2942f17 100644 --- a/plugins/TabSRMM/src/tabctrl.cpp +++ b/plugins/TabSRMM/src/tabctrl.cpp @@ -196,7 +196,7 @@ static void DrawItem(TabControlData *tabdat, HDC dc, RECT *rcItem, int nHint, in hIcon = dat->m_hTabIcon;
}
- if (!dat->m_bCanFlashTab || (dat->m_bCanFlashTab == TRUE && dat->m_bTabFlash) || !(dat->m_pContainer->dwFlagsEx & TCF_FLASHICON)) {
+ if (!dat->m_bCanFlashTab || (dat->m_bCanFlashTab == TRUE && dat->m_bTabFlash) || !(dat->m_pContainer->m_dwFlagsEx & TCF_FLASHICON)) {
DWORD ix = rcItem->left + tabdat->m_xpad - 1;
DWORD iy = (rcItem->bottom + rcItem->top - iSize) / 2;
if (dat->m_dwFlagsEx & MWF_SHOW_ISIDLE && PluginConfig.m_bIdleDetect)
@@ -218,7 +218,7 @@ static void DrawItem(TabControlData *tabdat, HDC dc, RECT *rcItem, int nHint, in CSkin::m_default_bf.SourceConstantAlpha = 255;
}
- if (!dat->m_bCanFlashTab || (dat->m_bCanFlashTab == TRUE && dat->m_bTabFlash) || !(dat->m_pContainer->dwFlagsEx & TCF_FLASHLABEL)) {
+ if (!dat->m_bCanFlashTab || (dat->m_bCanFlashTab == TRUE && dat->m_bTabFlash) || !(dat->m_pContainer->m_dwFlagsEx & TCF_FLASHLABEL)) {
DWORD dwTextFlags = DT_SINGLELINE | DT_VCENTER;
HFONT oldFont = (HFONT)SelectObject(dc, (HFONT)SendMessage(tabdat->hwnd, WM_GETFONT, 0, 0));
if (tabdat->dwStyle & TCS_BUTTONS || !(tabdat->dwStyle & TCS_MULTILINE)) {
@@ -612,7 +612,7 @@ static void PaintWorker(HWND hwnd, TabControlData *tabdat) tabdat->iHoveredTabIndex = hotItem;
tabdat->fAeroTabs = (CSkin::m_fAeroSkinsValid && (isAero || PluginConfig.m_fillColor)) ? TRUE : FALSE;
- tabdat->fCloseButton = (tabdat->pContainer->dwFlagsEx & TCF_CLOSEBUTTON ? TRUE : FALSE);
+ tabdat->fCloseButton = (tabdat->pContainer->m_dwFlagsEx & TCF_CLOSEBUTTON ? TRUE : FALSE);
tabdat->helperDat = nullptr;
if (tabdat->fAeroTabs) {
@@ -633,7 +633,7 @@ static void PaintWorker(HWND hwnd, TabControlData *tabdat) // switchbar is active, don't paint a single pixel, the tab control won't be visible at all
// same when we have only ONE tab and do not want it to be visible because of the container
// option "Show tab bar only when needed".
- if ((tabdat->pContainer->dwFlags & CNT_SIDEBAR) || (nCount == 1 && tabdat->pContainer->dwFlags & CNT_HIDETABS)) {
+ if ((tabdat->pContainer->m_dwFlags & CNT_SIDEBAR) || (nCount == 1 && tabdat->pContainer->m_dwFlags & CNT_HIDETABS)) {
if (nCount == 0)
FillRect(hdcreal, &ps.rcPaint, GetSysColorBrush(COLOR_3DFACE)); // avoid flickering/ugly black background during container creation
EndPaint(hwnd, &ps);
@@ -662,7 +662,7 @@ static void PaintWorker(HWND hwnd, TabControlData *tabdat) bmpOld = (HBITMAP)SelectObject(hdc, bmpMem);
}
- if (nCount == 1 && tabdat->pContainer->dwFlags & CNT_HIDETABS)
+ if (nCount == 1 && tabdat->pContainer->m_dwFlags & CNT_HIDETABS)
rctClip = rctPage;
if (CSkin::m_skinEnabled)
@@ -694,9 +694,9 @@ static void PaintWorker(HWND hwnd, TabControlData *tabdat) }
}
- if (nCount > 1 || !(tabdat->pContainer->dwFlags & CNT_HIDETABS)) {
+ if (nCount > 1 || !(tabdat->pContainer->m_dwFlags & CNT_HIDETABS)) {
rctClip = rctPage;
- InflateRect(&rctClip, -tabdat->pContainer->tBorder, -tabdat->pContainer->tBorder);
+ InflateRect(&rctClip, -tabdat->pContainer->m_tBorder, -tabdat->pContainer->m_tBorder);
}
else memset(&rctClip, 0, sizeof(RECT));
@@ -822,7 +822,7 @@ page_done: pt.y = rcLog.bottom;
pt.x = rcLog.left;
ScreenToClient(hwnd, &pt);
- rcPage.top = pt.y + ((nCount > 1 || !(tabdat->helperDat->m_pContainer->dwFlags & CNT_HIDETABS)) ? tabdat->helperDat->m_pContainer->tBorder : 0);
+ rcPage.top = pt.y + ((nCount > 1 || !(tabdat->helperDat->m_pContainer->m_dwFlags & CNT_HIDETABS)) ? tabdat->helperDat->m_pContainer->m_tBorder : 0);
FillRect(hdc, &rcPage, CSkin::m_BrushBack);
rcPage.top = 0;
}
@@ -1045,7 +1045,7 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara tabdat->fTipActive = FALSE;
}
KillTimer(hwnd, TIMERID_HOVER_T);
- if (tabdat->pContainer && (!tabdat->pContainer->SideBar->isActive() && (TabCtrl_GetItemCount(hwnd) > 1 || !(tabdat->pContainer->dwFlags & CNT_HIDETABS))))
+ if (tabdat->pContainer && (!tabdat->pContainer->m_pSideBar->isActive() && (TabCtrl_GetItemCount(hwnd) > 1 || !(tabdat->pContainer->m_dwFlags & CNT_HIDETABS))))
SetTimer(hwnd, TIMERID_HOVER_T, 750, nullptr);
break;
@@ -1054,7 +1054,7 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara int iTabs = TabCtrl_GetItemCount(hwnd);
if (!(tabdat->dwStyle & TCS_MULTILINE)) {
- if (iTabs > (tabdat->pContainer->dwFlags & CNT_HIDETABS ? 1 : 0)) {
+ if (iTabs > (tabdat->pContainer->m_dwFlags & CNT_HIDETABS ? 1 : 0)) {
RECT rcClient, rc;
GetClientRect(hwnd, &rcClient);
TabCtrl_GetItemRect(hwnd, iTabs - 1, &rc);
@@ -1082,7 +1082,7 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara break;
case WM_LBUTTONDBLCLK:
- if (!(tabdat->pContainer->settings->dwFlagsEx & TCF_CLOSEBUTTON)) {
+ if (!(tabdat->pContainer->m_pSettings->dwFlagsEx & TCF_CLOSEBUTTON)) {
GetCursorPos(&pt);
SendMessage(GetParent(hwnd), DM_CLOSETABATMOUSE, 0, (LPARAM)&pt);
}
diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp index 53c5ea23fe..286b84473a 100644 --- a/plugins/TabSRMM/src/taskbar.cpp +++ b/plugins/TabSRMM/src/taskbar.cpp @@ -335,9 +335,9 @@ void CProxyWindow::sendPreview() ::ScreenToClient(m_dat->m_pContainer->m_hwnd, &pt);
}
else {
- rcLog = m_dat->m_pContainer->rcLogSaved;
- rcContainer = m_dat->m_pContainer->rcSaved;
- pt = m_dat->m_pContainer->ptLogSaved;
+ rcLog = m_dat->m_pContainer->m_rcLogSaved;
+ rcContainer = m_dat->m_pContainer->m_rcSaved;
+ pt = m_dat->m_pContainer->m_ptLogSaved;
}
::GetWindowRect(::GetDlgItem(m_dat->m_pContainer->m_hwndActive, IDC_SRMM_LOG), &rcTemp);
@@ -372,7 +372,7 @@ void CProxyWindow::sendPreview() HBITMAP hbmRich = CSkin::CreateAeroCompatibleBitmap(rcRich, hdcRich);
HBITMAP hbmRichOld = reinterpret_cast<HBITMAP>(::SelectObject(hdcRich, hbmRich));
- COLORREF clr = fIsChat ? db_get_dw(0, FONTMODULE, SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR) : m_dat->m_pContainer->theme.inbg;
+ COLORREF clr = fIsChat ? db_get_dw(0, FONTMODULE, SRMSGSET_BKGCOLOUR, SRMSGDEFSET_BKGCOLOUR) : m_dat->m_pContainer->m_theme.inbg;
HBRUSH br = ::CreateSolidBrush(clr);
::FillRect(hdcRich, &rcRich, br);
::DeleteObject(br);
@@ -381,7 +381,7 @@ void CProxyWindow::sendPreview() ::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);
+ &rcRich, DT_VCENTER | DT_CENTER | DT_WORDBREAK, 10, m_dat->m_pContainer->m_theme.fontColors[MSGFONTID_MYMSG], false);
}
else {
rcRich.right *= twips;
@@ -413,7 +413,7 @@ void CProxyWindow::sendPreview() }
else pt.x = pt.y = 0;
- CMimAPI::m_pfnDwmSetIconicLivePreviewBitmap(m_hwndProxy, hbm, &pt, m_dat->m_pContainer->dwFlags & CNT_CREATE_MINIMIZED ? 0 : DWM_SIT_DISPLAYFRAME);
+ CMimAPI::m_pfnDwmSetIconicLivePreviewBitmap(m_hwndProxy, hbm, &pt, m_dat->m_pContainer->m_dwFlags & CNT_CREATE_MINIMIZED ? 0 : DWM_SIT_DISPLAYFRAME);
::ReleaseDC(m_dat->GetHwnd(), dc);
::DeleteObject(hbm);
}
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp index d169e08af0..48433b5192 100644 --- a/plugins/TabSRMM/src/templates.cpp +++ b/plugins/TabSRMM/src/templates.cpp @@ -129,7 +129,7 @@ CTemplateEditDlg::CTemplateEditDlg(BOOL _rtl, HWND hwndParent) : m_pContainer = (TContainerData*)mir_calloc(sizeof(TContainerData)); LoadOverrideTheme(m_pContainer); - tSet = rtl ? m_pContainer->rtl_templates : m_pContainer->ltr_templates; + tSet = rtl ? m_pContainer->m_rtl_templates : m_pContainer->m_ltr_templates; listTemplates.OnDblClick = Callback(this, &CTemplateEditDlg::onDblClick_List); listTemplates.OnSelChange = Callback(this, &CTemplateEditDlg::onSelChange_List); @@ -158,7 +158,7 @@ bool CTemplateEditDlg::OnInitDialog() m_hContact = db_find_next(m_hContact); m_szProto = GetContactProto(m_hContact); } - m_dwFlags = m_pContainer->theme.dwFlags; + m_dwFlags = m_pContainer->m_theme.dwFlags; m_cache = CContactCache::getContactCache(m_hContact); m_cache->updateNick(); diff --git a/plugins/TabSRMM/src/themeio.cpp b/plugins/TabSRMM/src/themeio.cpp index d8f483e60b..5b0bf7c027 100644 --- a/plugins/TabSRMM/src/themeio.cpp +++ b/plugins/TabSRMM/src/themeio.cpp @@ -221,10 +221,10 @@ void TSAPI WriteThemeToINI(const wchar_t *szIniFilenameT, CSrmmWindow *dat) WritePrivateProfileStringA("Message Log", "ExtraMicroLF", _itoa(M.GetByte("extramicrolf", 0), szBuf, 10), szIniFilename);
for (i = 0; i <= TMPL_ERRMSG; i++) {
- T2Utf szLTR((dat == nullptr) ? LTR_Active.szTemplates[i] : dat->m_pContainer->ltr_templates->szTemplates[i]);
+ T2Utf szLTR((dat == nullptr) ? LTR_Active.szTemplates[i] : dat->m_pContainer->m_ltr_templates->szTemplates[i]);
WritePrivateProfileStringA("Templates", TemplateNames[i], szLTR, szIniFilename);
- T2Utf szRTL((dat == nullptr) ? RTL_Active.szTemplates[i] : dat->m_pContainer->rtl_templates->szTemplates[i]);
+ T2Utf szRTL((dat == nullptr) ? RTL_Active.szTemplates[i] : dat->m_pContainer->m_rtl_templates->szTemplates[i]);
WritePrivateProfileStringA("RTLTemplates", TemplateNames[i], szRTL, szIniFilename);
}
for (i = 0; i < CUSTOM_COLORS; i++) {
@@ -232,7 +232,7 @@ void TSAPI WriteThemeToINI(const wchar_t *szIniFilenameT, CSrmmWindow *dat) if (dat == nullptr)
WritePrivateProfileStringA("Custom Colors", szTemp, _itoa(M.GetDword(szTemp, 0), szBuf, 10), szIniFilename);
else
- WritePrivateProfileStringA("Custom Colors", szTemp, _itoa(dat->m_pContainer->theme.custom_colors[i], szBuf, 10), szIniFilename);
+ WritePrivateProfileStringA("Custom Colors", szTemp, _itoa(dat->m_pContainer->m_theme.custom_colors[i], szBuf, 10), szIniFilename);
}
for (i = 0; i <= 7; i++)
WritePrivateProfileStringA("Nick Colors", _itoa(i, szBuf, 10), _itoa(g_Settings.nickColors[i], szTemp, 10), szIniFilename);
@@ -336,31 +336,31 @@ void TSAPI ReadThemeFromINI(const wchar_t *szIniFilenameT, TContainerData *dat, if (!noAdvanced) {
for (i = 0; i < MSGDLGFONTCOUNT; i++) {
mir_snprintf(szTemp, "Font%d", i);
- LoadLogfontFromINI(i, szTemp, &dat->theme.logFonts[i], &dat->theme.fontColors[i], szIniFilename);
- wsprintfA(dat->theme.rtfFonts + (i * RTFCACHELINESIZE), "\\f%u\\cf%u\\b%d\\i%d\\ul%d\\fs%u", i, i, dat->theme.logFonts[i].lfWeight >= FW_BOLD ? 1 : 0, dat->theme.logFonts[i].lfItalic, dat->theme.logFonts[i].lfUnderline, 2 * abs(dat->theme.logFonts[i].lfHeight) * 74 / SY); //!!!!!!!!
+ LoadLogfontFromINI(i, szTemp, &dat->m_theme.logFonts[i], &dat->m_theme.fontColors[i], szIniFilename);
+ wsprintfA(dat->m_theme.rtfFonts + (i * RTFCACHELINESIZE), "\\f%u\\cf%u\\b%d\\i%d\\ul%d\\fs%u", i, i, dat->m_theme.logFonts[i].lfWeight >= FW_BOLD ? 1 : 0, dat->m_theme.logFonts[i].lfItalic, dat->m_theme.logFonts[i].lfUnderline, 2 * abs(dat->m_theme.logFonts[i].lfHeight) * 74 / SY); //!!!!!!!!
}
- wsprintfA(dat->theme.rtfFonts + (MSGDLGFONTCOUNT * RTFCACHELINESIZE), "\\f%u\\cf%u\\b%d\\i%d\\ul%d\\fs%u", MSGDLGFONTCOUNT, MSGDLGFONTCOUNT, 0, 0, 0, 0); //!!!!!!!!!
+ wsprintfA(dat->m_theme.rtfFonts + (MSGDLGFONTCOUNT * RTFCACHELINESIZE), "\\f%u\\cf%u\\b%d\\i%d\\ul%d\\fs%u", MSGDLGFONTCOUNT, MSGDLGFONTCOUNT, 0, 0, 0, 0); //!!!!!!!!!
}
- dat->theme.bg = GetPrivateProfileIntA("Message Log", "BackgroundColor", RGB(224, 224, 224), szIniFilename);
- dat->theme.inbg = GetPrivateProfileIntA("Message Log", "IncomingBG", RGB(224, 224, 224), szIniFilename);
- dat->theme.outbg = GetPrivateProfileIntA("Message Log", "OutgoingBG", RGB(224, 224, 224), szIniFilename);
+ dat->m_theme.bg = GetPrivateProfileIntA("Message Log", "BackgroundColor", RGB(224, 224, 224), szIniFilename);
+ dat->m_theme.inbg = GetPrivateProfileIntA("Message Log", "IncomingBG", RGB(224, 224, 224), szIniFilename);
+ dat->m_theme.outbg = GetPrivateProfileIntA("Message Log", "OutgoingBG", RGB(224, 224, 224), szIniFilename);
- dat->theme.oldinbg = GetPrivateProfileIntA("Message Log", "OldIncomingBG", RGB(224, 224, 224), szIniFilename);
- dat->theme.oldoutbg = GetPrivateProfileIntA("Message Log", "OldOutgoingBG", RGB(224, 224, 224), szIniFilename);
- dat->theme.statbg = GetPrivateProfileIntA("Message Log", "StatusBG", RGB(224, 224, 224), szIniFilename);
+ dat->m_theme.oldinbg = GetPrivateProfileIntA("Message Log", "OldIncomingBG", RGB(224, 224, 224), szIniFilename);
+ dat->m_theme.oldoutbg = GetPrivateProfileIntA("Message Log", "OldOutgoingBG", RGB(224, 224, 224), szIniFilename);
+ dat->m_theme.statbg = GetPrivateProfileIntA("Message Log", "StatusBG", RGB(224, 224, 224), szIniFilename);
- dat->theme.inputbg = GetPrivateProfileIntA("Message Log", "InputBG", RGB(224, 224, 224), szIniFilename);
- dat->theme.hgrid = GetPrivateProfileIntA("Message Log", "HgridColor", RGB(224, 224, 224), szIniFilename);
- dat->theme.dwFlags = GetPrivateProfileIntA("Message Log", "DWFlags", MWF_LOG_DEFAULT, szIniFilename);
+ dat->m_theme.inputbg = GetPrivateProfileIntA("Message Log", "InputBG", RGB(224, 224, 224), szIniFilename);
+ dat->m_theme.hgrid = GetPrivateProfileIntA("Message Log", "HgridColor", RGB(224, 224, 224), szIniFilename);
+ dat->m_theme.dwFlags = GetPrivateProfileIntA("Message Log", "DWFlags", MWF_LOG_DEFAULT, szIniFilename);
db_set_b(0, SRMSGMOD_T, "wantvgrid", (BYTE)(GetPrivateProfileIntA("Message Log", "VGrid", 0, szIniFilename)));
db_set_b(0, SRMSGMOD_T, "extramicrolf", (BYTE)(GetPrivateProfileIntA("Message Log", "ExtraMicroLF", 0, szIniFilename)));
- dat->theme.left_indent = GetPrivateProfileIntA("Message Log", "LeftIndent", 0, szIniFilename);
- dat->theme.right_indent = GetPrivateProfileIntA("Message Log", "RightIndent", 0, szIniFilename);
+ dat->m_theme.left_indent = GetPrivateProfileIntA("Message Log", "LeftIndent", 0, szIniFilename);
+ dat->m_theme.right_indent = GetPrivateProfileIntA("Message Log", "RightIndent", 0, szIniFilename);
for (i = 0; i < CUSTOM_COLORS; i++) {
mir_snprintf(szTemp, "cc%d", i + 1);
- dat->theme.custom_colors[i] = GetPrivateProfileIntA("Custom Colors", szTemp, RGB(224, 224, 224), szIniFilename);
+ dat->m_theme.custom_colors[i] = GetPrivateProfileIntA("Custom Colors", szTemp, RGB(224, 224, 224), szIniFilename);
}
}
@@ -378,7 +378,7 @@ void TSAPI ReadThemeFromINI(const wchar_t *szIniFilenameT, TContainerData *dat, if (dat == nullptr)
wcsncpy_s(LTR_Active.szTemplates[i], decoded, _TRUNCATE);
else
- wcsncpy_s(dat->ltr_templates->szTemplates[i], decoded, _TRUNCATE);
+ wcsncpy_s(dat->m_ltr_templates->szTemplates[i], decoded, _TRUNCATE);
mir_free(decoded);
}
@@ -391,7 +391,7 @@ void TSAPI ReadThemeFromINI(const wchar_t *szIniFilenameT, TContainerData *dat, if (dat == nullptr)
wcsncpy_s(RTL_Active.szTemplates[i], decoded, _TRUNCATE);
else
- wcsncpy_s(dat->rtl_templates->szTemplates[i], decoded, _TRUNCATE);
+ wcsncpy_s(dat->m_rtl_templates->szTemplates[i], decoded, _TRUNCATE);
mir_free(decoded);
}
}
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp index f4631a38e0..aa934eb986 100644 --- a/plugins/TabSRMM/src/themes.cpp +++ b/plugins/TabSRMM/src/themes.cpp @@ -1854,7 +1854,7 @@ void CSkin::SkinDrawBG(HWND hwndClient, HWND hwnd, TContainerData *pContainer, R pt.y = rcWindow.top + rcClient->top;
::ScreenToClient(hwnd, &pt);
if (pContainer)
- dc = pContainer->cachedDC;
+ dc = pContainer->m_cachedDC;
else
dc = ::GetDC(hwnd);
pt.y = max(pt.y, 0);
@@ -2144,7 +2144,7 @@ void CSkin::MapClientToParent(HWND hwndClient, HWND hwndParent, RECT &rc) void CTabBaseDlg::RenderToolbarBG(HDC hdc, const RECT &rcWindow) const
{
- if (m_pContainer->dwFlags & CNT_HIDETOOLBAR)
+ if (m_pContainer->m_dwFlags & CNT_HIDETOOLBAR)
return;
bool bAero = M.isAero();
@@ -2154,7 +2154,7 @@ void CTabBaseDlg::RenderToolbarBG(HDC hdc, const RECT &rcWindow) const RECT rc, rcToolbar;
POINT pt;
- if (!(m_pContainer->dwFlags & CNT_BOTTOMTOOLBAR)) {
+ if (!(m_pContainer->m_dwFlags & CNT_BOTTOMTOOLBAR)) {
::GetWindowRect(m_log.GetHwnd(), &rc);
pt.y = rc.bottom + 0;
::ScreenToClient(m_hwnd, &pt);
@@ -2196,36 +2196,36 @@ void CTabBaseDlg::RenderToolbarBG(HDC hdc, const RECT &rcWindow) const rcCachedToolbar.right = cx;
rcCachedToolbar.bottom = cy;
- if (m_pContainer->cachedToolbarDC == nullptr)
- m_pContainer->cachedToolbarDC = ::CreateCompatibleDC(hdc);
+ if (m_pContainer->m_cachedToolbarDC == nullptr)
+ m_pContainer->m_cachedToolbarDC = ::CreateCompatibleDC(hdc);
- if (m_pContainer->szOldToolbarSize.cx != cx || m_pContainer->szOldToolbarSize.cy != cy) {
- if (m_pContainer->oldhbmToolbarBG) {
- ::SelectObject(m_pContainer->cachedToolbarDC, m_pContainer->oldhbmToolbarBG);
- ::DeleteObject(m_pContainer->hbmToolbarBG);
+ if (m_pContainer->m_szOldToolbarSize.cx != cx || m_pContainer->m_szOldToolbarSize.cy != cy) {
+ if (m_pContainer->m_oldhbmToolbarBG) {
+ ::SelectObject(m_pContainer->m_cachedToolbarDC, m_pContainer->m_oldhbmToolbarBG);
+ ::DeleteObject(m_pContainer->m_hbmToolbarBG);
}
- m_pContainer->hbmToolbarBG = CSkin::CreateAeroCompatibleBitmap(rcCachedToolbar, hdc);// ::CreateCompatibleBitmap(hdc, cx, cy);
- m_pContainer->oldhbmToolbarBG = reinterpret_cast<HBITMAP>(::SelectObject(m_pContainer->cachedToolbarDC, m_pContainer->hbmToolbarBG));
+ m_pContainer->m_hbmToolbarBG = CSkin::CreateAeroCompatibleBitmap(rcCachedToolbar, hdc);// ::CreateCompatibleBitmap(hdc, cx, cy);
+ m_pContainer->m_oldhbmToolbarBG = reinterpret_cast<HBITMAP>(::SelectObject(m_pContainer->m_cachedToolbarDC, m_pContainer->m_hbmToolbarBG));
}
- m_pContainer->szOldToolbarSize.cx = cx;
- m_pContainer->szOldToolbarSize.cy = cy;
+ m_pContainer->m_szOldToolbarSize.cx = cx;
+ m_pContainer->m_szOldToolbarSize.cy = cy;
if (!fMustDrawNonThemed && M.isVSThemed()) {
- DrawThemeBackground(m_hThemeToolbar, m_pContainer->cachedToolbarDC, 6, 1, &rcCachedToolbar, &rcCachedToolbar);
- m_pContainer->bTBRenderingMode = 1; // tell TSButton how to render the tool bar buttons
+ DrawThemeBackground(m_hThemeToolbar, m_pContainer->m_cachedToolbarDC, 6, 1, &rcCachedToolbar, &rcCachedToolbar);
+ m_pContainer->m_bTBRenderingMode = 1; // tell TSButton how to render the tool bar buttons
}
else {
- m_pContainer->bTBRenderingMode = (M.isVSThemed() ? 1 : 0);
+ m_pContainer->m_bTBRenderingMode = (M.isVSThemed() ? 1 : 0);
CSkin::m_tmp_tb_high = PluginConfig.m_tbBackgroundHigh ? PluginConfig.m_tbBackgroundHigh :
((bAero && CSkin::m_pCurrentAeroEffect) ? CSkin::m_pCurrentAeroEffect->m_clrToolbar : ::GetSysColor(COLOR_3DFACE));
CSkin::m_tmp_tb_low = PluginConfig.m_tbBackgroundLow ? PluginConfig.m_tbBackgroundLow :
((bAero && CSkin::m_pCurrentAeroEffect) ? CSkin::m_pCurrentAeroEffect->m_clrToolbar2 : ::GetSysColor(COLOR_3DFACE));
bAlphaOffset = PluginConfig.m_tbBackgroundHigh ? 40 : 0;
- ::DrawAlpha(m_pContainer->cachedToolbarDC, &rcCachedToolbar, CSkin::m_tmp_tb_high, 55 + bAlphaOffset, CSkin::m_tmp_tb_low, 0, 9, 0, 0, nullptr);
+ ::DrawAlpha(m_pContainer->m_cachedToolbarDC, &rcCachedToolbar, CSkin::m_tmp_tb_high, 55 + bAlphaOffset, CSkin::m_tmp_tb_low, 0, 9, 0, 0, nullptr);
}
- ::BitBlt(hdc, rcToolbar.left, rcToolbar.top, cx, cy, m_pContainer->cachedToolbarDC, 0, 0, SRCCOPY);
+ ::BitBlt(hdc, rcToolbar.left, rcToolbar.top, cx, cy, m_pContainer->m_cachedToolbarDC, 0, 0, SRCCOPY);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp index 7d01b6604f..c210ebecc5 100644 --- a/plugins/TabSRMM/src/userprefs.cpp +++ b/plugins/TabSRMM/src/userprefs.cpp @@ -281,8 +281,8 @@ int CTabBaseDlg::LoadLocalFlags() DWORD dwGlobal = M.GetDword("mwflags", MWF_LOG_DEFAULT);
m_dwFlags &= ~MWF_LOG_ALL;
- if (m_pContainer->theme.isPrivate)
- m_dwFlags |= (m_pContainer->theme.dwFlags & MWF_LOG_ALL);
+ if (m_pContainer->m_theme.isPrivate)
+ m_dwFlags |= (m_pContainer->m_theme.dwFlags & MWF_LOG_ALL);
else
m_dwFlags |= (dwGlobal & MWF_LOG_ALL);
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index 3d7bc94e85..9e7ac2c0a4 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -544,18 +544,18 @@ int Utils::WriteContainerSettingsToDB(const MCONTACT hContact, TContainerSetting void Utils::SettingsToContainer(TContainerData *pContainer)
{
- pContainer->dwFlags = pContainer->settings->dwFlags;
- pContainer->dwFlagsEx = pContainer->settings->dwFlagsEx;
- pContainer->avatarMode = pContainer->settings->avatarMode;
- pContainer->ownAvatarMode = pContainer->settings->ownAvatarMode;
+ pContainer->m_dwFlags = pContainer->m_pSettings->dwFlags;
+ pContainer->m_dwFlagsEx = pContainer->m_pSettings->dwFlagsEx;
+ pContainer->m_avatarMode = pContainer->m_pSettings->avatarMode;
+ pContainer->m_ownAvatarMode = pContainer->m_pSettings->ownAvatarMode;
}
void Utils::ContainerToSettings(TContainerData *pContainer)
{
- pContainer->settings->dwFlags = pContainer->dwFlags;
- pContainer->settings->dwFlagsEx = pContainer->dwFlagsEx;
- pContainer->settings->avatarMode = pContainer->avatarMode;
- pContainer->settings->ownAvatarMode = pContainer->ownAvatarMode;
+ pContainer->m_pSettings->dwFlags = pContainer->m_dwFlags;
+ pContainer->m_pSettings->dwFlagsEx = pContainer->m_dwFlagsEx;
+ pContainer->m_pSettings->avatarMode = pContainer->m_avatarMode;
+ pContainer->m_pSettings->ownAvatarMode = pContainer->m_ownAvatarMode;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -570,37 +570,37 @@ void Utils::ReadPrivateContainerSettings(TContainerData *pContainer, bool fForce TContainerSettings csTemp;
memcpy(&csTemp, &PluginConfig.globalContainerSettings, sizeof(csTemp));
- mir_snprintf(szCname, "%s%d", CNT_BASEKEYNAME, pContainer->iContainerIndex);
+ mir_snprintf(szCname, "%s%d", CNT_BASEKEYNAME, pContainer->m_iContainerIndex);
Utils::ReadContainerSettingsFromDB(0, &csTemp, szCname);
if (csTemp.fPrivate || fForce) {
- if (pContainer->settings == nullptr || pContainer->settings == &PluginConfig.globalContainerSettings)
- pContainer->settings = (TContainerSettings *)mir_alloc(sizeof(csTemp));
- memcpy(pContainer->settings, &csTemp, sizeof(csTemp));
- pContainer->settings->fPrivate = true;
+ if (pContainer->m_pSettings == nullptr || pContainer->m_pSettings == &PluginConfig.globalContainerSettings)
+ pContainer->m_pSettings = (TContainerSettings *)mir_alloc(sizeof(csTemp));
+ memcpy(pContainer->m_pSettings, &csTemp, sizeof(csTemp));
+ pContainer->m_pSettings->fPrivate = true;
}
- else pContainer->settings = &PluginConfig.globalContainerSettings;
+ else pContainer->m_pSettings = &PluginConfig.globalContainerSettings;
}
void Utils::SaveContainerSettings(TContainerData *pContainer, const char *szSetting)
{
char szCName[50];
- pContainer->dwFlags &= ~(CNT_DEFERREDCONFIGURE | CNT_CREATE_MINIMIZED | CNT_DEFERREDSIZEREQUEST | CNT_CREATE_CLONED);
- if (pContainer->settings->fPrivate) {
- mir_snprintf(szCName, "%s%d", szSetting, pContainer->iContainerIndex);
- WriteContainerSettingsToDB(0, pContainer->settings, szCName);
+ pContainer->m_dwFlags &= ~(CNT_DEFERREDCONFIGURE | CNT_CREATE_MINIMIZED | CNT_DEFERREDSIZEREQUEST | CNT_CREATE_CLONED);
+ if (pContainer->m_pSettings->fPrivate) {
+ mir_snprintf(szCName, "%s%d", szSetting, pContainer->m_iContainerIndex);
+ WriteContainerSettingsToDB(0, pContainer->m_pSettings, szCName);
}
- mir_snprintf(szCName, "%s%d_theme", szSetting, pContainer->iContainerIndex);
- if (mir_wstrlen(pContainer->szRelThemeFile) > 1) {
- if (pContainer->fPrivateThemeChanged == TRUE) {
- PathToRelativeW(pContainer->szRelThemeFile, pContainer->szAbsThemeFile, M.getDataPath());
- db_set_ws(0, SRMSGMOD_T, szCName, pContainer->szAbsThemeFile);
- pContainer->fPrivateThemeChanged = FALSE;
+ mir_snprintf(szCName, "%s%d_theme", szSetting, pContainer->m_iContainerIndex);
+ if (mir_wstrlen(pContainer->m_szRelThemeFile) > 1) {
+ if (pContainer->m_fPrivateThemeChanged == TRUE) {
+ PathToRelativeW(pContainer->m_szRelThemeFile, pContainer->m_szAbsThemeFile, M.getDataPath());
+ db_set_ws(0, SRMSGMOD_T, szCName, pContainer->m_szAbsThemeFile);
+ pContainer->m_fPrivateThemeChanged = FALSE;
}
}
else {
::db_unset(0, SRMSGMOD_T, szCName);
- pContainer->fPrivateThemeChanged = FALSE;
+ pContainer->m_fPrivateThemeChanged = FALSE;
}
}
@@ -746,10 +746,10 @@ void Utils::addMenuItem(const HMENU& m, MENUITEMINFO &mii, HICON hIcon, const wc int CTabBaseDlg::MustPlaySound() const
{
- if (m_pContainer->fHidden) // hidden container is treated as closed, so play the sound
+ if (m_pContainer->m_bHidden) // hidden container is treated as closed, so play the sound
return 1;
- if (m_pContainer->dwFlags & CNT_NOSOUND || nen_options.iNoSounds)
+ if (m_pContainer->m_dwFlags & CNT_NOSOUND || nen_options.iNoSounds)
return 0;
bool fActiveWindow = (m_pContainer->m_hwnd == ::GetForegroundWindow() ? true : false);
@@ -758,15 +758,15 @@ int CTabBaseDlg::MustPlaySound() const // window minimized, check if sound has to be played
if (fIconic)
- return(m_pContainer->dwFlagsEx & CNT_EX_SOUNDS_MINIMIZED ? 1 : 0);
+ return(m_pContainer->m_dwFlagsEx & CNT_EX_SOUNDS_MINIMIZED ? 1 : 0);
// window in foreground
if (!fActiveWindow)
- return(m_pContainer->dwFlagsEx & CNT_EX_SOUNDS_UNFOCUSED ? 1 : 0);
+ return(m_pContainer->m_dwFlagsEx & CNT_EX_SOUNDS_UNFOCUSED ? 1 : 0);
if (fActiveTab)
- return(m_pContainer->dwFlagsEx & CNT_EX_SOUNDS_FOCUSED ? 1 : 0);
- return(m_pContainer->dwFlagsEx & CNT_EX_SOUNDS_INACTIVETABS ? 1 : 0);
+ return(m_pContainer->m_dwFlagsEx & CNT_EX_SOUNDS_FOCUSED ? 1 : 0);
+ return(m_pContainer->m_dwFlagsEx & CNT_EX_SOUNDS_INACTIVETABS ? 1 : 0);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/TabSRMM/src/version.h b/plugins/TabSRMM/src/version.h index dac8baa3c8..80b419838f 100644 --- a/plugins/TabSRMM/src/version.h +++ b/plugins/TabSRMM/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 3
#define __MINOR_VERSION 5
#define __RELEASE_NUM 0
-#define __BUILD_NUM 12
+#define __BUILD_NUM 13
#include <stdver.h>
|