From 1a05118fca75f4f45579b3eecebe17fffb6a76ef Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 30 Sep 2023 02:10:41 +0200 Subject: MainMenu: Move application name to a constant Switch to a constant-stored application name from the Makefile-defined one. This makes it easier to render the application name without worrying about escaping differences between the Makefile and Objective-C. But I still don't like it compared to what I had before. --- src/MainMenu.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/MainMenu.m') diff --git a/src/MainMenu.m b/src/MainMenu.m index 0dff780..229ac10 100644 --- a/src/MainMenu.m +++ b/src/MainMenu.m @@ -1,6 +1,6 @@ #import "MainMenu.h" -#define AppName MK_APP_NAME +static const NSString *kAppName = @"Base Windowed Application"; NSMenuItem *MainMenuCreateApplicationMenuItem(); NSMenuItem *MainMenuCreateFileMenuItem(); @@ -48,7 +48,7 @@ NSMenu *MainMenuCreate() NSString *MainMenuGetApplicationName() { - NSLog(@"App name: %@", AppName); + NSLog(@"App name: %@", kAppName); // TODO: #define this from the Makefile NSString *application_name = [[NSBundle mainBundle] -- cgit v1.2.3