GUI: Disable Show Graphics button if any selected task is suspended for any reason

svn path=/trunk/boinc/; revision=15024
This commit is contained in:
Charlie Fenton 2008-04-07 09:31:15 +00:00
parent e949c3cd41
commit 62722370a8
3 changed files with 26 additions and 2 deletions

View File

@ -3126,8 +3126,13 @@ David April 5 2008
procinfo_unix.C
Charlie April 7 2008
GUI: Disable Show Graphics button if any selected task is suspended for
any reason.
Mac: Fix new backtrace code for x86_64 Client and project applications.
clientgui/
ViewWork.cpp
ViewWorkGrid.cpp
lib/
mac/
mac_backtrace.C

View File

@ -481,6 +481,7 @@ void CViewWork::UpdateSelection() {
CTaskItemGroup* pGroup = NULL;
RESULT* result = NULL;
PROJECT* project = NULL;
CC_STATUS status;
CMainDocument* pDoc = wxGetApp().GetDocument();
wxASSERT(NULL != pDoc);
@ -518,6 +519,15 @@ void CViewWork::UpdateSelection() {
m_pTaskPane->DisableTask(pGroup->m_Tasks[BTN_GRAPHICS]);
}
pDoc->GetCoreClientStatus(status);
if (status.task_suspend_reason & ~(SUSPEND_REASON_CPU_USAGE_LIMIT)) {
m_pTaskPane->DisableTask(pGroup->m_Tasks[BTN_GRAPHICS]);
}
if (result->suspended_via_gui || result->project_suspended_via_gui) {
m_pTaskPane->DisableTask(pGroup->m_Tasks[BTN_GRAPHICS]);
}
if (
result->active_task_state != PROCESS_ABORT_PENDING &&
result->active_task_state != PROCESS_ABORTED &&

View File

@ -407,6 +407,7 @@ void CViewWorkGrid::UpdateSelection() {
CTaskItemGroup* pGroup = NULL;
RESULT* result = NULL;
PROJECT* project = NULL;
CC_STATUS status;
CMainDocument* pDoc = wxGetApp().GetDocument();
int i, n;
bool wasSuspended=false, all_same_project=false;
@ -426,6 +427,10 @@ void CViewWorkGrid::UpdateSelection() {
if (n > 0) {
m_pTaskPane->EnableTaskGroupTasks(pGroup);
pDoc->GetCoreClientStatus(status);
if (status.task_suspend_reason & ~(SUSPEND_REASON_CPU_USAGE_LIMIT)) {
m_pTaskPane->DisableTask(pGroup->m_Tasks[BTN_GRAPHICS]);
}
} else {
m_pTaskPane->DisableTaskGroupTasks(pGroup);
}
@ -465,6 +470,10 @@ void CViewWorkGrid::UpdateSelection() {
m_pTaskPane->DisableTask(pGroup->m_Tasks[BTN_GRAPHICS]);
}
if (result->suspended_via_gui || result->project_suspended_via_gui) {
m_pTaskPane->DisableTask(pGroup->m_Tasks[BTN_GRAPHICS]);
}
// Disable Abort button if any selected task already aborted
if (
result->active_task_state == PROCESS_ABORT_PENDING ||