1
mirror of https://github.com/mpv-player/mpv synced 2024-10-30 04:46:41 +01:00

osx: Fix initialization and access of service menu

Replace dot syntax with accessor syntax so that clang no longer errors
out due to not finding the property servicesMenu on NSApp.
This commit is contained in:
Michael Hoang 2018-07-30 18:00:38 +10:00 committed by sfan5
parent 049816c145
commit 4e9e46b9f8

View File

@ -602,7 +602,7 @@
- (NSMenu *)mainMenu - (NSMenu *)mainMenu
{ {
NSMenu *mainMenu = [[NSMenu alloc] initWithTitle:@"MainMenu"]; NSMenu *mainMenu = [[NSMenu alloc] initWithTitle:@"MainMenu"];
NSApp.servicesMenu = [NSMenu alloc]; [NSApp setServicesMenu:[[NSMenu alloc] init]];
for(id mMenu in menuTree) { for(id mMenu in menuTree) {
NSMenu *menu = [[NSMenu alloc] initWithTitle:mMenu[@"name"]]; NSMenu *menu = [[NSMenu alloc] initWithTitle:mMenu[@"name"]];
@ -633,7 +633,7 @@
} }
if ([subMenu[@"name"] isEqual:@"Services"]) { if ([subMenu[@"name"] isEqual:@"Services"]) {
iItem.submenu = NSApp.servicesMenu; iItem.submenu = [NSApp servicesMenu];
} }
} }
} }