X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/065e208ec09e3d08d51d9604497f92f53c210f93..96d665d24907c1cb4b0c8907541932647243b423:/src/cocoa/mbarman.mm?ds=sidebyside diff --git a/src/cocoa/mbarman.mm b/src/cocoa/mbarman.mm index 2eda41c0d4..74694bffdc 100644 --- a/src/cocoa/mbarman.mm +++ b/src/cocoa/mbarman.mm @@ -20,6 +20,7 @@ #include "wx/cocoa/mbarman.h" #include "wx/cocoa/autorelease.h" +#include "wx/cocoa/objc/objc_uniquifying.h" #import #import @@ -27,6 +28,12 @@ #import #import +// Declare setAppleMenu: in an NSApplication category since Tiger and later +// releases support it but don't declare it as it's considered deprecated. +@interface NSApplication(wxDeprecatedMethodsWeWantToUse) +- (void)setAppleMenu:(NSMenu *)menu; +@end + // ============================================================================ // wxMenuBarManagerObserver // ============================================================================ @@ -45,6 +52,7 @@ - (void)windowWillClose: (NSNotification *)notification; #endif // 0 @end // interface wxMenuBarManagerObserver : NSObject +WX_DECLARE_GET_OBJC_CLASS(wxMenuBarManagerObserver,NSObject) @implementation wxMenuBarManagerObserver : NSObject - (id)init @@ -94,6 +102,7 @@ #endif // 0 @end // implementation wxMenuBarManagerObserver : NSObject +WX_IMPLEMENT_GET_OBJC_CLASS(wxMenuBarManagerObserver,NSObject) // ============================================================================ // wxMenuBarManager @@ -102,7 +111,7 @@ wxMenuBarManager *wxMenuBarManager::sm_mbarmanInstance = NULL; wxMenuBarManager::wxMenuBarManager() { - m_observer = [[wxMenuBarManagerObserver alloc] + m_observer = [[WX_GET_OBJC_CLASS(wxMenuBarManagerObserver) alloc] initWithWxMenuBarManager:this]; [[NSNotificationCenter defaultCenter] addObserver:m_observer selector:@selector(windowDidBecomeKey:)