From e43e5e9e3ff94b20953c840a819952e4221654fa Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 7 Mar 2019 15:29:12 +0300 Subject: tabSRMM: - useless message DM_SETICON replaced with a call of SetIcon; - fixes #1866 (when sub is changed, tabSRMM doesn't update an avatar in taskbar) - code cleaning & names conflict resolution --- plugins/TabSRMM/src/tabctrl.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins/TabSRMM/src/tabctrl.cpp') 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); } -- cgit v1.2.3