From f556a34086c3d9759d2c33955fb092ed41a4d42a Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Sun, 18 Apr 2021 01:19:05 +0100 Subject: [PATCH] Remove the mentions of the native OSX wxListCtrl control This control was removed during the Carbon code removal in commit 5ba67c67e47d069f65d648ab16dfc505c5400bfc, so the system option does nothing now (and was only mentioned in the documentation and the sample). --- interface/wx/listctrl.h | 7 +++---- interface/wx/sysopt.h | 3 --- samples/listctrl/listtest.cpp | 18 +----------------- samples/listctrl/listtest.h | 6 ------ 4 files changed, 4 insertions(+), 30 deletions(-) diff --git a/interface/wx/listctrl.h b/interface/wx/listctrl.h index 93f09127ac..b0bba1a9a7 100644 --- a/interface/wx/listctrl.h +++ b/interface/wx/listctrl.h @@ -147,10 +147,9 @@ enum To intercept events from a list control, use the event table macros described in wxListEvent. - wxMac Note: Starting with wxWidgets 2.8, wxListCtrl uses a native - implementation for report mode, and uses a generic implementation for other - modes. You can use the generic implementation for report mode as well by setting - the @c mac.listctrl.always_use_generic system option (see wxSystemOptions) to 1. + @note The native wxOSX implementation for report mode that was added in wxWidgets + 2.8 was removed in wxWidgets 3.1, meaning for wxWidgets 3.1+ wxOSX uses the generic + implementation for all modes. @subsection column_order Column Ordering diff --git a/interface/wx/sysopt.h b/interface/wx/sysopt.h index 53d496544e..eb1845f5f7 100644 --- a/interface/wx/sysopt.h +++ b/interface/wx/sysopt.h @@ -105,9 +105,6 @@ @flag{window-default-variant} The default variant used by windows (cast to integer from the wxWindowVariant enum). Also known as wxWINDOW_DEFAULT_VARIANT. - @flag{mac.listctrl.always_use_generic} - Tells wxListCtrl to use the generic control even when it is capable of - using the native control instead. Also known as wxMAC_ALWAYS_USE_GENERIC_LISTCTRL. @flag{mac.textcontrol-use-spell-checker} If 1 activates the spell checking in wxTextCtrl. @flag{osx.openfiledialog.always-show-types} diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index 92ae0a1926..f2615a01b9 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -150,9 +150,6 @@ wxBEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(LIST_TOGGLE_HEADER, MyFrame::OnToggleHeader) EVT_MENU(LIST_TOGGLE_BELL, MyFrame::OnToggleBell) EVT_MENU(LIST_CHECKVISIBILITY, MyFrame::OnCheckVisibility) -#ifdef __WXOSX__ - 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) @@ -229,10 +226,6 @@ MyFrame::MyFrame(const wxString& title) menuView->Append(LIST_SMALL_VIRTUAL_VIEW, "Small virtual vie&w\tF8"); menuView->AppendSeparator(); menuView->Append(LIST_SET_ITEMS_COUNT, "Set &number of items"); -#ifdef __WXOSX__ - menuView->AppendSeparator(); - menuView->AppendCheckItem(LIST_MAC_USE_GENERIC, "Mac: Use Generic Control"); -#endif wxMenu *menuList = new wxMenu; menuList->Append(LIST_GOTO, "&Go to item #3\tCtrl-3"); @@ -391,15 +384,6 @@ void MyFrame::OnCheckVisibility(wxCommandEvent& WXUNUSED(event)) wxLogMessage( "Line 9 is not visible" ); } -#ifdef __WXOSX__ - -void MyFrame::OnToggleMacUseGeneric(wxCommandEvent& event) -{ - wxSystemOptions::SetOption("mac.listctrl.always_use_generic", event.IsChecked()); -} - -#endif // __WXOSX__ - void MyFrame::OnGoTo(wxCommandEvent& WXUNUSED(event)) { if ( m_listCtrl->IsEmpty() ) @@ -433,7 +417,7 @@ void MyFrame::OnFocusLast(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnToggleFirstSel(wxCommandEvent& WXUNUSED(event)) { if ( !m_listCtrl->IsEmpty() ) - { + { m_listCtrl->SetItemState(0, (~m_listCtrl->GetItemState(0, wxLIST_STATE_SELECTED) ) & wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); } else diff --git a/samples/listctrl/listtest.h b/samples/listctrl/listtest.h index c40ee918ca..04410ecbf1 100644 --- a/samples/listctrl/listtest.h +++ b/samples/listctrl/listtest.h @@ -148,9 +148,6 @@ protected: void OnToggleLines(wxCommandEvent& event); void OnToggleHeader(wxCommandEvent& event); void OnToggleBell(wxCommandEvent& event); -#ifdef __WXOSX__ - void OnToggleMacUseGeneric(wxCommandEvent& event); -#endif // __WXOSX__ void OnFind(wxCommandEvent& event); void OnToggleItemCheckBox(wxCommandEvent& event); void OnGetItemCheckBox(wxCommandEvent& event); @@ -245,9 +242,6 @@ enum LIST_FREEZE, LIST_THAW, LIST_TOGGLE_LINES, -#ifdef __WXOSX__ - LIST_MAC_USE_GENERIC, -#endif LIST_CHECKVISIBILITY, LIST_CTRL = 1000 };