diff options
author | Teddy Wing | 2023-09-30 02:19:15 +0200 |
---|---|---|
committer | Teddy Wing | 2023-09-30 02:19:15 +0200 |
commit | 018811d6fb170946796eb7934fcdb16327dbae36 (patch) | |
tree | 9498e0ac177e41d649b87c3a77058dc12e5a9ffb /src | |
parent | 1a05118fca75f4f45579b3eecebe17fffb6a76ef (diff) | |
download | Base-Windowed-Application-018811d6fb170946796eb7934fcdb16327dbae36.tar.bz2 |
MainMenu: Keep getting application name at runtime
Originally, I hoped to include the application name from the Makefile at
compile time, but that ended up being thorny due to application names
with spaces and escaping concerns. Then I tried putting the application
name in a constant, but didn't like that this required duplicating it in
yet another place.
Ultimately I've decided to stick with what I had originally, getting the
application name at runtime from the bundle's Info.plist dictionary.
Diffstat (limited to 'src')
-rw-r--r-- | src/MainMenu.m | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/MainMenu.m b/src/MainMenu.m index 229ac10..dc9b8a6 100644 --- a/src/MainMenu.m +++ b/src/MainMenu.m @@ -1,7 +1,5 @@ #import "MainMenu.h" -static const NSString *kAppName = @"Base Windowed Application"; - NSMenuItem *MainMenuCreateApplicationMenuItem(); NSMenuItem *MainMenuCreateFileMenuItem(); NSMenuItem *MainMenuCreateEditMenuItem(); @@ -48,9 +46,6 @@ NSMenu *MainMenuCreate() NSString *MainMenuGetApplicationName() { - NSLog(@"App name: %@", kAppName); - - // TODO: #define this from the Makefile NSString *application_name = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; if (!application_name) { |