From db585e88c50bd31cb55ca4696aab30f969705de2 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Mon, 2 Jul 2007 13:17:36 +0000 Subject: [PATCH] - MGR: Adjust menu names. clientgui/ AdvancedFrame.cpp Events.h svn path=/trunk/boinc/; revision=13067 --- checkin_notes | 8 ++++++++ clientgui/AdvancedFrame.cpp | 33 +++++++++++++++++---------------- clientgui/Events.h | 3 ++- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/checkin_notes b/checkin_notes index abd7151e02..8724ecde72 100755 --- a/checkin_notes +++ b/checkin_notes @@ -6884,3 +6884,11 @@ David 30 June 2007 client/ gui_rpc_server_ops.C + +Rom 2 July 2007 + - MGR: Adjust menu names. + + clientgui/ + AdvancedFrame.cpp + Events.h + \ No newline at end of file diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp index a6f06f7cd9..b66232c13f 100644 --- a/clientgui/AdvancedFrame.cpp +++ b/clientgui/AdvancedFrame.cpp @@ -174,7 +174,7 @@ BEGIN_EVENT_TABLE (CAdvancedFrame, CBOINCBaseFrame) EVT_MENU(ID_FILERUNBENCHMARKS, CAdvancedFrame::OnRunBenchmarks) EVT_MENU(ID_FILESELECTCOMPUTER, CAdvancedFrame::OnSelectComputer) EVT_MENU(ID_SHUTDOWNCORECLIENT, CAdvancedFrame::OnClientShutdown) - EVT_MENU(ID_VIEWSWITCHTYPE, CAdvancedFrame::OnSwitchView) + EVT_MENU_RANGE(ID_VIEWACCESSIBLE, ID_VIEWGRID, CAdvancedFrame::OnSwitchView) EVT_MENU(ID_FILESWITCHGUI, CAdvancedFrame::OnSwitchGUI) EVT_MENU(ID_READ_PREFS, CAdvancedFrame::Onread_prefs) EVT_MENU(ID_READ_CONFIG, CAdvancedFrame::Onread_config) @@ -356,16 +356,23 @@ bool CAdvancedFrame::CreateMenu() { // View menu wxMenu *menuView = new wxMenu; - menuView->AppendCheckItem( - ID_VIEWSWITCHTYPE, + menuView->AppendRadioItem( + ID_VIEWACCESSIBLE, _("&Accessible View"), _("Accessible views are compatible with accessibility aids such as " "screen readers.") ); + menuView->AppendRadioItem( + ID_VIEWGRID, + _("&Grid View"), + _("Grid views allow you to sort various columns and displays " + "graphical progress bars.") + ); + menuView->Append( ID_FILESWITCHGUI, - _("&Simple View"), + _("&Simple View..."), _("Display the simple BOINC graphical interface.") ); @@ -1274,10 +1281,14 @@ void CAdvancedFrame::Onread_config(wxCommandEvent& WXUNUSED(event)) { void CAdvancedFrame::OnSwitchView(wxCommandEvent& event) { wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnSwitchView - Function Begin")); - if ( event.IsChecked() ) { + switch(event.GetId()) { + case ID_VIEWACCESSIBLE: m_iDisplayViewType = VIEW_LIST; - } else { + break; + case ID_VIEWGRID: + default: m_iDisplayViewType = VIEW_GRID; + break; } // Save the current view state @@ -1891,16 +1902,6 @@ void CAdvancedFrame::OnFrameRender(wxTimerEvent &event) { bAlreadyRunningLoop = true; if (IsShown()) { - wxMenuBar* pMenuBar = GetMenuBar(); - - wxASSERT(pMenuBar); - wxASSERT(wxDynamicCast(pMenuBar, wxMenuBar)); - - pMenuBar->Check(ID_VIEWSWITCHTYPE, false); - if (VIEW_LIST == m_iDisplayViewType) { - pMenuBar->Check(ID_VIEWSWITCHTYPE, true); - } - if (pDoc) { wxASSERT(wxDynamicCast(pDoc, CMainDocument)); wxASSERT(wxDynamicCast(m_pStatusbar, CStatusBar)); diff --git a/clientgui/Events.h b/clientgui/Events.h index 2ddbe62430..220766ff7a 100644 --- a/clientgui/Events.h +++ b/clientgui/Events.h @@ -57,7 +57,8 @@ #define ID_ADVPREFSDLG 6033 #define ID_SHUTDOWNCORECLIENT 6034 #define ID_HELPBOINC 6035 -#define ID_VIEWSWITCHTYPE 6036 +#define ID_VIEWACCESSIBLE 6036 +#define ID_VIEWGRID 6037 #define ID_SIMPLEFRAME 6100 #define ID_SIMPLEMESSAGECHECKTIMER 6101 #define ID_SIMPLE_ATTACHTOPROJECT 6600