cleanup.
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
// Invoked from the Quit menu item.
|
// Invoked from the Quit menu item.
|
||||||
- (void)terminate:(id)sender
|
- (void)terminate:(id)sender
|
||||||
{
|
{
|
||||||
ArchHooks::SetUserQuit();
|
ArchHooks::SetUserQuit();
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)sendEvent:(NSEvent *)event
|
- (void)sendEvent:(NSEvent *)event
|
||||||
@@ -111,12 +111,12 @@ static void setupMenus( void )
|
|||||||
[item setKeyEquivalentModifierMask:NSAlternateKeyMask]; // opt-enter
|
[item setKeyEquivalentModifierMask:NSAlternateKeyMask]; // opt-enter
|
||||||
[windowMenu addItem:item];
|
[windowMenu addItem:item];
|
||||||
|
|
||||||
[[mainMenu addItemWithTitle:[appMenu title] action:NULL keyEquivalent:@""] setSubmenu:appMenu];
|
[[mainMenu addItemWithTitle:[appMenu title] action:NULL keyEquivalent:@""] setSubmenu:appMenu];
|
||||||
[[mainMenu addItemWithTitle:[windowMenu title] action:NULL keyEquivalent:@""] setSubmenu:windowMenu];
|
[[mainMenu addItemWithTitle:[windowMenu title] action:NULL keyEquivalent:@""] setSubmenu:windowMenu];
|
||||||
|
|
||||||
[NSApp setMainMenu:mainMenu];
|
[NSApp setMainMenu:mainMenu];
|
||||||
[NSApp setAppleMenu:appMenu]; // This isn't the apple menu, but it doesn't work without this.
|
[NSApp setAppleMenu:appMenu]; // This isn't the apple menu, but it doesn't work without this.
|
||||||
[NSApp setWindowsMenu:windowMenu];
|
[NSApp setWindowsMenu:windowMenu];
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef main
|
#undef main
|
||||||
@@ -125,27 +125,27 @@ int main( int argc, char **argv )
|
|||||||
{
|
{
|
||||||
RageThreadRegister guiThread( "GUI thread" );
|
RageThreadRegister guiThread( "GUI thread" );
|
||||||
|
|
||||||
[SMApplication poseAsClass:[NSApplication class]];
|
[SMApplication poseAsClass:[NSApplication class]];
|
||||||
|
|
||||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||||
SMMain *sm;
|
SMMain *sm;
|
||||||
|
|
||||||
// Ensure the application object is initialised, this sets NSApp.
|
// Ensure the application object is initialised, this sets NSApp.
|
||||||
[SMApplication sharedApplication];
|
[SMApplication sharedApplication];
|
||||||
|
|
||||||
// Set up NSException handler.
|
// Set up NSException handler.
|
||||||
NSSetUncaughtExceptionHandler( HandleNSException );
|
NSSetUncaughtExceptionHandler( HandleNSException );
|
||||||
|
|
||||||
// Set up the menubar.
|
// Set up the menubar.
|
||||||
setupMenus();
|
setupMenus();
|
||||||
|
|
||||||
// Create SDLMain and make it the app delegate.
|
// Create SDLMain and make it the app delegate.
|
||||||
sm = [[SMMain alloc] initWithArgc:argc argv:argv];
|
sm = [[SMMain alloc] initWithArgc:argc argv:argv];
|
||||||
[NSApp setDelegate:sm];
|
[NSApp setDelegate:sm];
|
||||||
|
|
||||||
[pool release];
|
[pool release];
|
||||||
// Start the main event loop.
|
// Start the main event loop.
|
||||||
[NSApp run];
|
[NSApp run];
|
||||||
[sm release];
|
[sm release];
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user