From 68d85cc7f8004c7d08584336ba24b18bf908ff9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Sat, 21 Feb 2015 14:58:27 +0100 Subject: [PATCH] taskmgr: Remove dead code. --- programs/taskmgr/taskmgr.c | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/programs/taskmgr/taskmgr.c b/programs/taskmgr/taskmgr.c index b876cbf957b..80dc81ca629 100644 --- a/programs/taskmgr/taskmgr.c +++ b/programs/taskmgr/taskmgr.c @@ -184,26 +184,13 @@ static BOOL OnCreate(HWND hWnd) GetClientRect(hWnd, &rc); nOldWidth = rc.right; nOldHeight = rc.bottom; - /* nOldStartX = rc.left; */ - /*nOldStartY = rc.top; */ - -#define PAGE_OFFSET_LEFT 17 -#define PAGE_OFFSET_TOP 72 -#define PAGE_OFFSET_WIDTH (PAGE_OFFSET_LEFT*2) -#define PAGE_OFFSET_HEIGHT (PAGE_OFFSET_TOP+32) if ((TaskManagerSettings.Left != 0) || (TaskManagerSettings.Top != 0) || (TaskManagerSettings.Right != 0) || (TaskManagerSettings.Bottom != 0)) - { MoveWindow(hWnd, TaskManagerSettings.Left, TaskManagerSettings.Top, TaskManagerSettings.Right - TaskManagerSettings.Left, TaskManagerSettings.Bottom - TaskManagerSettings.Top, TRUE); -#ifdef __GNUC__TEST__ - MoveWindow(hApplicationPage, TaskManagerSettings.Left + PAGE_OFFSET_LEFT, TaskManagerSettings.Top + PAGE_OFFSET_TOP, TaskManagerSettings.Right - TaskManagerSettings.Left - PAGE_OFFSET_WIDTH, TaskManagerSettings.Bottom - TaskManagerSettings.Top - PAGE_OFFSET_HEIGHT, FALSE); - MoveWindow(hProcessPage, TaskManagerSettings.Left + PAGE_OFFSET_LEFT, TaskManagerSettings.Top + PAGE_OFFSET_TOP, TaskManagerSettings.Right - TaskManagerSettings.Left - PAGE_OFFSET_WIDTH, TaskManagerSettings.Bottom - TaskManagerSettings.Top - PAGE_OFFSET_HEIGHT, FALSE); - MoveWindow(hPerformancePage, TaskManagerSettings.Left + PAGE_OFFSET_LEFT, TaskManagerSettings.Top + PAGE_OFFSET_TOP, TaskManagerSettings.Right - TaskManagerSettings.Left - PAGE_OFFSET_WIDTH, TaskManagerSettings.Bottom - TaskManagerSettings.Top - PAGE_OFFSET_HEIGHT, FALSE); -#endif - } + if (TaskManagerSettings.Maximized) ShowWindow(hWnd, SW_MAXIMIZE); @@ -297,19 +284,6 @@ static BOOL OnCreate(HWND hWnd) return TRUE; } -/* OnMove() - * This function handles all the moving events for the application - * It moves every child window that needs moving - */ -static void OnMove( UINT nType, int cx, int cy ) -{ -#ifdef __GNUC__TEST__ - MoveWindow(hApplicationPage, TaskManagerSettings.Left + PAGE_OFFSET_LEFT, TaskManagerSettings.Top + PAGE_OFFSET_TOP, TaskManagerSettings.Right - TaskManagerSettings.Left - PAGE_OFFSET_WIDTH, TaskManagerSettings.Bottom - TaskManagerSettings.Top - PAGE_OFFSET_HEIGHT, FALSE); - MoveWindow(hProcessPage, TaskManagerSettings.Left + PAGE_OFFSET_LEFT, TaskManagerSettings.Top + PAGE_OFFSET_TOP, TaskManagerSettings.Right - TaskManagerSettings.Left - PAGE_OFFSET_WIDTH, TaskManagerSettings.Bottom - TaskManagerSettings.Top - PAGE_OFFSET_HEIGHT, FALSE); - MoveWindow(hPerformancePage, TaskManagerSettings.Left + PAGE_OFFSET_LEFT, TaskManagerSettings.Top + PAGE_OFFSET_TOP, TaskManagerSettings.Right - TaskManagerSettings.Left - PAGE_OFFSET_WIDTH, TaskManagerSettings.Bottom - TaskManagerSettings.Top - PAGE_OFFSET_HEIGHT, FALSE); -#endif -} - /* OnSize() * This function handles all the sizing events for the application * It re-sizes every window, and child window that needs re-sizing @@ -1011,11 +985,6 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) OnSize(wParam, LOWORD(lParam), HIWORD(lParam)); break; - case WM_MOVE: - /* Handle the window moving in its own function */ - OnMove(wParam, LOWORD(lParam), HIWORD(lParam)); - break; - case WM_DESTROY: ShowWindow(hDlg, SW_HIDE); TrayIcon_ShellRemoveTrayIcon();