From 578bd2d033585984eec43192645145a6269b9440 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Wed, 9 Mar 2005 19:43:01 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=5608 --- clientgui/MainFrame.cpp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/clientgui/MainFrame.cpp b/clientgui/MainFrame.cpp index 4d94cecac3..09d413c6ce 100644 --- a/clientgui/MainFrame.cpp +++ b/clientgui/MainFrame.cpp @@ -953,9 +953,15 @@ void CMainFrame::OnFrameRender( wxTimerEvent &event ) wxASSERT(NULL != pMenuBar); wxASSERT(wxDynamicCast(pMenuBar, wxMenuBar)); - pMenuBar->Check( ID_ACTIVITYRUNALWAYS, false ); - pMenuBar->Check( ID_ACTIVITYSUSPEND, false ); - pMenuBar->Check( ID_ACTIVITYRUNBASEDONPREPERENCES, false ); + if ( NULL != pMenuBar->FindItem( ID_ACTIVITYRUNALWAYS, NULL ) ) + pMenuBar->Check( ID_ACTIVITYRUNALWAYS, false ); + + if ( NULL != pMenuBar->FindItem( ID_ACTIVITYSUSPEND, NULL ) ) + pMenuBar->Check( ID_ACTIVITYSUSPEND, false ); + + if ( NULL != pMenuBar->FindItem( ID_ACTIVITYRUNBASEDONPREPERENCES, NULL ) ) + pMenuBar->Check( ID_ACTIVITYRUNBASEDONPREPERENCES, false ); + pDoc->GetActivityRunMode( iActivityMode ); if ( CMainDocument::MODE_ALWAYS == iActivityMode ) @@ -967,9 +973,15 @@ void CMainFrame::OnFrameRender( wxTimerEvent &event ) if ( CMainDocument::MODE_AUTO == iActivityMode ) pMenuBar->Check( ID_ACTIVITYRUNBASEDONPREPERENCES, true ); - pMenuBar->Check( ID_NETWORKRUNALWAYS, false ); - pMenuBar->Check( ID_NETWORKSUSPEND, false ); - pMenuBar->Check( ID_NETWORKRUNBASEDONPREPERENCES, false ); + if ( NULL != pMenuBar->FindItem( ID_NETWORKRUNALWAYS, NULL ) ) + pMenuBar->Check( ID_NETWORKRUNALWAYS, false ); + + if ( NULL != pMenuBar->FindItem( ID_NETWORKSUSPEND, NULL ) ) + pMenuBar->Check( ID_NETWORKSUSPEND, false ); + + if ( NULL != pMenuBar->FindItem( ID_NETWORKRUNBASEDONPREPERENCES, NULL ) ) + pMenuBar->Check( ID_NETWORKRUNBASEDONPREPERENCES, false ); + pDoc->GetNetworkRunMode( iNetworkMode ); if ( CMainDocument::MODE_ALWAYS == iNetworkMode )