no message

svn path=/trunk/boinc/; revision=1194
This commit is contained in:
Dan Werthimer 2003-05-14 18:18:33 +00:00
parent b6c5c35b02
commit 9988164edc
3 changed files with 25 additions and 16 deletions

View File

@ -50,6 +50,9 @@ bool CLIENT_STATE::start_new_file_xfer() {
void CLIENT_STATE::trunc_stderr_stdout() {
double f_size;
fflush(stdout);
fflush(stderr);
// If the stderr.txt or stdout.txt files are too big, reset them
// TODO: should we tell the user we're resetting these?
file_size(STDERR_FILE_NAME, f_size);

View File

@ -1578,6 +1578,23 @@ LRESULT CMainWindow::OnStatusIcon(WPARAM wParam, LPARAM lParam)
return TRUE;
}
//////////
// CMainWindow::CheckIdle
// arguments: void
// returns: void
// function: check user's idle time for suspension of apps
void CMainWindow::CheckIdle() {
if (gstate.global_prefs.idle_time_to_run > 0) {
if (GetUserIdleTime() > 1000 * gstate.global_prefs.idle_time_to_run) {
gstate.user_idle = true;
} else {
gstate.user_idle = false;
}
} else {
gstate.user_idle = true;
}
}
//////////
// CMainWindow::OnTimer
// arguments: uEventID: timer's id
@ -1592,26 +1609,13 @@ void CMainWindow::OnTimer(UINT uEventID)
// update state and gui
while(gstate.do_something());
NetCheck(); // need to check if network connection can be terminated
fflush(stdout);
fflush(stderr);
NetCheck(); // check if network connection can be terminated
if(!IsSuspended()) {
// check user's idle time for suspension of apps
if (gstate.global_prefs.idle_time_to_run > 0) {
if (GetUserIdleTime() > 1000 * gstate.global_prefs.idle_time_to_run) {
gstate.user_idle = true;
} else {
gstate.user_idle = false;
}
} else {
gstate.user_idle = true;
}
CheckIdle();
UpdateGUI(&gstate);
gstate.trunc_stderr_stdout();
}
gstate.trunc_stderr_stdout();
// Start the timer again
m_nGuiTimerID = SetTimer(GUI_TIMER, GUI_WAIT, (TIMERPROC) NULL);
}
@ -1626,4 +1630,5 @@ void delete_curtain() {
}
void project_add_failed(PROJECT* project) {
// TODO: To be filled in
}

View File

@ -114,6 +114,7 @@ protected:
UINT m_uEndSSMsg; // ID of end screensaver request message
COLORREF GetPieColor(int);
void CheckIdle();
void ShowTab(int);
void SetStatusIcon(DWORD);
void SaveListControls();