diff --git a/checkin_notes b/checkin_notes index 2678819ae5..0b3e5eaafe 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3913,3 +3913,15 @@ David May 12 2008 cs_cmdline.C log_flags.C main.C + +David May 13 2008 + - Added element to get_disk_usage GUI RPC + + client/ + gui_rpc_server_ops.C + hostinfo_win.C + clientgui/ + ViewResources.cpp + lib/ + gui_rpc_client.h + gui_rpc_client_ops.C diff --git a/client/gui_rpc_server_ops.C b/client/gui_rpc_server_ops.C index 764d976253..76919ba510 100644 --- a/client/gui_rpc_server_ops.C +++ b/client/gui_rpc_server_ops.C @@ -122,10 +122,10 @@ static void handle_get_project_status(MIOFILE& fout) { static void handle_get_disk_usage(MIOFILE& fout) { unsigned int i; - double size, d_total, d_free, d_boinc; + double size, d_total, d_free, d_boinc, d_allowed; fout.printf("\n"); - get_filesystem_info(d_total, d_free); + get_filesystem_info(gstate.host_info.d_total, gstate.host_info.d_free); dir_size(".", d_boinc, false); dir_size("locale", size, false); d_boinc += size; @@ -144,11 +144,13 @@ static void handle_get_disk_usage(MIOFILE& fout) { if (! err) d_boinc += manager_size; } #endif + d_allowed = gstate.allowed_disk_usage(); fout.printf( "%f\n" "%f\n" - "%f\n", - d_total, d_free, d_boinc + "%f\n" + "%f\n", + d_total, d_free, d_boinc, d_allowed ); for (i=0; i>16, (c>>8)&0xff, c&0xff) -CViewResources::CViewResources(wxNotebook* pNotebook) : +CViewResources::CViewResources(wxNotebook* pNotebook) : CBOINCBaseView(pNotebook) { m_BOINCwasEmpty=false; @@ -73,11 +73,11 @@ CViewResources::CViewResources(wxNotebook* pNotebook) : m_pieCtrlBOINC->SetLabel(_("disk usage by BOINC projects")); //init the flexGrid itemGridSizer->Add(m_pieCtrlTotal,1,wxGROW|wxALL,1); - itemGridSizer->Add(m_pieCtrlBOINC,1, wxGROW|wxALL,1); + itemGridSizer->Add(m_pieCtrlBOINC,1, wxGROW|wxALL,1); SetSizer(itemGridSizer); - Layout(); + Layout(); UpdateSelection(); } @@ -169,18 +169,17 @@ void CViewResources::OnListRender( wxTimerEvent& WXUNUSED(event) ) { wxASSERT(pDoc); wxASSERT(wxDynamicCast(pDoc, CMainDocument)); - + //get data for BOINC projects disk usage pDoc->CachedDiskUsageUpdate(); pDoc->CachedStateUpdate(); bool refreshBOINC=false; if (pDoc->disk_usage.projects.size()>0) { m_BOINCwasEmpty=false; - //check for changes worth a refresh + //check for changes worth a refresh if(pDoc->disk_usage.projects.size() != m_pieCtrlBOINC->m_Series.size()) { refreshBOINC=true; - } - else { + } else { for (i=0; idisk_usage.projects.size(); i++) { wxString oldValue; wxString newValue; @@ -196,9 +195,9 @@ void CViewResources::OnListRender( wxTimerEvent& WXUNUSED(event) ) { if(refreshBOINC) { m_pieCtrlBOINC->m_Series.Clear(); for (i=0; idisk_usage.projects.size(); i++) { - //update data for boinc projects pie chart + //update data for boinc projects pie chart PROJECT* project = pDoc->DiskUsageProject(i); - wxString projectname; + wxString projectname; FormatProjectName(project, projectname); FormatDiskSpace(project->disk_usage, diskspace); double usage = project->disk_usage; @@ -222,7 +221,7 @@ void CViewResources::OnListRender( wxTimerEvent& WXUNUSED(event) ) { part.SetLabel(_("not attached to any BOINC project - 0 bytes")); part.SetValue(boinctotal); part.SetColour(wxColour(0,0,0)); - m_pieCtrlBOINC->m_Series.Add(part); + m_pieCtrlBOINC->m_Series.Add(part); m_pieCtrlBOINC->Refresh(); m_BOINCwasEmpty=true; refreshBOINC=true; @@ -239,31 +238,33 @@ void CViewResources::OnListRender( wxTimerEvent& WXUNUSED(event) ) { if(m_pieCtrlTotal->m_Series.size()>0) { wxString oldFree; wxString newFree; - FormatDiskSpace(free,newFree); - FormatDiskSpace(m_pieCtrlTotal->m_Series.Item(0).GetValue(),oldFree); + FormatDiskSpace(free, newFree); + FormatDiskSpace(m_pieCtrlTotal->m_Series.Item(0).GetValue(), oldFree); if(oldFree.Cmp(newFree)!=0) { - refreshTotal=true; + refreshTotal=true; } - } - else { + } else { refreshTotal=true; - } + } if(refreshBOINC || refreshTotal) { m_pieCtrlTotal->m_Series.Clear(); - wxPiePart part; + wxPiePart part; + //free disk space - FormatDiskSpace(free,diskspace); + FormatDiskSpace(free,diskspace); part.SetLabel(_("free disk space - ") + diskspace); part.SetValue(free); part.SetColour(wxColour(238,238,238)); m_pieCtrlTotal->m_Series.Add(part); + //used by boinc projects boinctotal += pDoc->disk_usage.d_boinc; - FormatDiskSpace(boinctotal,diskspace); + FormatDiskSpace(boinctotal,diskspace); part.SetLabel(_("used by BOINC - ") + diskspace); part.SetValue(boinctotal); part.SetColour(wxColour(0,0,0)); m_pieCtrlTotal->m_Series.Add(part); + //used by others FormatDiskSpace(total-boinctotal-free,diskspace); part.SetLabel(_("used by other programs - ") + diskspace); diff --git a/doc/help.php b/doc/help.php index 592a5c89ec..f5bbec0af2 100644 --- a/doc/help.php +++ b/doc/help.php @@ -4,19 +4,9 @@ require_once("spoken_languages.php"); require_once("help_db.php"); require_once("../html/inc/translation.inc"); -page_head(tr(HELP_TITLE)); +page_head("Live help via Internet phone or email"); echo " -

".tr(HELP_HEADING2)."

-

-

-

".tr(HELP_HEADING1)."

".sprintf(tr(HELP_P1_1), "

  • ", "
  • ", "
  • ", "
  • ")."
@@ -35,11 +25,8 @@ sort($langs); $n = 0; foreach ($langs as $lang) { $lang_enc = urlencode($lang); - if (!$n) { - } else if (!($n%5)) { + if ($n) { echo "
"; - } else { - echo " | "; } $n++; echo "$lang"; diff --git a/doc/index.php b/doc/index.php index 4293e80625..30ac1d402a 100644 --- a/doc/index.php +++ b/doc/index.php @@ -88,8 +88,8 @@ function show_participate() { ".tr(HOME_HEADING1)."
".tr(HOME_DOWNLOAD)." + · Help · Documentation - · Web sites diff --git a/doc/projects.php b/doc/projects.php index d6dfda5062..b9e74cd939 100644 --- a/doc/projects.php +++ b/doc/projects.php @@ -26,7 +26,7 @@ See:
  • A complete list of projects.
  • - + A list of scientific publications of projects. The following projects are known to us; diff --git a/lib/gui_rpc_client.h b/lib/gui_rpc_client.h index 5e4f2bbf3c..7daf239f00 100644 --- a/lib/gui_rpc_client.h +++ b/lib/gui_rpc_client.h @@ -356,6 +356,7 @@ struct DISK_USAGE { double d_total; double d_free; double d_boinc; // amount used by BOINC itself, not projects + double d_allowed; // amount BOINC is allowed to use, total DISK_USAGE(){clear();} ~DISK_USAGE(); diff --git a/lib/gui_rpc_client_ops.C b/lib/gui_rpc_client_ops.C index ba7aa15305..a29236ff24 100644 --- a/lib/gui_rpc_client_ops.C +++ b/lib/gui_rpc_client_ops.C @@ -751,6 +751,7 @@ void DISK_USAGE::clear() { d_free = 0; d_total = 0; d_boinc = 0; + d_allowed = 0; } RESULTS::~RESULTS() { @@ -1386,6 +1387,7 @@ int RPC_CLIENT::get_disk_usage(DISK_USAGE& du) { if (parse_double(buf, "", du.d_total)) continue; if (parse_double(buf, "", du.d_free)) continue; if (parse_double(buf, "", du.d_boinc)) continue; + if (parse_double(buf, "", du.d_allowed)) continue; } } return retval;