From 136336f0e83b5f52929baad107438627eb15305d Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Tue, 21 Jun 2011 23:31:15 +0000 Subject: [PATCH] MGR: Revert Rom's manager changes of 20 June related to GUI RPC changes, for compatibility with older Clients svn path=/trunk/boinc/; revision=23763 --- checkin_notes | 11 +++++++++++ clientgui/AdvancedFrame.cpp | 4 ++-- clientgui/AsyncRPC.cpp | 2 ++ clientgui/BOINCTaskBar.cpp | 8 ++++---- clientgui/DlgItemProperties.cpp | 4 ++-- clientgui/ProjectInfoPage.cpp | 4 ++-- 6 files changed, 23 insertions(+), 10 deletions(-) diff --git a/checkin_notes b/checkin_notes index 9527681f45..635c55213d 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3701,3 +3701,14 @@ David 21 Jun 2011 user/ submit.php submit_status.php + +Charlie 21 Jun 2011 + - MGR: Revert Rom's manager changes of 20 June related to GUI RPC changes, for + compatibility with older Clients. + + clientgui/ + AdvancedFrame.cpp + AsyncRPC.cpp + BOINCTaskBar.cpp + DlgItemProperties.cpp + ProjectInfoPage.cpp diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp index 24fc41fd20..938c0ea6b3 100644 --- a/clientgui/AdvancedFrame.cpp +++ b/clientgui/AdvancedFrame.cpp @@ -476,7 +476,7 @@ bool CAdvancedFrame::CreateMenu() { _("Stop work regardless of preferences") ); - if (pDoc->state.host_info._coprocs.have_nvidia() || pDoc->state.host_info._coprocs.have_ati()) { + if (pDoc->state.have_cuda || pDoc->state.have_ati) { #ifndef __WXGTK__ menuActivity->AppendSeparator(); @@ -1824,7 +1824,7 @@ void CAdvancedFrame::OnFrameRender(wxTimerEvent& WXUNUSED(event)) { CC_STATUS status; if ((pDoc->IsConnected()) && (0 == pDoc->GetCoreClientStatus(status))) { UpdateActivityModeControls(status); - if (pDoc->state.host_info._coprocs.have_nvidia() || pDoc->state.host_info._coprocs.have_ati()) { + if (pDoc->state.have_cuda || pDoc->state.have_ati) { UpdateGPUModeControls(status); } UpdateNetworkModeControls(status); diff --git a/clientgui/AsyncRPC.cpp b/clientgui/AsyncRPC.cpp index c2114fbbe0..655b42089f 100644 --- a/clientgui/AsyncRPC.cpp +++ b/clientgui/AsyncRPC.cpp @@ -1012,6 +1012,8 @@ void CMainDocument::HandleCompletedRPC() { exchangeBuf->global_prefs = arg1->global_prefs; exchangeBuf->version_info = arg1->version_info; exchangeBuf->executing_as_daemon = arg1->executing_as_daemon; + exchangeBuf->have_cuda = arg1->have_cuda; + exchangeBuf->have_ati = arg1->have_ati; } break; case RPC_GET_RESULTS: diff --git a/clientgui/BOINCTaskBar.cpp b/clientgui/BOINCTaskBar.cpp index b9f8628984..208bdb9c8c 100644 --- a/clientgui/BOINCTaskBar.cpp +++ b/clientgui/BOINCTaskBar.cpp @@ -496,7 +496,7 @@ wxMenu *CTaskBarIcon::BuildContextMenu() { pMenu->AppendSeparator(); pMenu->AppendCheckItem(ID_TB_SUSPEND, _("Snooze"), wxEmptyString); - if (pDoc->state.host_info._coprocs.have_nvidia() || pDoc->state.host_info._coprocs.have_ati()) { + if (pDoc->state.have_cuda || pDoc->state.have_ati) { pMenu->AppendCheckItem(ID_TB_SUSPEND_GPU, _("Snooze GPU"), wxEmptyString); } @@ -593,7 +593,7 @@ void CTaskBarIcon::AdjustMenuItems(wxMenu* pMenu) { pMenu->Enable(ID_TB_SUSPEND, true); } } - if (pDoc->state.host_info._coprocs.have_nvidia() || pDoc->state.host_info._coprocs.have_ati()) { + if (pDoc->state.have_cuda || pDoc->state.have_ati) { pMenu->Check(ID_TB_SUSPEND_GPU, false); pMenu->Enable(ID_TB_SUSPEND_GPU, false); } @@ -603,7 +603,7 @@ void CTaskBarIcon::AdjustMenuItems(wxMenu* pMenu) { if (!is_dialog_detected) { pMenu->Enable(ID_TB_SUSPEND, true); } - if (pDoc->state.host_info._coprocs.have_nvidia() || pDoc->state.host_info._coprocs.have_ati()) { + if (pDoc->state.have_cuda || pDoc->state.have_ati) { switch (status.gpu_mode) { case RUN_MODE_NEVER: switch (status.gpu_mode_perm) { @@ -684,7 +684,7 @@ void CTaskBarIcon::UpdateTaskbarStatus() { } strMessage += wxT(".\n"); - if (!comp_suspended && (pDoc->state.host_info._coprocs.have_nvidia() || pDoc->state.host_info._coprocs.have_ati())) { + if (!comp_suspended && (pDoc->state.have_cuda || pDoc->state.have_ati)) { switch(status.gpu_suspend_reason) { case 0: strMessage += _("GPU computing is enabled"); diff --git a/clientgui/DlgItemProperties.cpp b/clientgui/DlgItemProperties.cpp index 1217d7f0e1..e52f8d9fa0 100644 --- a/clientgui/DlgItemProperties.cpp +++ b/clientgui/DlgItemProperties.cpp @@ -266,7 +266,7 @@ void CDlgItemProperties::renderInfos(PROJECT* project_in) { if (x<0) x = 0; addProperty(_("CPU work fetch deferred for"), FormatTime(x)); addProperty(_("CPU work fetch deferral interval"), FormatTime(project->cpu_backoff_interval)); - if (pDoc->state.host_info._coprocs.have_nvidia()) { + if (pDoc->state.have_cuda) { if (project->no_cuda_pref) { addProperty(_("Project preference"), _("Don't fetch NVIDIA GPU tasks")); } @@ -277,7 +277,7 @@ void CDlgItemProperties::renderInfos(PROJECT* project_in) { addProperty(_("NVIDIA GPU work fetch deferred for"), FormatTime(x)); addProperty(_("NVIDIA GPU work fetch deferral interval"), FormatTime(project->cuda_backoff_interval)); } - if (pDoc->state.host_info._coprocs.have_ati()) { + if (pDoc->state.have_ati) { if (project->no_ati_pref) { addProperty(_("Project preference"), _("Don't fetch ATI GPU tasks")); } diff --git a/clientgui/ProjectInfoPage.cpp b/clientgui/ProjectInfoPage.cpp index 163ebab43e..bcdd592690 100644 --- a/clientgui/ProjectInfoPage.cpp +++ b/clientgui/ProjectInfoPage.cpp @@ -710,11 +710,11 @@ void CProjectInfoPage::OnPageChanged( wxWizardExEvent& event ) { } if (pProjectInfo->m_bProjectSupportsNvidiaGPU) { - if (!pDoc->state.host_info._coprocs.have_nvidia()) continue; + if (!pDoc->state.have_cuda) continue; } if (pProjectInfo->m_bProjectSupportsATIGPU) { - if (!pDoc->state.host_info._coprocs.have_ati()) continue; + if (!pDoc->state.have_ati) continue; } if (pProjectInfo->m_bProjectSupportsMulticore) {