summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Hoang <enzime@users.noreply.github.com>2018-07-30 18:00:38 +1000
committerJan Ekström <jeebjp@gmail.com>2018-09-29 22:22:20 +0300
commit7d5468ace3bedecafeda7a399e13ac500103bc42 (patch)
tree64660dc788232c68f60b7211a7594b8b84cbfbc6
parenta4e7580c5a8bc3d25bb7ad0a1f52105c07b9dd82 (diff)
downloadmpv-7d5468ace3bedecafeda7a399e13ac500103bc42.tar.bz2
mpv-7d5468ace3bedecafeda7a399e13ac500103bc42.tar.xz
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. (cherry picked from commit 4e9e46b9f8871f46de3e1a192cbcb02d54ba0d52)
-rw-r--r--osdep/macosx_menubar.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/osdep/macosx_menubar.m b/osdep/macosx_menubar.m
index 931079a552..558a33a905 100644
--- a/osdep/macosx_menubar.m
+++ b/osdep/macosx_menubar.m
@@ -602,7 +602,7 @@
- (NSMenu *)mainMenu
{
NSMenu *mainMenu = [[NSMenu alloc] initWithTitle:@"MainMenu"];
- NSApp.servicesMenu = [NSMenu alloc];
+ [NSApp setServicesMenu:[[NSMenu alloc] init]];
for(id mMenu in menuTree) {
NSMenu *menu = [[NSMenu alloc] initWithTitle:mMenu[@"name"]];
@@ -633,7 +633,7 @@
}
if ([subMenu[@"name"] isEqual:@"Services"]) {
- iItem.submenu = NSApp.servicesMenu;
+ iItem.submenu = [NSApp servicesMenu];
}
}
}