diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/MirFox/src/MirandaOptions.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/globals.cpp | 11 | ||||
-rw-r--r-- | plugins/TabSRMM/src/TSButton.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat_window.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/container.cpp | 20 | ||||
-rw-r--r-- | plugins/TabSRMM/src/containeroptions.cpp | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 5 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.h | 3 | ||||
-rw-r--r-- | plugins/TabSRMM/src/mim.cpp | 5 | ||||
-rw-r--r-- | plugins/TabSRMM/src/mim.h | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 3 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgoptions.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sidebar.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/tabctrl.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/taskbar.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/themes.cpp | 4 | ||||
-rw-r--r-- | plugins/TooltipNotify/src/TooltipNotify.cpp | 15 | ||||
-rw-r--r-- | plugins/TooltipNotify/src/TooltipNotify.h | 2 | ||||
-rw-r--r-- | plugins/TooltipNotify/src/Utils.cpp | 7 | ||||
-rw-r--r-- | plugins/TooltipNotify/src/Utils.h | 1 |
21 files changed, 42 insertions, 72 deletions
diff --git a/plugins/MirFox/src/MirandaOptions.cpp b/plugins/MirFox/src/MirandaOptions.cpp index 5653ad774a..2a72d98300 100644 --- a/plugins/MirFox/src/MirandaOptions.cpp +++ b/plugins/MirFox/src/MirandaOptions.cpp @@ -334,7 +334,7 @@ INT_PTR CALLBACK DlgProcOpts_Tab2(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM HIMAGELIST hIml;
int smCx = GetSystemMetrics(SM_CXSMICON);
int smCy = GetSystemMetrics(SM_CYSMICON);
- hIml = ImageList_Create(smCx,smCy,((LOBYTE(LOWORD(GetVersion()))>=5 && LOWORD(GetVersion())!=5) ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, 4, 4);
+ hIml = ImageList_Create(smCx, smCy, (IsWinVerVistaPlus() ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, 4, 4);
//load icons (direct)
icoHandle_ICON_OFF = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_ICON_OFF));
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index 0e4ba89823..b084f1c7fd 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -427,13 +427,12 @@ void ReloadGlobals() g_dat.flags2 |= SMF2_SHOWTYPINGCLIST;
if (g_plugin.getByte(SRMSGSET_SHOWTYPINGSWITCH, SRMSGDEFSET_SHOWTYPINGSWITCH))
g_dat.flags2 |= SMF2_SHOWTYPINGSWITCH;
+ if (g_plugin.getByte(SRMSGSET_USETRANSPARENCY, SRMSGDEFSET_USETRANSPARENCY))
+ g_dat.flags2 |= SMF2_USETRANSPARENCY;
+
+ g_dat.activeAlpha = g_plugin.getDword(SRMSGSET_ACTIVEALPHA, SRMSGDEFSET_ACTIVEALPHA);
+ g_dat.inactiveAlpha = g_plugin.getDword(SRMSGSET_INACTIVEALPHA, SRMSGDEFSET_INACTIVEALPHA);
- if (LOBYTE(LOWORD(GetVersion())) >= 5) {
- if (g_plugin.getByte(SRMSGSET_USETRANSPARENCY, SRMSGDEFSET_USETRANSPARENCY))
- g_dat.flags2 |= SMF2_USETRANSPARENCY;
- g_dat.activeAlpha = g_plugin.getDword(SRMSGSET_ACTIVEALPHA, SRMSGDEFSET_ACTIVEALPHA);
- g_dat.inactiveAlpha = g_plugin.getDword(SRMSGSET_INACTIVEALPHA, SRMSGDEFSET_INACTIVEALPHA);
- }
if (g_plugin.getByte(SRMSGSET_USEIEVIEW, SRMSGDEFSET_USEIEVIEW))
g_dat.flags |= SMF_USEIEVIEW;
diff --git a/plugins/TabSRMM/src/TSButton.cpp b/plugins/TabSRMM/src/TSButton.cpp index c131168cc2..dbb373f302 100644 --- a/plugins/TabSRMM/src/TSButton.cpp +++ b/plugins/TabSRMM/src/TSButton.cpp @@ -159,7 +159,7 @@ static void PaintWorker(TSButtonCtrl *ctl, HDC hdcPaint) dat->m_pContainer->m_cachedToolbarDC, pt.x, 1, SRCCOPY);
}
if (ctl->hThemeToolbar && ctl->bIsThemed && 1 == dat->m_pContainer->m_bTBRenderingMode) {
- if (bAero || PluginConfig.m_WinVerMajor >= 6)
+ if (bAero || IsWinVerVistaPlus())
DrawThemeBackground(ctl->hThemeToolbar, hdcMem, 8, RBStateConvert2Flat(state), &rcClient, &rcClient);
else
DrawThemeBackground(ctl->hThemeToolbar, hdcMem, TP_BUTTON, TBStateConvert2Flat(state), &rcClient, &rcClient);
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp index 9c99f398d8..b0afb70e66 100644 --- a/plugins/TabSRMM/src/chat_window.cpp +++ b/plugins/TabSRMM/src/chat_window.cpp @@ -2493,6 +2493,6 @@ void ShowRoom(TContainerData *pContainer, SESSION_INFO *si) SetForegroundWindow(pContainer->m_hwnd); } - if (PluginConfig.m_bIsWin7 && PluginConfig.m_useAeroPeek && CSkin::m_skinEnabled && !M.GetByte("forceAeroPeek", 0)) + if (IsWinVer7Plus() && PluginConfig.m_useAeroPeek && CSkin::m_skinEnabled && !M.GetByte("forceAeroPeek", 0)) CWarning::show(CWarning::WARN_AEROPEEK_SKIN, MB_ICONWARNING | MB_OK); } diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 868c5f051f..f4ecb7ac67 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -1372,7 +1372,7 @@ panel_found: BroadCastContainer(pContainer, DM_CHECKINFOTIP, wParam, lParam);
if (LOWORD(wParam == WA_INACTIVE) && (HWND)lParam != PluginConfig.g_hwndHotkeyHandler && GetParent((HWND)lParam) != hwndDlg) {
- BOOL fTransAllowed = !bSkinned || PluginConfig.m_bIsVista;
+ BOOL fTransAllowed = !bSkinned || IsWinVerVistaPlus();
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));
@@ -1390,7 +1390,7 @@ panel_found: case WM_MOUSEACTIVATE:
if (pContainer != nullptr) {
- BOOL fTransAllowed = !bSkinned || PluginConfig.m_WinVerMajor >= 6;
+ BOOL fTransAllowed = !bSkinned || IsWinVerVistaPlus();
FlashContainer(pContainer, 0, 0);
pContainer->m_dwFlashingStarted = 0;
@@ -1572,17 +1572,15 @@ panel_found: 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;
+ BOOL fTransAllowed = !bSkinned || IsWinVerVistaPlus();
- DWORD exold, ex = exold = GetWindowLongPtr(hwndDlg, GWL_EXSTYLE);
- ex = (pContainer->m_dwFlags & CNT_TRANSPARENCY && (!CSkin::m_skinEnabled || fTransAllowed)) ? ex | WS_EX_LAYERED : ex & ~(WS_EX_LAYERED);
+ DWORD exold, ex = exold = GetWindowLongPtr(hwndDlg, GWL_EXSTYLE);
+ 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->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));
- }
+ SetWindowLongPtr(hwndDlg, GWL_EXSTYLE, ex);
+ 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)
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp index 9c8e9fe395..2447b85e31 100644 --- a/plugins/TabSRMM/src/containeroptions.cpp +++ b/plugins/TabSRMM/src/containeroptions.cpp @@ -380,10 +380,10 @@ do_apply: Utils::enableDlgControl(hwndDlg, IDC_APPLY, true); DWORD dwFlagsEx = cs->dwFlagsEx;
BOOL fAllowTrans = FALSE;
- if (PluginConfig.m_WinVerMajor >= 6)
+ if (IsWinVerVistaPlus())
fAllowTrans = TRUE;
else
- fAllowTrans = (!CSkin::m_skinEnabled);
+ fAllowTrans = !CSkin::m_skinEnabled;
MY_CheckDlgButton(hwndDlg, IDC_O_HIDETITLE, dwFlags & CNT_NOTITLE);
MY_CheckDlgButton(hwndDlg, IDC_O_DONTREPORT, dwFlags & CNT_DONTREPORT);
@@ -427,12 +427,12 @@ do_apply: Utils::enableDlgControl(hwndDlg, IDC_APPLY, true); else
SendDlgItemMessage(hwndDlg, IDC_TABMODE, CB_SETCURSEL, dwFlagsEx & TCF_SBARLEFT ? 2 : 3, 0);
- if (LOBYTE(LOWORD(GetVersion())) >= 5 && fAllowTrans)
- CheckDlgButton(hwndDlg, IDC_TRANSPARENCY, dwFlags & CNT_TRANSPARENCY ? BST_CHECKED : BST_UNCHECKED);
+ if (fAllowTrans)
+ CheckDlgButton(hwndDlg, IDC_TRANSPARENCY, (dwFlags & CNT_TRANSPARENCY) ? BST_CHECKED : BST_UNCHECKED);
else
CheckDlgButton(hwndDlg, IDC_TRANSPARENCY, BST_UNCHECKED);
- Utils::enableDlgControl(hwndDlg, IDC_TRANSPARENCY, PluginConfig.m_WinVerMajor >= 5 && fAllowTrans);
+ Utils::enableDlgControl(hwndDlg, IDC_TRANSPARENCY, fAllowTrans);
bool isTrans = IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENCY) != 0;
Utils::enableDlgControl(hwndDlg, IDC_TRANSPARENCY_ACTIVE, isTrans);
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index e3eb078e24..ba5d2cedba 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -54,11 +54,6 @@ bool CGlobals::m_exAllowContinue = false; void CGlobals::reloadSystemStartup()
{
- m_WinVerMajor = WinVerMajor();
- m_WinVerMinor = WinVerMinor();
- m_bIsVista = IsWinVerVistaPlus() != 0;
- m_bIsWin7 = IsWinVer7Plus() != 0;
-
::RegisterTabCtrlClass();
CTip::registerClass();
diff --git a/plugins/TabSRMM/src/globals.h b/plugins/TabSRMM/src/globals.h index 8863eb1eee..78919e16cd 100644 --- a/plugins/TabSRMM/src/globals.h +++ b/plugins/TabSRMM/src/globals.h @@ -108,9 +108,6 @@ public: double m_DPIscaleX;
double m_DPIscaleY;
HBITMAP m_hbmMsgArea;
- BYTE m_WinVerMajor;
- BYTE m_WinVerMinor;
- bool m_bIsVista, m_bIsWin7;
HWND m_hwndClist;
int m_TabAppearance;
myTabCtrl tabConfig;
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index 2cd7af03cc..1c2e01e408 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -158,13 +158,10 @@ bool CMimAPI::getAeroState() void CMimAPI::InitAPI() { - DWORD dwVer = LOWORD(GetVersion()); - m_winVer = MAKEWORD(HIBYTE(dwVer), LOBYTE(dwVer)); - m_hUxTheme = nullptr; + m_hDwmApi = nullptr; // vista+ DWM API - m_hDwmApi = nullptr; if (IsWinVerVistaPlus()) { m_hDwmApi = Utils::loadSystemLibrary(L"\\dwmapi.dll"); if (m_hDwmApi) { diff --git a/plugins/TabSRMM/src/mim.h b/plugins/TabSRMM/src/mim.h index 52103652a5..bf599db551 100644 --- a/plugins/TabSRMM/src/mim.h +++ b/plugins/TabSRMM/src/mim.h @@ -161,7 +161,6 @@ public: __forceinline bool isAero() const { return m_isAero; }
__forceinline bool isDwmActive() const { return m_DwmActive; }
- __forceinline DWORD getWinVer() const { return m_winVer; }
// refresh Aero status.
bool getAeroState();
@@ -207,7 +206,6 @@ private: double m_dFreq;
char m_timerMsg[256];
bool m_hasFolders;
- DWORD m_winVer;
HANDLE m_hChatLogLock;
void InitAPI();
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index cf5fded890..3a9a7c40de 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -1368,8 +1368,7 @@ int CTabBaseDlg::MsgWindowDrawHandler(DRAWITEMSTRUCT *dis) if (CSkin::m_bAvatarBorderType == 1)
Rectangle(hdcDraw, rcEdge.left, rcEdge.top, rcEdge.right, rcEdge.bottom);
else if (CSkin::m_bAvatarBorderType == 2) {
- int iRad = PluginConfig.m_WinVerMajor >= 5 ? 4 : 6;
- clipRgn = CreateRoundRectRgn(rcEdge.left, rcEdge.top, rcEdge.right + 1, rcEdge.bottom + 1, iRad, iRad);
+ clipRgn = CreateRoundRectRgn(rcEdge.left, rcEdge.top, rcEdge.right + 1, rcEdge.bottom + 1, 6, 6);
SelectClipRgn(hdcDraw, clipRgn);
HBRUSH hbr = CreateSolidBrush(CSkin::m_avatarBorderClr);
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 1da41d268b..643068e4ad 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -1142,11 +1142,11 @@ public: for (int i = 0; i < CSkin::AERO_EFFECT_LAST; i++)
cmbAeroEffect.InsertString(TranslateW(CSkin::m_aeroEffects[i].tszName), -1);
cmbAeroEffect.SetCurSel(CSkin::m_aeroEffect);
- cmbAeroEffect.Enable(PluginConfig.m_bIsVista);
+ cmbAeroEffect.Enable(IsWinVerVistaPlus());
- chkUseAero.Enable(PluginConfig.m_bIsVista);
- chkUseAeroPeek.Enable(PluginConfig.m_bIsWin7);
- if (PluginConfig.m_bIsVista)
+ chkUseAero.Enable(IsWinVerVistaPlus());
+ chkUseAeroPeek.Enable(IsWinVer7Plus());
+ if (IsWinVerVistaPlus())
Utils::enableDlgControl(m_hwnd, IDC_AEROEFFECT, chkUseAero.GetState() != 0);
return true;
}
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 757f7ba8ca..c69714c5e9 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -106,7 +106,7 @@ bool CTabBaseDlg::OnInitDialog() m_pContainer->UpdateTabs();
// add this window to window list & proxy
- if (PluginConfig.m_bIsWin7 && PluginConfig.m_useAeroPeek)
+ if (IsWinVer7Plus() && PluginConfig.m_useAeroPeek)
m_pWnd = new CProxyWindow(this);
else
m_pWnd = nullptr;
@@ -696,7 +696,7 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, SendMessage(pContainer->m_hwndActive, WM_SIZE, 0, 0);
}
- if (PluginConfig.m_bIsWin7 && PluginConfig.m_useAeroPeek && CSkin::m_skinEnabled)
+ if (IsWinVer7Plus() && PluginConfig.m_useAeroPeek && CSkin::m_skinEnabled)
CWarning::show(CWarning::WARN_AEROPEEK_SKIN, MB_ICONWARNING | MB_OK);
if (ServiceExists(MS_HPP_EG_EVENT) && ServiceExists(MS_IEVIEW_EVENT) && db_get_b(0, "HistoryPlusPlus", "IEViewAPI", 0))
diff --git a/plugins/TabSRMM/src/sidebar.cpp b/plugins/TabSRMM/src/sidebar.cpp index a61aa5aaad..ade164bd21 100644 --- a/plugins/TabSRMM/src/sidebar.cpp +++ b/plugins/TabSRMM/src/sidebar.cpp @@ -998,7 +998,7 @@ void __fastcall CSideBar::m_DefaultBackgroundRenderer(const HDC hdc, const RECT if (IsThemeBackgroundPartiallyTransparent(item->m_buttonControl->hThemeToolbar, TP_BUTTON, stateId))
DrawThemeParentBackground(item->getHwnd(), hdc, rcDraw);
- if (M.isAero() || PluginConfig.m_WinVerMajor >= 6) {
+ if (M.isAero() || IsWinVerVistaPlus()) {
stateId = (fIsActiveItem ? PBS_PRESSED : PBS_HOT);
DrawThemeBackground(item->m_buttonControl->hThemeToolbar, hdc, 8, RBStateConvert2Flat(stateId), rcDraw, rcDraw);
}
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp index 8d52ffa010..8c02a96525 100644 --- a/plugins/TabSRMM/src/tabctrl.cpp +++ b/plugins/TabSRMM/src/tabctrl.cpp @@ -458,7 +458,7 @@ static void DrawThemesXpTabItem(HDC pDC, RECT *rcItem, UINT uiFlag, TabControlDa // for top row tabs, it's easy. Just draw to the provided dc (it's a mem dc already)
if (!bBottom) {
if (bBody) {
- if (PluginConfig.m_bIsVista) {
+ if (IsWinVerVistaPlus()) {
rcItem->right += 2; // hide right tab sheet shadow (only draw the actual border line)
rcItem->bottom += 1;
}
@@ -551,7 +551,7 @@ static void DrawThemesXpTabItem(HDC pDC, RECT *rcItem, UINT uiFlag, TabControlDa CImageItem tempItem(10, 10, 10, 10, hdcTemp, nullptr, IMAGE_FLAG_DIVIDED | IMAGE_FILLSOLID,
GetSysColorBrush(COLOR_3DFACE), 255, 30, 80, 50, 100);
- if (PluginConfig.m_bIsVista) // hide right tab sheet shadow (only draw the actual border line)
+ if (IsWinVerVistaPlus()) // hide right tab sheet shadow (only draw the actual border line)
rcItem->right += 2;
tempItem.Render(pDC, rcItem, true);
diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp index 88fd5abae5..68606e093f 100644 --- a/plugins/TabSRMM/src/taskbar.cpp +++ b/plugins/TabSRMM/src/taskbar.cpp @@ -181,7 +181,7 @@ void CTaskbarInteract::SetTabActive(const HWND hwndTab, const HWND hwndGroup) co */
void CTabBaseDlg::VerifyProxy()
{
- if (PluginConfig.m_bIsWin7 && PluginConfig.m_useAeroPeek) {
+ if (IsWinVer7Plus() && PluginConfig.m_useAeroPeek) {
if (nullptr == m_pWnd) {
m_pWnd = new CProxyWindow(this);
if (m_pWnd) {
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp index aa934eb986..48584e43e0 100644 --- a/plugins/TabSRMM/src/themes.cpp +++ b/plugins/TabSRMM/src/themes.cpp @@ -2042,7 +2042,7 @@ DWORD CSkin::HexStringToLong(const wchar_t *szSource) int CSkin::RenderText(HDC hdc, HANDLE hTheme, const wchar_t *szText, RECT *rc, DWORD dtFlags, const int iGlowSize, COLORREF clr, bool fForceAero)
{
- if ((PluginConfig.m_bIsVista && !CSkin::m_skinEnabled && hTheme) || fForceAero) {
+ if ((IsWinVerVistaPlus() && !CSkin::m_skinEnabled && hTheme) || fForceAero) {
DTTOPTS dto = { 0 };
dto.dwSize = sizeof(dto);
if (iGlowSize && (M.isAero() || fForceAero)) {
@@ -2327,7 +2327,7 @@ void CSkin::initAeroEffect() ::DeleteObject(m_BrushBack);
m_BrushBack = nullptr;
}
- if (PluginConfig.m_bIsVista && m_aeroEffect > AERO_EFFECT_NONE && m_aeroEffect < AERO_EFFECT_LAST) {
+ if (IsWinVerVistaPlus() && m_aeroEffect > AERO_EFFECT_NONE && m_aeroEffect < AERO_EFFECT_LAST) {
m_currentAeroEffect = m_aeroEffects[m_aeroEffect];
m_pCurrentAeroEffect = &m_currentAeroEffect;
m_glowSize = m_pCurrentAeroEffect->m_glowSize;
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index 591d200892..503aebfa5c 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -52,8 +52,7 @@ const char *CTooltipNotify::s_szModuleNameOld = "ttntfmod"; // Construction/Destruction
//////////////////////////////////////////////////////////////////////
-CTooltipNotify::CTooltipNotify() :
- m_bNt50(IsNt50())
+CTooltipNotify::CTooltipNotify()
{
if (s_pInstance != nullptr)
throw EAlreadyExists();
@@ -281,9 +280,9 @@ CTooltip *CTooltipNotify::BeginNotify(STooltipData *pTooltipData) pTooltip->set_Font(lf);
pTooltip->set_BgColor(bgColor);
pTooltip->set_TextColor(textColor);
- if (m_bNt50 && m_sOptions.bTransp)
+ if (m_sOptions.bTransp)
pTooltip->set_Translucency(m_sOptions.bAlpha);
- pTooltip->set_TransparentInput(m_bNt50 && m_sOptions.bTransp && m_sOptions.bTranspInput);
+ pTooltip->set_TransparentInput(m_sOptions.bTransp && m_sOptions.bTranspInput);
pTooltip->Validate();
RECT TooltipRect, WorkAreaRect;
@@ -491,11 +490,9 @@ void CTooltipNotify::WriteSettingsToDlg(HWND hDlg) default: CheckDlgButton(hDlg, IDC_RB_CLIST, BST_CHECKED); break;
}
- EnableWindow(GetDlgItem(hDlg, IDC_GB_TRANSP), m_bNt50);
- EnableWindow(GetDlgItem(hDlg, IDC_TRANSPARENCY), m_bNt50);
- EnableWindow(GetDlgItem(hDlg, IDC_TRANSPARENCY_SLIDER), m_sOptions.bTransp && m_bNt50);
- EnableWindow(GetDlgItem(hDlg, IDC_TRANSPERC), m_sOptions.bTransp && m_bNt50);
- EnableWindow(GetDlgItem(hDlg, IDC_TRANSP_INPUT), m_sOptions.bTransp && m_bNt50);
+ EnableWindow(GetDlgItem(hDlg, IDC_TRANSPARENCY_SLIDER), m_sOptions.bTransp);
+ EnableWindow(GetDlgItem(hDlg, IDC_TRANSPERC), m_sOptions.bTransp);
+ EnableWindow(GetDlgItem(hDlg, IDC_TRANSP_INPUT), m_sOptions.bTransp);
EnableWindow(GetDlgItem(hDlg, IDC_RB_CLIST), !m_sOptions.bTranspInput);
EnableWindow(GetDlgItem(hDlg, IDC_RB_MSGDLG), !m_sOptions.bTranspInput);
diff --git a/plugins/TooltipNotify/src/TooltipNotify.h b/plugins/TooltipNotify/src/TooltipNotify.h index 9a0e36b17d..149eacc870 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.h +++ b/plugins/TooltipNotify/src/TooltipNotify.h @@ -36,8 +36,6 @@ private: static CTooltipNotify *s_pInstance;
static const char *s_szModuleNameOld;
- const BOOL m_bNt50;
-
struct SOptions {
BYTE bFirstRun;
BYTE bOffline;
diff --git a/plugins/TooltipNotify/src/Utils.cpp b/plugins/TooltipNotify/src/Utils.cpp index 9338efebbe..229257d6a9 100644 --- a/plugins/TooltipNotify/src/Utils.cpp +++ b/plugins/TooltipNotify/src/Utils.cpp @@ -4,13 +4,6 @@ #include "stdafx.h"
-BOOL IsNt50()
-{
- WORD wOsVersion = LOWORD(GetVersion());
- BYTE bMajorVer = LOBYTE(wOsVersion);
- return (bMajorVer>=5);
-}
-
void TruncateWithDots(wchar_t* szString, size_t iNewLen)
{
size_t iOrigLen = mir_wstrlen(szString);
diff --git a/plugins/TooltipNotify/src/Utils.h b/plugins/TooltipNotify/src/Utils.h index 19afbab838..c9f8369dd3 100644 --- a/plugins/TooltipNotify/src/Utils.h +++ b/plugins/TooltipNotify/src/Utils.h @@ -4,5 +4,4 @@ #pragma once
-BOOL IsNt50();
void TruncateWithDots(wchar_t* szString, size_t iNewLen);
|