diff --git a/checkin_notes b/checkin_notes index f1e6779456..fa44b9bb23 100644 --- a/checkin_notes +++ b/checkin_notes @@ -912,9 +912,15 @@ Charlie Jan 29 2008 - SCR: When running V5 GFX applications as a service / daemon, display appropriate error message instead of trying to display graphics. - API: Add executing_as_daemon bool to get_state rpc. + - MGR: Disable Show Grapics button for V5 GFX applications when BOINC + is running as a service / daemon. client/ cs_statefile.C + clientgui/ + MainDocument.h + ViewWork.cpp + ViewWorkGrid.cpp clientscr/ boinc_ss.rc mac_saver_module.cpp,h diff --git a/clientgui/MainDocument.h b/clientgui/MainDocument.h index 4fe365bac5..66da33c00d 100644 --- a/clientgui/MainDocument.h +++ b/clientgui/MainDocument.h @@ -215,6 +215,7 @@ public: std::string& strProjectURL, std::string& strName ); + CC_STATE* GetState() { return &state; }; // diff --git a/clientgui/ViewWork.cpp b/clientgui/ViewWork.cpp index 958e46702a..2b3b55f791 100644 --- a/clientgui/ViewWork.cpp +++ b/clientgui/ViewWork.cpp @@ -482,7 +482,7 @@ void CViewWork::UpdateSelection() { RESULT* result = NULL; PROJECT* project = NULL; CMainDocument* pDoc = wxGetApp().GetDocument(); - + wxASSERT(NULL != pDoc); wxASSERT(wxDynamicCast(pDoc, CMainDocument)); wxASSERT(NULL != m_pTaskPane); @@ -510,7 +510,9 @@ void CViewWork::UpdateSelection() { ); } - if (result->supports_graphics || !result->graphics_exec_path.empty()) { + if ((result->supports_graphics && (! pDoc->GetState()->executing_as_daemon)) + || !result->graphics_exec_path.empty() + ) { m_pTaskPane->EnableTask(pGroup->m_Tasks[BTN_GRAPHICS]); } else { m_pTaskPane->DisableTask(pGroup->m_Tasks[BTN_GRAPHICS]); diff --git a/clientgui/ViewWorkGrid.cpp b/clientgui/ViewWorkGrid.cpp index 2babffa8c8..24ff77a846 100644 --- a/clientgui/ViewWorkGrid.cpp +++ b/clientgui/ViewWorkGrid.cpp @@ -389,8 +389,10 @@ void CViewWorkGrid::UpdateSelection() { _("Suspend work for this task.") ); } - if (result->supports_graphics || !result->graphics_exec_path.empty()) { - m_pTaskPane->EnableTask(pGroup->m_Tasks[BTN_GRAPHICS]); + if ((result->supports_graphics && (! pDoc->GetState()->executing_as_daemon)) + || !result->graphics_exec_path.empty() + ) { + m_pTaskPane->EnableTask(pGroup->m_Tasks[BTN_GRAPHICS]); } else { m_pTaskPane->DisableTask(pGroup->m_Tasks[BTN_GRAPHICS]); }