From f4b57b40242a98437d1420979060b665bf8a3e83 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Wed, 17 Oct 2012 05:28:48 -0700 Subject: [PATCH] MGR: Add Control-Shift_E shortcut (Command-Shift-E on Mac) to show Event Log in Simple View, for the convenience of tech suppport volunteers --- checkin_notes | 7 +++++++ clientgui/sg_BoincSimpleFrame.cpp | 15 +++++++++++++++ clientgui/sg_BoincSimpleFrame.h | 5 +++-- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index 4f6edab3ea..1fb1178e2a 100644 --- a/checkin_notes +++ b/checkin_notes @@ -6187,3 +6187,10 @@ David 16 Oct 2012 stage_file (new) sched/ credit.cpp + +Charlie 17 Oct 2012 + - MGR: Add Control-Shift_E shortcut (Command-Shift-E on Mac) to show Event + Log in Simple View, for the convenience of tech suppport volunteers. + + clientgui/ + sg_BoincSimpleFrame.cpp,.h diff --git a/clientgui/sg_BoincSimpleFrame.cpp b/clientgui/sg_BoincSimpleFrame.cpp index ea66f7fa32..8af24e3e75 100755 --- a/clientgui/sg_BoincSimpleFrame.cpp +++ b/clientgui/sg_BoincSimpleFrame.cpp @@ -74,6 +74,7 @@ BEGIN_EVENT_TABLE(CSimpleFrame, CBOINCBaseFrame) EVT_MENU(ID_HELPBOINCMANAGER, CSimpleFrame::OnHelpBOINC) EVT_MENU(ID_HELPBOINCWEBSITE, CSimpleFrame::OnHelpBOINC) EVT_MENU(wxID_ABOUT, CSimpleFrame::OnHelpAbout) + EVT_MENU(ID_EVENTLOG, CSimpleFrame::OnEventLog) END_EVENT_TABLE() @@ -271,6 +272,11 @@ CSimpleFrame::CSimpleFrame(wxString title, wxIcon* icon, wxIcon* icon32, wxPoint #endif m_Shortcuts[0].Set(wxACCEL_NORMAL, WXK_HELP, ID_HELPBOINCMANAGER); +#ifdef __WXMAC__ + m_Shortcuts[1].Set(wxACCEL_CMD|wxACCEL_SHIFT, (int)'E', ID_EVENTLOG); +#else + m_Shortcuts[1].Set(wxACCEL_CTRL|wxACCEL_SHIFT, (int)'E', ID_EVENTLOG); +#endif m_pAccelTable = new wxAcceleratorTable(2, m_Shortcuts); SetAcceleratorTable(*m_pAccelTable); @@ -670,6 +676,15 @@ void CSimpleFrame::OnConnect(CFrameEvent& WXUNUSED(event)) { } +void CSimpleFrame::OnEventLog(wxCommandEvent& WXUNUSED(event)) { + wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnEventLog - Function Begin")); + + wxGetApp().DisplayEventLog(); + + wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnEventLog - Function End")); +} + + IMPLEMENT_DYNAMIC_CLASS(CSimpleGUIPanel, wxPanel) BEGIN_EVENT_TABLE(CSimpleGUIPanel, wxPanel) diff --git a/clientgui/sg_BoincSimpleFrame.h b/clientgui/sg_BoincSimpleFrame.h index b0d329d4b7..7e5b08f07e 100644 --- a/clientgui/sg_BoincSimpleFrame.h +++ b/clientgui/sg_BoincSimpleFrame.h @@ -124,7 +124,8 @@ public: void OnReloadSkin( CFrameEvent& event ); void OnRefreshView( CFrameEvent& event ); void OnNotification( CFrameEvent& event ); - + void OnEventLog(wxCommandEvent& event); + void SetMsgsDlgOpen(CDlgMessages* newDlgPtr) { dlgMsgsPtr = newDlgPtr; } bool isMessagesDlgOpen() { return (dlgMsgsPtr != NULL); } @@ -136,7 +137,7 @@ protected: wxMenuBar* m_pMenubar; wxMenu* m_pSubmenuSkins; - wxAcceleratorEntry m_Shortcuts[1]; + wxAcceleratorEntry m_Shortcuts[2]; wxAcceleratorTable* m_pAccelTable; CSimpleGUIPanel* m_pBackgroundPanel;