diff --git a/client/app.C b/client/app.C index 9b7bc367db..91df1790a6 100644 --- a/client/app.C +++ b/client/app.C @@ -1224,3 +1224,7 @@ void ACTIVE_TASK_SET::check_graphics_mode_ack() { atp->check_graphics_mode_ack(); } } + +bool ACTIVE_TASK::supports_graphics() { + return (graphics_acked_mode != MODE_UNSUPPORTED); +} diff --git a/client/app.h b/client/app.h index 95fb7ae194..1e34207916 100644 --- a/client/app.h +++ b/client/app.h @@ -116,6 +116,7 @@ public: int get_cpu_time_via_os(); double est_time_to_completion(); bool read_stderr_file(); + bool supports_graphics(); int write(FILE*); int parse(FILE*, CLIENT_STATE*); diff --git a/client/win/wingui_mainwindow.cpp b/client/win/wingui_mainwindow.cpp index 4a74de8b7f..5a80817ded 100755 --- a/client/win/wingui_mainwindow.cpp +++ b/client/win/wingui_mainwindow.cpp @@ -1554,6 +1554,15 @@ void CMainWindow::OnRButtonDown(UINT nFlags, CPoint point) if(rt.PtInRect(point)) { pContextMenu = m_ContextMenu.GetSubMenu(nMenuId); if(pContextMenu) { + if (nMenuId == RESULT_MENU) { + pContextMenu->EnableMenuItem(ID_WORK_SHOWGRAPHICS,MF_GRAYED); //disable + RESULT *rp = (RESULT *)pMenuCtrl->GetItemData(i); + if (rp) { + ACTIVE_TASK *atp = gstate.lookup_active_task_by_result(rp); + if (atp && atp->supports_graphics()) + pContextMenu->EnableMenuItem(ID_WORK_SHOWGRAPHICS,MF_ENABLED); // enable + } + } pContextMenu->TrackPopupMenu(TPM_LEFTALIGN|TPM_RIGHTBUTTON, point.x, point.y, this); m_nContextItem = i; } diff --git a/todo b/todo index 1a8bc3cd0e..650f76d7c2 100755 --- a/todo +++ b/todo @@ -16,7 +16,6 @@ gray, and the bottom half the bottom half of the astropulse graphics. They weren't moving. The computer was frozen. I had to ctrl-alt-del to restart. -- Set "Show Graphics" disabled if app can't display graphics - Test BOINC error handling on UNIX if app can't start up (use bad path name) - If BOINC starts up before the taskbar is available, it is inaccessible - GUI client should display "Upload failed" and "Download failed"