Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CTRL+TAB shortcut #1

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions clientgui/AdvancedFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ BEGIN_EVENT_TABLE (CAdvancedFrame, CBOINCBaseFrame)
EVT_TIMER(ID_FRAMERENDERTIMER, CAdvancedFrame::OnFrameRender)
EVT_NOTEBOOK_PAGE_CHANGED(ID_FRAMENOTEBOOK, CAdvancedFrame::OnNotebookSelectionChanged)
EVT_MENU(ID_SELECTALL, CAdvancedFrame::OnSelectAll)
EVT_MENU(ID_NEXT_PAGE, CAdvancedFrame::OnNextPage)
EVT_SIZE(CAdvancedFrame::OnSize)
EVT_MOVE(CAdvancedFrame::OnMove)
#ifdef __WXMAC__
Expand Down Expand Up @@ -754,13 +755,14 @@ bool CAdvancedFrame::CreateMenus() {
}

m_Shortcuts[0].Set(wxACCEL_CTRL, (int)'A', ID_SELECTALL);
m_Shortcuts[1].Set(wxACCEL_CTRL, WXK_TAB, ID_NEXT_PAGE);

#ifdef __WXMAC__
// Set HELP key as keyboard shortcut
m_Shortcuts[1].Set(wxACCEL_NORMAL, WXK_HELP, ID_HELPBOINCMANAGER);
m_Shortcuts[2].Set(wxACCEL_NORMAL, WXK_HELP, ID_HELPBOINCMANAGER);
#endif

m_pAccelTable = new wxAcceleratorTable(2, m_Shortcuts);
m_pAccelTable = new wxAcceleratorTable(3, m_Shortcuts);
SetAcceleratorTable(*m_pAccelTable);

wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::CreateMenu - Function End"));
Expand Down Expand Up @@ -1979,6 +1981,22 @@ void CAdvancedFrame::OnSelectAll(wxCommandEvent& WXUNUSED(event)) {
}


void CAdvancedFrame::OnNextPage( wxCommandEvent& event) {
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnNextPage - Function Begin"));

wxWindow* pwndNotebookPage = NULL;
int selection = event.GetSelection();

pwndNotebookPage = m_pNotebook->GetPage(selection);

if ( pwndNotebookPage != NULL ) {
m_pNotebook->AdvanceSelection(true);
}

wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnNextPage - Function End"));
}


void CAdvancedFrame::UpdateActivityModeControls( CC_STATUS& status ) {
wxMenuBar* pMenuBar = GetMenuBar();
wxASSERT(pMenuBar);
Expand Down
3 changes: 2 additions & 1 deletion clientgui/AdvancedFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class CAdvancedFrame : public CBOINCBaseFrame
void OnActivitySelection( wxCommandEvent& event );
void OnGPUSelection( wxCommandEvent& event );
void OnNetworkSelection( wxCommandEvent& event );
void OnNextPage( wxCommandEvent &event);

void OnSelectAll( wxCommandEvent& event );

Expand Down Expand Up @@ -112,7 +113,7 @@ class CAdvancedFrame : public CBOINCBaseFrame
protected:
virtual int _GetCurrentViewPage();

wxAcceleratorEntry m_Shortcuts[2]; // For keyboard shortcut
wxAcceleratorEntry m_Shortcuts[3]; // For keyboard shortcut
wxAcceleratorTable* m_pAccelTable;

private:
Expand Down
1 change: 1 addition & 0 deletions clientgui/Events.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@

// Shortcuts
#define ID_SELECTALL 9800
#define ID_NEXT_PAGE 9801

//
// Simple GUI
Expand Down