mirror of https://github.com/BOINC/boinc.git
boincmgr: add CTRL+A shortcut
This commit is contained in:
parent
7423971fd4
commit
f81d713430
|
@ -204,6 +204,7 @@ BEGIN_EVENT_TABLE (CAdvancedFrame, CBOINCBaseFrame)
|
||||||
EVT_TIMER(ID_REFRESHSTATETIMER, CAdvancedFrame::OnRefreshState)
|
EVT_TIMER(ID_REFRESHSTATETIMER, CAdvancedFrame::OnRefreshState)
|
||||||
EVT_TIMER(ID_FRAMERENDERTIMER, CAdvancedFrame::OnFrameRender)
|
EVT_TIMER(ID_FRAMERENDERTIMER, CAdvancedFrame::OnFrameRender)
|
||||||
EVT_NOTEBOOK_PAGE_CHANGED(ID_FRAMENOTEBOOK, CAdvancedFrame::OnNotebookSelectionChanged)
|
EVT_NOTEBOOK_PAGE_CHANGED(ID_FRAMENOTEBOOK, CAdvancedFrame::OnNotebookSelectionChanged)
|
||||||
|
EVT_MENU(ID_SELECTALL, CAdvancedFrame::OnSelectAll)
|
||||||
EVT_SIZE(CAdvancedFrame::OnSize)
|
EVT_SIZE(CAdvancedFrame::OnSize)
|
||||||
EVT_MOVE(CAdvancedFrame::OnMove)
|
EVT_MOVE(CAdvancedFrame::OnMove)
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
|
@ -751,14 +752,17 @@ bool CAdvancedFrame::CreateMenus() {
|
||||||
if (m_pOldMenubar) {
|
if (m_pOldMenubar) {
|
||||||
delete m_pOldMenubar;
|
delete m_pOldMenubar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_Shortcuts[0].Set(wxACCEL_CTRL, (int)'A', ID_SELECTALL);
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
// Set HELP key as keyboard shortcut
|
// Set HELP key as keyboard shortcut
|
||||||
m_Shortcuts[0].Set(wxACCEL_NORMAL, WXK_HELP, ID_HELPBOINCMANAGER);
|
m_Shortcuts[1].Set(wxACCEL_NORMAL, WXK_HELP, ID_HELPBOINCMANAGER);
|
||||||
m_pAccelTable = new wxAcceleratorTable(1, m_Shortcuts);
|
|
||||||
SetAcceleratorTable(*m_pAccelTable);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
m_pAccelTable = new wxAcceleratorTable(2, m_Shortcuts);
|
||||||
|
SetAcceleratorTable(*m_pAccelTable);
|
||||||
|
|
||||||
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::CreateMenu - Function End"));
|
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::CreateMenu - Function End"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1954,13 +1958,27 @@ void CAdvancedFrame::OnNotebookSelectionChanged(wxNotebookEvent& event) {
|
||||||
|
|
||||||
pView = wxDynamicCast(pwndNotebookPage, CBOINCBaseView);
|
pView = wxDynamicCast(pwndNotebookPage, CBOINCBaseView);
|
||||||
wxASSERT(pView);
|
wxASSERT(pView);
|
||||||
|
|
||||||
pView->RefreshTaskPane();
|
pView->RefreshTaskPane();
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
|
||||||
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnNotebookSelectionChanged - Function End"));
|
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnNotebookSelectionChanged - Function End"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CAdvancedFrame::OnSelectAll(wxCommandEvent& WXUNUSED(event)) {
|
||||||
|
CBOINCBaseView* pView = wxDynamicCast(m_pNotebook->GetPage(m_pNotebook->GetSelection()), CBOINCBaseView);
|
||||||
|
CBOINCListCtrl* lCtrl = pView->GetListCtrl();
|
||||||
|
|
||||||
|
if (lCtrl == NULL) return;
|
||||||
|
|
||||||
|
int count = lCtrl->GetItemCount();
|
||||||
|
for (int i = 0; i < count; i++) {
|
||||||
|
lCtrl->SelectRow(i, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void CAdvancedFrame::UpdateActivityModeControls( CC_STATUS& status ) {
|
void CAdvancedFrame::UpdateActivityModeControls( CC_STATUS& status ) {
|
||||||
wxMenuBar* pMenuBar = GetMenuBar();
|
wxMenuBar* pMenuBar = GetMenuBar();
|
||||||
wxASSERT(pMenuBar);
|
wxASSERT(pMenuBar);
|
||||||
|
|
|
@ -66,6 +66,8 @@ public:
|
||||||
void OnGPUSelection( wxCommandEvent& event );
|
void OnGPUSelection( wxCommandEvent& event );
|
||||||
void OnNetworkSelection( wxCommandEvent& event );
|
void OnNetworkSelection( wxCommandEvent& event );
|
||||||
|
|
||||||
|
void OnSelectAll( wxCommandEvent& event );
|
||||||
|
|
||||||
void OnMenuOpening( wxMenuEvent &event);
|
void OnMenuOpening( wxMenuEvent &event);
|
||||||
void OnOptions( wxCommandEvent& event );
|
void OnOptions( wxCommandEvent& event );
|
||||||
void OnPreferences( wxCommandEvent& event );
|
void OnPreferences( wxCommandEvent& event );
|
||||||
|
@ -110,7 +112,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
virtual int _GetCurrentViewPage();
|
virtual int _GetCurrentViewPage();
|
||||||
|
|
||||||
wxAcceleratorEntry m_Shortcuts[1]; // For HELP keyboard shortcut
|
wxAcceleratorEntry m_Shortcuts[2]; // For keyboard shortcut
|
||||||
wxAcceleratorTable* m_pAccelTable;
|
wxAcceleratorTable* m_pAccelTable;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -152,6 +152,9 @@
|
||||||
#define ID_TASK_NEWS_BOINC 9700
|
#define ID_TASK_NEWS_BOINC 9700
|
||||||
#define ID_TASK_NEWS_BOINCWEBSITE 9701
|
#define ID_TASK_NEWS_BOINCWEBSITE 9701
|
||||||
|
|
||||||
|
// Shortcuts
|
||||||
|
#define ID_SELECTALL 9800
|
||||||
|
|
||||||
//
|
//
|
||||||
// Simple GUI
|
// Simple GUI
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue