From 7d5468ace3bedecafeda7a399e13ac500103bc42 Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Mon, 30 Jul 2018 18:00:38 +1000 Subject: 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) --- osdep/macosx_menubar.m | 4 ++-- 1 file 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]; } } } -- cgit v1.2.3