aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2023-09-30 02:10:41 +0200
committerTeddy Wing2023-09-30 02:10:41 +0200
commit1a05118fca75f4f45579b3eecebe17fffb6a76ef (patch)
tree680c65fe39fdb19e72189c45b259aa00ae04a3a8
parent17ecda6af3611a5e0c19b16b5a3592695aaea544 (diff)
downloadBase-Windowed-Application-1a05118fca75f4f45579b3eecebe17fffb6a76ef.tar.bz2
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.
-rw-r--r--Makefile1
-rw-r--r--src/MainMenu.m4
2 files changed, 2 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index df1cb72..cfa25a1 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,6 @@ LOCALIZABLE_STRINGS := $(shell find Internationalization -name Localizable.strin
CFLAGS += -x objective-c
CFLAGS += -Wall -Werror
-CFLAGS += -DMK_APP_NAME="@\"$(APP_NAME)\""
LDFLAGS += -framework Cocoa
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]