From 8a3f03ffce938a24ecc154b614072457b3900ed0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 25 Apr 2009 15:37:33 +0000 Subject: [PATCH] only use Mac-specific menu item under Mac git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/listctrl/listtest.cpp | 6 ++++++ samples/listctrl/listtest.h | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index 33dc23898d..8fd9573f5c 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -150,7 +150,9 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(LIST_FREEZE, MyFrame::OnFreeze) EVT_MENU(LIST_THAW, MyFrame::OnThaw) EVT_MENU(LIST_TOGGLE_LINES, MyFrame::OnToggleLines) +#ifdef __WXOSX__ EVT_MENU(LIST_MAC_USE_GENERIC, MyFrame::OnToggleMacUseGeneric) +#endif // __WXOSX__ EVT_UPDATE_UI(LIST_SHOW_COL_INFO, MyFrame::OnUpdateShowColInfo) EVT_UPDATE_UI(LIST_TOGGLE_MULTI_SEL, MyFrame::OnUpdateToggleMultiSel) @@ -346,11 +348,15 @@ void MyFrame::OnToggleLines(wxCommandEvent& event) m_listCtrl->SetSingleStyle(wxLC_HRULES | wxLC_VRULES, event.IsChecked()); } +#ifdef __WXOSX__ + void MyFrame::OnToggleMacUseGeneric(wxCommandEvent& event) { wxSystemOptions::SetOption(wxT("mac.listctrl.always_use_generic"), event.IsChecked()); } +#endif // __WXOSX__ + void MyFrame::OnGoTo(wxCommandEvent& WXUNUSED(event)) { long index = 3; diff --git a/samples/listctrl/listtest.h b/samples/listctrl/listtest.h index 529e1a6140..03c79552c4 100644 --- a/samples/listctrl/listtest.h +++ b/samples/listctrl/listtest.h @@ -143,7 +143,9 @@ protected: void OnFreeze(wxCommandEvent& event); void OnThaw(wxCommandEvent& event); void OnToggleLines(wxCommandEvent& event); +#ifdef __WXOSX__ void OnToggleMacUseGeneric(wxCommandEvent& event); +#endif // __WXOSX__ void OnUpdateShowColInfo(wxUpdateUIEvent& event); void OnUpdateToggleMultiSel(wxUpdateUIEvent& event); @@ -217,7 +219,9 @@ enum LIST_FREEZE, LIST_THAW, LIST_TOGGLE_LINES, +#ifdef __WXOSX__ LIST_MAC_USE_GENERIC, +#endif LIST_CTRL = 1000 }; -- 2.47.2