From 86216c53a942d6cd89d8ed37a8a02995f0f99cc7 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Fri, 28 Jan 2011 09:55:03 +0000 Subject: [PATCH] MGR: Use our control IDs instead of wxID_HELP for Help buttons for Mac accessibility svn path=/trunk/boinc/; revision=22953 --- checkin_notes | 11 +++++++++-- clientgui/DlgAdvPreferences.cpp | 2 +- clientgui/DlgAdvPreferencesBase.cpp | 3 ++- clientgui/sg_BoincSimpleFrame.cpp | 4 ++-- clientgui/sg_DlgMessages.cpp | 6 +++--- clientgui/sg_DlgPreferences.cpp | 8 ++++---- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/checkin_notes b/checkin_notes index c8dd4533d7..3a93458e53 100644 --- a/checkin_notes +++ b/checkin_notes @@ -315,13 +315,20 @@ David 27 Jan 2011 coproc.cpp,h Charlie 28 Jan 2011 - - MGR: Fix default skin selection display in Simple Preferences + - MGR: Fix default skin selection display in Simple Preferences dialog. - - MGR: Use standard native buttons in Simple Preferences and + - MGR: Use standard native buttons in Simple Preferences and Simple Notices dialogs. + - MGR: Use our control IDs instead of wxID_HELP for Help buttons + for Mac accessibility (wxID_HELP makes a bitmap button on + Macs which VoiceOver screen reader can't read.) clientgui/ + DlgAdvPreferences.cpp + DlgAdvPreferencesBase.cpp + sg_BoincSimpleFrame.cpp sg_DlgMessages.cpp sg_DlgPreferences.cpp + wizardex.cpp SkinManager.cpp \ No newline at end of file diff --git a/clientgui/DlgAdvPreferences.cpp b/clientgui/DlgAdvPreferences.cpp index bad6b696cf..cc1d2dc902 100644 --- a/clientgui/DlgAdvPreferences.cpp +++ b/clientgui/DlgAdvPreferences.cpp @@ -45,7 +45,7 @@ BEGIN_EVENT_TABLE(CDlgAdvPreferences, wxDialog) EVT_COMMAND_RANGE(20000,21000,wxEVT_COMMAND_TEXT_UPDATED,CDlgAdvPreferences::OnHandleCommandEvent) //buttons EVT_BUTTON(wxID_OK,CDlgAdvPreferences::OnOK) - EVT_BUTTON(wxID_HELP,CDlgAdvPreferences::OnHelp) + EVT_BUTTON(ID_HELPBOINC,CDlgAdvPreferences::OnHelp) EVT_BUTTON(ID_BTN_CLEAR,CDlgAdvPreferences::OnClear) END_EVENT_TABLE() diff --git a/clientgui/DlgAdvPreferencesBase.cpp b/clientgui/DlgAdvPreferencesBase.cpp index 6cb1d142f9..a7844fcc37 100644 --- a/clientgui/DlgAdvPreferencesBase.cpp +++ b/clientgui/DlgAdvPreferencesBase.cpp @@ -20,6 +20,7 @@ // http://www.wxformbuilder.org/ #include "stdwx.h" +#include "Events.h" #include "diagnostics.h" #include "util.h" #include "mfile.h" @@ -105,7 +106,7 @@ CDlgAdvPreferencesBase::CDlgAdvPreferencesBase( wxWindow* parent, int id, wxStri buttonSizer->Add( m_btnCancel, 0, wxALL, 5 ); - m_btnHelp = new wxButton( m_panelButtons, wxID_HELP, _("Help"), wxDefaultPosition, wxDefaultSize, 0 ); + m_btnHelp = new wxButton( m_panelButtons, ID_HELPBOINC, _("Help"), wxDefaultPosition, wxDefaultSize, 0 ); m_btnHelp->SetToolTip( _("shows the preferences web page") ); buttonSizer->Add( m_btnHelp, 0, wxALL, 5 ); diff --git a/clientgui/sg_BoincSimpleFrame.cpp b/clientgui/sg_BoincSimpleFrame.cpp index f84eab9b72..b74b20942e 100755 --- a/clientgui/sg_BoincSimpleFrame.cpp +++ b/clientgui/sg_BoincSimpleFrame.cpp @@ -555,7 +555,7 @@ BEGIN_EVENT_TABLE(CSimpleGUIPanel, wxPanel) EVT_ERASE_BACKGROUND(CSimpleGUIPanel::OnEraseBackground) EVT_BUTTON(ID_SGNOTICESBUTTON,CSimpleGUIPanel::OnShowNotices) EVT_BUTTON(ID_SGPAUSERESUMEBUTTON,CSimpleGUIPanel::OnPauseResume) - EVT_BUTTON(wxID_HELP,CSimpleGUIPanel::OnHelp) + EVT_BUTTON(ID_SIMPLE_HELP,CSimpleGUIPanel::OnHelp) EVT_TIMER(ID_SIMPLEMESSAGECHECKTIMER, CSimpleGUIPanel::OnCheckForNewNotices) EVT_PAINT(CSimpleGUIPanel::OnPaint) END_EVENT_TABLE() @@ -618,7 +618,7 @@ CSimpleGUIPanel::CSimpleGUIPanel(wxWindow* parent) : buttonsSizer->Add( m_PauseResumeButton, 0, wxEXPAND | wxALIGN_RIGHT, 0 ); buttonsSizer->AddStretchSpacer(); - m_HelpButton = new wxButton( this, wxID_HELP, _("Help"), wxDefaultPosition, wxDefaultSize, 0 ); + m_HelpButton = new wxButton( this, ID_SIMPLE_HELP, _("Help"), wxDefaultPosition, wxDefaultSize, 0 ); buttonsSizer->Add( m_HelpButton, 0, wxEXPAND | wxALIGN_RIGHT, 0 ); m_HelpButton->SetToolTip( _("Get help with BOINC")); diff --git a/clientgui/sg_DlgMessages.cpp b/clientgui/sg_DlgMessages.cpp index 23fc14daac..c26f473cd1 100644 --- a/clientgui/sg_DlgMessages.cpp +++ b/clientgui/sg_DlgMessages.cpp @@ -63,7 +63,7 @@ BEGIN_EVENT_TABLE( CPanelMessages, wxPanel ) ////@begin CPanelPreferences event table entries EVT_ERASE_BACKGROUND( CPanelMessages::OnEraseBackground ) EVT_BUTTON( wxID_OK, CPanelMessages::OnOK ) - EVT_BUTTON(wxID_HELP, CPanelMessages::OnButtonHelp) + EVT_BUTTON(ID_SIMPLE_HELP, CPanelMessages::OnButtonHelp) ////@end CPanelPreferences event table entries END_EVENT_TABLE() @@ -137,7 +137,7 @@ void CPanelMessages::CreateControls() #ifndef __WXMSW__ #ifdef __WXMAC__ - wxButton* itemButton45 = new wxButton( this, wxID_HELP, _("Help"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton* itemButton45 = new wxButton( this, ID_SIMPLE_HELP, _("Help"), wxDefaultPosition, wxDefaultSize, 0 ); #ifdef wxUSE_TOOLTIPS itemButton45->SetToolTip(new wxToolTip(_("Get help with BOINC"))); #endif @@ -237,7 +237,7 @@ void CPanelMessages::OnOK( wxCommandEvent& event ) { /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_HELP / ID_SIMPLE_HELP + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SIMPLE_HELP */ void CPanelMessages::OnButtonHelp( wxCommandEvent& event ) { diff --git a/clientgui/sg_DlgPreferences.cpp b/clientgui/sg_DlgPreferences.cpp index 94c755f735..780f9748a8 100644 --- a/clientgui/sg_DlgPreferences.cpp +++ b/clientgui/sg_DlgPreferences.cpp @@ -210,7 +210,7 @@ BEGIN_EVENT_TABLE( CPanelPreferences, wxPanel ) EVT_CHECKBOX( ID_CUSTOMIZEPREFERENCES, CPanelPreferences::OnCustomizePreferencesClick ) EVT_COMBOBOX( ID_WORKBETWEENBEGIN, CPanelPreferences::OnWorkBetweenBeginSelected ) EVT_COMBOBOX( ID_CONNECTBETWEENBEGIN, CPanelPreferences::OnConnectBetweenBeginSelected ) - EVT_BUTTON( wxID_HELP, CPanelPreferences::OnButtonHelp ) + EVT_BUTTON( ID_SIMPLE_HELP, CPanelPreferences::OnButtonHelp ) ////@end CPanelPreferences event table entries END_EVENT_TABLE() @@ -465,7 +465,7 @@ void CPanelPreferences::CreateControls() #ifndef __WXMSW__ #ifdef __WXMAC__ - wxButton* itemButton46 = new wxButton( this, wxID_HELP, _("Help"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton* itemButton46 = new wxButton( this, ID_SIMPLE_HELP, _("Help"), wxDefaultPosition, wxDefaultSize, 0 ); #ifdef wxUSE_TOOLTIPS itemButton46->SetToolTip(new wxToolTip(_("Get help with BOINC"))); #endif @@ -519,7 +519,7 @@ void CPanelPreferences::OnConnectBetweenBeginSelected( wxCommandEvent& /*event*/ /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_HELP / ID_SIMPLE_HELP + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SIMPLE_HELP */ void CPanelPreferences::OnButtonHelp( wxCommandEvent& event ) { @@ -533,7 +533,7 @@ void CPanelPreferences::OnButtonHelp( wxCommandEvent& event ) { wxT("%s?target=simple_preferences&version=%s&controlid=%d"), strURL.c_str(), wxString(BOINC_VERSION_STRING, wxConvUTF8).c_str(), - ID_SIMPLE_HELP + event.GetId() ); wxLaunchDefaultBrowser(wxurl); }