summaryrefslogtreecommitdiff
path: root/platform/osx/godot_osx.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/osx/godot_osx.mm')
-rw-r--r--platform/osx/godot_osx.mm20
1 files changed, 10 insertions, 10 deletions
diff --git a/platform/osx/godot_osx.mm b/platform/osx/godot_osx.mm
index 0c32016216..02a1382b1a 100644
--- a/platform/osx/godot_osx.mm
+++ b/platform/osx/godot_osx.mm
@@ -50,7 +50,7 @@ static NSString *getApplicationName(void)
dict = (const NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle());
if (dict)
appName = [dict objectForKey: @"CFBundleName"];
-
+
if (![appName length])
appName = [[NSProcessInfo processInfo] processName];
@@ -67,10 +67,10 @@ static void setApplicationMenu(void)
NSMenuItem *menuItem;
NSString *title;
NSString *appName;
-
+
appName = getApplicationName();
appleMenu = [[NSMenu alloc] initWithTitle:@""];
-
+
/* Add menu items */
title = [@"About " stringByAppendingString:appName];
[appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
@@ -90,7 +90,7 @@ static void setApplicationMenu(void)
title = [@"Quit " stringByAppendingString:appName];
[appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"];
-
+
/* Put menu into the menubar */
menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
[menuItem setSubmenu:appleMenu];
@@ -112,17 +112,17 @@ static void setupWindowMenu(void)
NSMenuItem *menuItem;
windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
-
+
/* "Minimize" item */
menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"];
[windowMenu addItem:menuItem];
[menuItem release];
-
+
/* Put menu into the menubar */
windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""];
[windowMenuItem setSubmenu:windowMenu];
[[NSApp mainMenu] addItem:windowMenuItem];
-
+
/* Tell the application object that this is now the window menu */
[NSApp setWindowsMenu:windowMenu];
@@ -139,7 +139,7 @@ static void CustomApplicationMain (int argc, char **argv)
/* Ensure the application object is initialised */
[NSApplication sharedApplication];
-
+
/* Set up the menubar */
[NSApp setMainMenu:[[NSMenu alloc] init]];
setApplicationMenu();
@@ -147,10 +147,10 @@ static void CustomApplicationMain (int argc, char **argv)
main = [[main alloc] init];
[NSApp setDelegate:main];
-
+
/* Start the main event loop */
[NSApp run];
-
+
[main release];
[pool release];
}