summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Hoang <enzime@users.noreply.github.com>2018-07-30 18:00:38 +1000
committersfan5 <sfan5@live.de>2018-08-11 13:00:08 +0200
commit4e9e46b9f8871f46de3e1a192cbcb02d54ba0d52 (patch)
tree07d5e59f02c96ec8bc35151addd245d1f42d0bb6
parent049816c1451449932f1ed2047f6643d7c7ac8a63 (diff)
downloadmpv-4e9e46b9f8871f46de3e1a192cbcb02d54ba0d52.tar.bz2
mpv-4e9e46b9f8871f46de3e1a192cbcb02d54ba0d52.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.
-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];
}
}
}