Merge branch 'rename-listctrl-checkbox-methods' of https://github.com/discnl/wxWidgets

Use consistent case for wxListCtrl::{Has,Enable}CheckBoxes() methods.

Closes https://github.com/wxWidgets/wxWidgets/pull/275
This commit is contained in:
Vadim Zeitlin
2016-04-23 18:52:47 +02:00
10 changed files with 52 additions and 45 deletions

View File

@@ -155,16 +155,16 @@ wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(LIST_MAC_USE_GENERIC, MyFrame::OnToggleMacUseGeneric)
#endif // __WXOSX__
EVT_MENU(LIST_FIND, MyFrame::OnFind)
EVT_MENU(LIST_TOGGLE_CHECKBOX, MyFrame::OnToggleItemCheckbox)
EVT_MENU(LIST_GET_CHECKBOX, MyFrame::OnGetItemCheckbox)
EVT_MENU(LIST_TOGGLE_CHECKBOXES, MyFrame::OnToggleCheckboxes)
EVT_MENU(LIST_TOGGLE_CHECKBOX, MyFrame::OnToggleItemCheckBox)
EVT_MENU(LIST_GET_CHECKBOX, MyFrame::OnGetItemCheckBox)
EVT_MENU(LIST_TOGGLE_CHECKBOXES, MyFrame::OnToggleCheckBoxes)
EVT_UPDATE_UI(LIST_SHOW_COL_INFO, MyFrame::OnUpdateUIEnableInReport)
EVT_UPDATE_UI(LIST_TOGGLE_HEADER, MyFrame::OnUpdateUIEnableInReport)
EVT_UPDATE_UI(LIST_CUSTOM_HEADER_ATTR, MyFrame::OnUpdateUIEnableInReport)
EVT_UPDATE_UI(LIST_TOGGLE_MULTI_SEL, MyFrame::OnUpdateToggleMultiSel)
EVT_UPDATE_UI(LIST_TOGGLE_CHECKBOXES, MyFrame::OnUpdateToggleCheckboxes)
EVT_UPDATE_UI(LIST_TOGGLE_CHECKBOXES, MyFrame::OnUpdateToggleCheckBoxes)
EVT_UPDATE_UI(LIST_TOGGLE_HEADER, MyFrame::OnUpdateToggleHeader)
EVT_UPDATE_UI(LIST_ROW_LINES, MyFrame::OnUpdateRowLines)
wxEND_EVENT_TABLE()
@@ -848,22 +848,22 @@ void MyFrame::OnUpdateToggleMultiSel(wxUpdateUIEvent& event)
event.Check(!m_listCtrl->HasFlag(wxLC_SINGLE_SEL));
}
void MyFrame::OnToggleCheckboxes(wxCommandEvent& WXUNUSED(event))
void MyFrame::OnToggleCheckBoxes(wxCommandEvent& WXUNUSED(event))
{
if ( !m_listCtrl->EnableCheckboxes(!m_listCtrl->HasCheckboxes()) )
if ( !m_listCtrl->EnableCheckBoxes(!m_listCtrl->HasCheckBoxes()) )
{
wxLogMessage("Failed to toggle checkboxes (not supported?)");
}
else
{
wxLogMessage("Checkboxes are now %s",
m_listCtrl->HasCheckboxes() ? "enabled" : "disabled");
m_listCtrl->HasCheckBoxes() ? "enabled" : "disabled");
}
}
void MyFrame::OnUpdateToggleCheckboxes(wxUpdateUIEvent& event)
void MyFrame::OnUpdateToggleCheckBoxes(wxUpdateUIEvent& event)
{
bool cbEnabled = m_listCtrl->HasCheckboxes();
bool cbEnabled = m_listCtrl->HasCheckBoxes();
event.Check(cbEnabled);
GetMenuBar()->Enable(LIST_TOGGLE_CHECKBOX, cbEnabled);
GetMenuBar()->Enable(LIST_GET_CHECKBOX, cbEnabled);
@@ -941,7 +941,7 @@ void MyFrame::OnEdit(wxCommandEvent& WXUNUSED(event))
}
}
void MyFrame::OnToggleItemCheckbox(wxCommandEvent& WXUNUSED(event))
void MyFrame::OnToggleItemCheckBox(wxCommandEvent& WXUNUSED(event))
{
long item = m_listCtrl->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
while (item != -1)
@@ -954,7 +954,7 @@ void MyFrame::OnToggleItemCheckbox(wxCommandEvent& WXUNUSED(event))
}
}
void MyFrame::OnGetItemCheckbox(wxCommandEvent& WXUNUSED(event))
void MyFrame::OnGetItemCheckBox(wxCommandEvent& WXUNUSED(event))
{
long item = m_listCtrl->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
while (item != -1)