Commit e8efed92 authored by Filip Navara's avatar Filip Navara Committed by Alexandre Julliard

Don't kill non-existing timers. Use EndDialog to close the dialog.

parent e99b69db
...@@ -244,7 +244,7 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) ...@@ -244,7 +244,7 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
OnAbout(); OnAbout();
break; break;
case ID_FILE_EXIT: case ID_FILE_EXIT:
DestroyWindow(hDlg); EndDialog(hDlg, IDOK);
break; break;
} }
break; break;
...@@ -564,23 +564,12 @@ BOOL OnCreate(HWND hWnd) ...@@ -564,23 +564,12 @@ BOOL OnCreate(HWND hWnd)
TabCtrl_SetCurFocus/*Sel*/(hTabWnd, 2); TabCtrl_SetCurFocus/*Sel*/(hTabWnd, 2);
TabCtrl_SetCurFocus/*Sel*/(hTabWnd, nActivePage); TabCtrl_SetCurFocus/*Sel*/(hTabWnd, nActivePage);
if (TaskManagerSettings.UpdateSpeed == 0) if (TaskManagerSettings.UpdateSpeed == 1)
KillTimer(hWnd, 1);
else if (TaskManagerSettings.UpdateSpeed == 1)
{
KillTimer(hWnd, 1);
SetTimer(hWnd, 1, 1000, NULL); SetTimer(hWnd, 1, 1000, NULL);
}
else if (TaskManagerSettings.UpdateSpeed == 2) else if (TaskManagerSettings.UpdateSpeed == 2)
{
KillTimer(hWnd, 1);
SetTimer(hWnd, 1, 2000, NULL); SetTimer(hWnd, 1, 2000, NULL);
}
else if (TaskManagerSettings.UpdateSpeed == 4) else if (TaskManagerSettings.UpdateSpeed == 4)
{
KillTimer(hWnd, 1);
SetTimer(hWnd, 1, 4000, NULL); SetTimer(hWnd, 1, 4000, NULL);
}
/* /*
* Refresh the performance data * Refresh the performance data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment