Commit 7f0efb54 authored by Rom Walton's avatar Rom Walton

- MGR: Make CTRL-SHIFT-A the accelerator in the simple GUI that

        switches back to the advanced view.
        refs #147

    clientgui/
        sg_BoincSimpleGUI.cpp, .h

svn path=/trunk/boinc/; revision=17410
parent 58593802
......@@ -2354,3 +2354,11 @@ David 27 Feb 2009
clientgui/
DlgAdvPreferences.cpp
Rom 27 Feb 2009
- MGR: Make CTRL-SHIFT-A the accelerator in the simple GUI that
switches back to the advanced view.
refs #147
clientgui/
sg_BoincSimpleGUI.cpp, .h
......@@ -55,8 +55,9 @@ IMPLEMENT_DYNAMIC_CLASS(CSimpleFrame, CBOINCBaseFrame)
BEGIN_EVENT_TABLE(CSimpleFrame, CBOINCBaseFrame)
EVT_SIZE(CSimpleFrame::OnSize)
EVT_MENU(wxID_EXIT, CSimpleFrame::OnExit)
EVT_FRAME_CONNECT(CSimpleFrame::OnConnect)
EVT_MENU(ID_FILESWITCHGUI, CSimpleFrame::OnSwitchGUI)
EVT_HELP(wxID_ANY, CSimpleFrame::OnHelp)
EVT_FRAME_CONNECT(CSimpleFrame::OnConnect)
EVT_FRAME_RELOADSKIN(CSimpleFrame::OnReloadSkin)
// We can't eliminate the Mac Help menu, so we might as well make it useful.
EVT_MENU(ID_HELPBOINC, CSimpleFrame::OnHelpBOINC)
......@@ -184,7 +185,7 @@ CSimpleFrame::CSimpleFrame(wxString title, wxIcon* icon, wxIcon* icon32) :
// wxMac maps Command key to wxACCEL_ALT for wxAcceleratorTable but CTRL for wxMenu.
m_Shortcuts[0].Set(wxACCEL_NORMAL, WXK_HELP, ID_HELPBOINCMANAGER);
#else
m_Shortcuts[0].Set(wxACCEL_CTRL, (int)'W', ID_FILECLOSEWINDOW);
m_Shortcuts[0].Set(wxACCEL_CTRL|wxACCEL_SHIFT, (int)'A', ID_FILESWITCHGUI);
#endif
m_pAccelTable = new wxAcceleratorTable(1, m_Shortcuts);
......@@ -308,8 +309,17 @@ int CSimpleFrame::_GetCurrentViewPage() {
}
void CSimpleFrame::OnHelp(wxHelpEvent& event) {
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnHelp - Function Begin"));
void CSimpleFrame::OnSwitchGUI(wxCommandEvent& event) {
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnSwitchGUI - Function Begin"));
wxGetApp().SetActiveGUI(BOINC_ADVANCEDGUI, true);
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnSwitchGUI - Function End"));
}
void CSimpleFrame::OnHelpBOINC(wxCommandEvent& event) {
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnHelpBOINC - Function Begin"));
if (IsShown()) {
wxString strURL = wxGetApp().GetSkinManager()->GetAdvanced()->GetOrganizationHelpUrl();
......@@ -321,15 +331,15 @@ void CSimpleFrame::OnHelp(wxHelpEvent& event) {
wxString(BOINC_VERSION_STRING, wxConvUTF8).c_str(),
event.GetId()
);
ExecuteBrowserLink(wxurl);
ExecuteBrowserLink(wxurl);
}
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnHelp - Function End"));
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnHelpBOINC - Function End"));
}
void CSimpleFrame::OnHelpBOINC(wxCommandEvent& event) {
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnHelpBOINC - Function Begin"));
void CSimpleFrame::OnHelp(wxHelpEvent& event) {
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnHelp - Function Begin"));
if (IsShown()) {
wxString strURL = wxGetApp().GetSkinManager()->GetAdvanced()->GetOrganizationHelpUrl();
......@@ -341,10 +351,10 @@ void CSimpleFrame::OnHelpBOINC(wxCommandEvent& event) {
wxString(BOINC_VERSION_STRING, wxConvUTF8).c_str(),
event.GetId()
);
ExecuteBrowserLink(wxurl);
ExecuteBrowserLink(wxurl);
}
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnHelpBOINC - Function End"));
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnHelp - Function End"));
}
......
......@@ -110,6 +110,7 @@ public:
~CSimpleFrame();
void OnSwitchGUI( wxCommandEvent& event );
void OnHelp( wxHelpEvent& event );
void OnHelpBOINC( wxCommandEvent& event );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment