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
This commit is contained in:
Vadim Zeitlin
2009-04-25 15:37:33 +00:00
parent 4691b518df
commit 8a3f03ffce
2 changed files with 10 additions and 0 deletions

View File

@@ -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;