diff -r 50b4e544c163 -r 2b8c8f16421e hedgewars/SDLMain.m --- a/hedgewars/SDLMain.m Fri Dec 18 02:47:28 2009 +0000 +++ b/hedgewars/SDLMain.m Sat Dec 19 19:37:30 2009 +0000 @@ -64,10 +64,10 @@ @end #endif -@interface NSApplication (SDLApplication) +@interface SDLApplication : NSApplication @end -@implementation NSApplication (SDLApplication) +@implementation SDLApplication /* Invoked from the Quit menu item */ - (void)terminate:(id)sender { @@ -119,6 +119,7 @@ if ([menuItem hasSubmenu]) [self fixMenu:[menuItem submenu] withAppName:appName]; } + [ aMenu sizeToFit ]; } #else @@ -201,7 +202,7 @@ SDLMain *sdlMain; /* Ensure the application object is initialised */ - [NSApplication sharedApplication]; + [SDLApplication sharedApplication]; #ifdef SDL_USE_CPS { @@ -210,7 +211,7 @@ if (!CPSGetCurrentProcess(&PSN)) if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103)) if (!CPSSetFrontProcess(&PSN)) - [NSApplication sharedApplication]; + [SDLApplication sharedApplication]; } #endif /* SDL_USE_CPS */ @@ -372,6 +373,7 @@ } #if SDL_USE_NIB_FILE + [SDLApplication poseAsClass:[NSApplication class]]; NSApplicationMain (argc, argv); #else CustomApplicationMain (argc, argv);