From 055d4460e17344248c7364afc5d19deeda39d644 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 1 Jan 2014 12:32:05 +0000 Subject: copyright update for year 2014 git-svn-id: http://svn.miranda-ng.org/main/trunk@7438 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_toolbar.cpp | 37 +++++++++++++++-------------- 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'plugins/Clist_modern/src/modern_toolbar.cpp') diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp index 0968afe4b6..8541674d50 100644 --- a/plugins/Clist_modern/src/modern_toolbar.cpp +++ b/plugins/Clist_modern/src/modern_toolbar.cpp @@ -1,11 +1,12 @@ /* -Miranda IM: the free IM client for Microsoft* Windows* - +Miranda NG: the free IM client for Microsoft* Windows* +Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org), +Copyright (c) 2000-08 Miranda ICQ/IM project, Copyright 2007 Artem Shpynov -Copyright 2000-2008 Miranda ICQ/IM project, -all portions of this codebase are copyrighted to the people + +all portions of this codebase are copyrighted to the people listed in contributors.txt. This program is free software; you can redistribute it and/or @@ -37,7 +38,7 @@ struct BOOL bVisByDefault; HANDLE hButton; } -static BTNS[] = +static BTNS[] = { { "MainMenu", LPGEN("Main menu"), "CList/ShowMainMenu", LPGEN("Main menu"), NULL, 100 , IDI_RESETVIEW, IDI_RESETVIEW, TRUE }, { "StatusMenu", LPGEN("Status menu"), "CList/ShowStatusMenu", LPGEN("Status menu"), NULL, 105 , IDI_RESETVIEW, IDI_RESETVIEW, TRUE }, @@ -107,7 +108,7 @@ struct HBITMAP mtb_hBmpBackground; COLORREF mtb_bkColour; WORD mtb_backgroundBmpUse; - BOOL mtb_useWinColors; + BOOL mtb_useWinColors; } static tbdat = { NULL, CLCDEFAULT_BKCOLOUR, CLCDEFAULT_BKBMPUSE, CLCDEFAULT_USEWINDOWSCOLOURS }; @@ -129,18 +130,18 @@ static int ehhToolBarSettingsChanged(WPARAM wParam, LPARAM lParam) if (!mir_strcmp(cws->szSetting,"UseSound")) SetButtonPressed(7, cws->value.bVal); } - + return 0; } static BOOL sttDrawToolBarBackground(HWND hwnd, HDC hdc, RECT *rect, ModernToolbarCtrl* pMTBInfo) { BOOL bFloat = (GetParent(hwnd)!=pcli->hwndContactList); - if (g_CluiData.fDisableSkinEngine || !g_CluiData.fLayered || bFloat) { + if (g_CluiData.fDisableSkinEngine || !g_CluiData.fLayered || bFloat) { HBRUSH hbr; RECT rc; - if (rect) + if (rect) rc=*rect; else GetClientRect(hwnd,&rc); @@ -153,7 +154,7 @@ static BOOL sttDrawToolBarBackground(HWND hwnd, HDC hdc, RECT *rect, ModernToolb FillRect(hdc, &rc, hbr); } } - else if (!tbdat.mtb_hBmpBackground && !tbdat.mtb_useWinColors) { + else if (!tbdat.mtb_hBmpBackground && !tbdat.mtb_useWinColors) { hbr = CreateSolidBrush(tbdat.mtb_bkColour); FillRect(hdc, &rc, hbr); DeleteObject(hbr); @@ -171,7 +172,7 @@ static void sttDrawNonLayeredSkinedBar(HWND hwnd, HDC hdc) rc.bottom++; HDC hdc2 = CreateCompatibleDC(hdc); HBITMAP hbmp = ske_CreateDIB32(rc.right, rc.bottom); - HBITMAP hbmpo = (HBITMAP)SelectObject(hdc2, hbmp); + HBITMAP hbmpo = (HBITMAP)SelectObject(hdc2, hbmp); if (GetParent(hwnd) != pcli->hwndContactList) { HBRUSH br = GetSysColorBrush(COLOR_3DFACE); FillRect(hdc2, &rc, br); @@ -185,7 +186,7 @@ static void sttDrawNonLayeredSkinedBar(HWND hwnd, HDC hdc) DeleteDC(hdc2); SelectObject(hdc, (HFONT)GetStockObject(DEFAULT_GUI_FONT)); - ValidateRect(hwnd, NULL); + ValidateRect(hwnd, NULL); } static LRESULT CALLBACK toolbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) @@ -196,7 +197,7 @@ static LRESULT CALLBACK toolbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA case WM_ERASEBKGND: return (g_CluiData.fDisableSkinEngine) ? sttDrawToolBarBackground(hwnd, (HDC)wParam, NULL, pMTBInfo) : 0; - case WM_NCPAINT: + case WM_NCPAINT: case WM_PAINT: { PAINTSTRUCT ps; @@ -206,7 +207,7 @@ static LRESULT CALLBACK toolbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA if ((!g_CluiData.fLayered || bFloat) && !g_CluiData.fDisableSkinEngine) sttDrawNonLayeredSkinedBar(hwnd, ps.hdc); else - sttDrawToolBarBackground(hwnd, ps.hdc, &ps.rcPaint, pMTBInfo); + sttDrawToolBarBackground(hwnd, ps.hdc, &ps.rcPaint, pMTBInfo); EndPaint(hwnd,&ps); } } @@ -222,7 +223,7 @@ static LRESULT CALLBACK toolbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA RECT MyRect={0}; HDC hDC=(HDC)wParam; GetWindowRect(hwnd,&MyRect); - + RECT rcClient; GetClientRect(hwnd, &rcClient); SkinDrawGlyph(hDC, &rcClient, &rcClient, "Bar,ID=ToolBar,Part=Background"); @@ -235,7 +236,7 @@ static LRESULT CALLBACK toolbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA Offset.x = childRect.left - MyRect.left; Offset.y = childRect.top - MyRect.top; SendMessage(mtbi->hWindow, BUTTONDRAWINPARENT, (WPARAM)hDC, (LPARAM)&Offset); - } + } } return 0; @@ -293,7 +294,7 @@ static void CopySettings(const char* to, const char* from, int defValue) void CustomizeButton(HANDLE ttbid, HWND hWnd, LPARAM lParam); static int Toolbar_ModuleReloaded(WPARAM wParam, LPARAM lParam) -{ +{ PLUGININFOEX *pInfo = (PLUGININFOEX*)wParam; if ( !_stricmp(pInfo->shortName, "TopToolBar")) TopToolbar_SetCustomProc(CustomizeButton, 0); @@ -304,7 +305,7 @@ static int Toolbar_ModuleReloaded(WPARAM wParam, LPARAM lParam) static int Toolbar_ModulesLoaded(WPARAM, LPARAM) { CallService(MS_BACKGROUNDCONFIG_REGISTER, (WPARAM)(LPGEN("ToolBar Background")"/ToolBar"),0); - + HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ehhToolBarSettingsChanged); TopToolbar_SetCustomProc(CustomizeButton, 0); -- cgit v1.2.3