mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
[mac] Add fallback for app name
This commit is contained in:
@@ -61,6 +61,9 @@
|
||||
case AppMenu:
|
||||
{
|
||||
NSString *appName = [NSRunningApplication currentApplication].localizedName;
|
||||
if( appName == nil ) {
|
||||
appName = [[NSProcessInfo processInfo] processName];
|
||||
}
|
||||
WailsMenu *appMenu = [[WailsMenu new] initWithNSTitle:appName];
|
||||
id quitTitle = [@"Quit " stringByAppendingString:appName];
|
||||
NSMenuItem* quitMenuItem = [self newMenuItem:quitTitle :@selector(Quit) :@"q" :NSEventModifierFlagCommand];
|
||||
|
||||
Reference in New Issue
Block a user