From 28fc427cbf4e5317ec006f94bd165c9b201b2cbb Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 8 Oct 2004 20:00:42 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=4306 --- checkin_notes | 10 ++++++++++ client/win/wingui_mainwindow.cpp | 8 ++++---- lib/prefs.C | 7 +++++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/checkin_notes b/checkin_notes index b2d200694e..e19007c4d3 100755 --- a/checkin_notes +++ b/checkin_notes @@ -18185,3 +18185,13 @@ David 8 Oct 2004 html/user/ prefs_remove.php + +David 8 Oct 2004 + - GLOBAL_PREFS::parse(): don't erase source project/scheduler info + when parse venue-specific prefs + - compile fix for windows + + client/win/ + wingui_mainwindow.cpp + lib/ + prefs.C diff --git a/client/win/wingui_mainwindow.cpp b/client/win/wingui_mainwindow.cpp index 67f836e0dd..b5d1392af2 100755 --- a/client/win/wingui_mainwindow.cpp +++ b/client/win/wingui_mainwindow.cpp @@ -417,7 +417,7 @@ void CMainWindow::UpdateGUI(CLIENT_STATE* pcs) if (at) { cur_cpu = at->current_cpu_time; } else { - if(re->state < RESULT_COMPUTE_DONE) cur_cpu = 0; + if(re->state < RESULT_COMPUTE_ERROR) cur_cpu = 0; else cur_cpu = re->final_cpu_time; } int cpuhour = (int)(cur_cpu / (60 * 60)); @@ -432,7 +432,7 @@ void CMainWindow::UpdateGUI(CLIENT_STATE* pcs) // progress if(!at) { - if(re->state < RESULT_COMPUTE_DONE) + if(re->state < RESULT_COMPUTE_ERROR) m_ResultListCtrl.SetItemProgress(i, 4, 0); else m_ResultListCtrl.SetItemProgress(i, 4, 100); @@ -443,7 +443,7 @@ void CMainWindow::UpdateGUI(CLIENT_STATE* pcs) // to completion double tocomp; if(!at) { - if(re->state < RESULT_COMPUTE_DONE) + if(re->state < RESULT_COMPUTE_ERROR) tocomp = gstate.estimate_cpu_time(*re->wup); else tocomp = 0; @@ -500,7 +500,7 @@ void CMainWindow::UpdateGUI(CLIENT_STATE* pcs) } else strBuf.Format(g_szMiscItems[2]); break; - case RESULT_COMPUTE_DONE: + case RESULT_COMPUTE_ERROR: strBuf.Format(g_szMiscItems[3]); break; break; case RESULT_FILES_UPLOADING: diff --git a/lib/prefs.C b/lib/prefs.C index 9696ff052b..7ff5b6557e 100644 --- a/lib/prefs.C +++ b/lib/prefs.C @@ -67,8 +67,9 @@ void GLOBAL_PREFS::init() { //max_memory_mbytes = 128; proc_priority = 1; cpu_affinity = -1; - strcpy(source_project, ""); - strcpy(source_scheduler, ""); + + // don't initialize source_project, source_scheduler here + // since they are outside of elements }; GLOBAL_PREFS::GLOBAL_PREFS() { @@ -97,6 +98,8 @@ int GLOBAL_PREFS::parse(FILE* in, char* host_venue, bool& found_venue) { run_minimized = false; run_on_startup = false; hangup_if_dialed = false; + strcpy(source_project, ""); + strcpy(source_scheduler, ""); found_venue = false; while (fgets(buf, 256, in)) {