X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/be136f073819d425818049008ca286ff39c4cb10..840a5948c7023a650b3b8427991654e12c3427c1:/src/osx/cocoa/menuitem.mm diff --git a/src/osx/cocoa/menuitem.mm b/src/osx/cocoa/menuitem.mm index 8a81661f54..b8f33fc0cc 100644 --- a/src/osx/cocoa/menuitem.mm +++ b/src/osx/cocoa/menuitem.mm @@ -16,6 +16,7 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/log.h" #include "wx/menu.h" #endif // WX_PRECOMP @@ -31,6 +32,7 @@ - (void) clickedAction: (id) sender { + wxUnusedVar(sender); if ( impl ) { impl->GetWXPeer()->GetMenu()->HandleCommandProcess(impl->GetWXPeer()); @@ -39,6 +41,7 @@ - (BOOL)validateMenuItem:(NSMenuItem *) menuItem { + wxUnusedVar(menuItem); if( impl ) { impl->GetWXPeer()->GetMenu()->HandleCommandUpdateStatus(impl->GetWXPeer()); @@ -193,7 +196,11 @@ public : void Hide( bool hide ) { - [m_osxMenuItem setHidden:hide ]; + // NB: setHidden is new as of 10.5 so we should not call it below there + if ([m_osxMenuItem respondsToSelector:@selector(setHidden:)]) + [m_osxMenuItem setHidden:hide ]; + else + wxLogDebug("wxMenuItemCocoaImpl::Hide not yet supported under OS X < 10.5"); } void SetLabel( const wxString& text, wxAcceleratorEntry *entry ) @@ -220,10 +227,10 @@ wxMenuItemCocoaImpl::~wxMenuItemCocoaImpl() wxMenuItemImpl* wxMenuItemImpl::Create( wxMenuItem* peer, wxMenu *pParentMenu, - int id, + int WXUNUSED(id), const wxString& text, wxAcceleratorEntry *entry, - const wxString& strHelp, + const wxString& WXUNUSED(strHelp), wxItemKind kind, wxMenu *pSubMenu ) {