no message

svn path=/trunk/boinc/; revision=1258
This commit is contained in:
Dan Werthimer 2003-05-29 18:28:02 +00:00
parent 686337e909
commit ef304b6131
4 changed files with 14 additions and 1 deletions

View File

@ -1224,3 +1224,7 @@ void ACTIVE_TASK_SET::check_graphics_mode_ack() {
atp->check_graphics_mode_ack(); atp->check_graphics_mode_ack();
} }
} }
bool ACTIVE_TASK::supports_graphics() {
return (graphics_acked_mode != MODE_UNSUPPORTED);
}

View File

@ -116,6 +116,7 @@ public:
int get_cpu_time_via_os(); int get_cpu_time_via_os();
double est_time_to_completion(); double est_time_to_completion();
bool read_stderr_file(); bool read_stderr_file();
bool supports_graphics();
int write(FILE*); int write(FILE*);
int parse(FILE*, CLIENT_STATE*); int parse(FILE*, CLIENT_STATE*);

View File

@ -1554,6 +1554,15 @@ void CMainWindow::OnRButtonDown(UINT nFlags, CPoint point)
if(rt.PtInRect(point)) { if(rt.PtInRect(point)) {
pContextMenu = m_ContextMenu.GetSubMenu(nMenuId); pContextMenu = m_ContextMenu.GetSubMenu(nMenuId);
if(pContextMenu) { 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); pContextMenu->TrackPopupMenu(TPM_LEFTALIGN|TPM_RIGHTBUTTON, point.x, point.y, this);
m_nContextItem = i; m_nContextItem = i;
} }

1
todo
View File

@ -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 They weren't moving. The computer was frozen. I had to ctrl-alt-del
to restart. 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) - 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 - If BOINC starts up before the taskbar is available, it is inaccessible
- GUI client should display "Upload failed" and "Download failed" - GUI client should display "Upload failed" and "Download failed"