x_activate_menubar (struct frame *f)
{
#ifdef NS_IMPL_COCOA
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
ns_update_menubar (f, true, nil);
ns_check_pending_open_menu ();
#endif
-#endif
}
frame = f;
}
-#ifdef NS_IMPL_COCOA
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
-extern NSString *NSMenuDidBeginTrackingNotification;
-#endif
-#endif
-
#ifdef NS_IMPL_COCOA
-(void)trackingNotification:(NSNotification *)notification
{
/* Update menu in menuNeedsUpdate only while tracking menus. */
trackingMenu = ([notification name] == NSMenuDidBeginTrackingNotification
? 1 : 0);
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
if (! trackingMenu) ns_check_menu_open (nil);
-#endif
}
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
- (void)menuWillOpen:(NSMenu *)menu
{
++trackingMenu;
{
--trackingMenu;
}
-#endif /* OSX >= 10.5 */
#endif /* NS_IMPL_COCOA */
if (trackingMenu == 0)
return;
/*fprintf (stderr, "Updating menu '%s'\n", [[self title] UTF8String]); NSLog (@"%@\n", event); */
-#if (! defined (NS_IMPL_COCOA) \
- || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5)
+#ifdef NS_IMPL_GNUSTEP
/* Don't know how to do this for anything other than OSX >= 10.5
This is wrong, as it might run Lisp code in the event loop. */
ns_update_menubar (frame, true, self);