summaryrefslogtreecommitdiff
path: root/vcl/osx/salmenu.cxx
diff options
context:
space:
mode:
authorDouglas Mencken <dougmencken@gmail.com>2014-02-24 15:00:31 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-02-25 00:00:31 +0000
commit553473945b6789cb757ec69aabba6b87c4854916 (patch)
treeda8898d582ad6f5a1bc4f86060631e1c3c33db98 /vcl/osx/salmenu.cxx
parent8978f494e8ef0cb3faebd200f982e3b6db267118 (diff)
vcl/osx/sal: SDK 10.5 compatibility
NSWindowDelegate and NSMenuDelegate protocols, IOPMAssertion* are available only in OS X v10.6 and later. Change-Id: Icda4b8014d9a6dde2284b9f5df493eb470fb79fc Reviewed-on: https://gerrit.libreoffice.org/8211 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'vcl/osx/salmenu.cxx')
-rw-r--r--vcl/osx/salmenu.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx
index 7912825bddaf..b3a1736bd3ee 100644
--- a/vcl/osx/salmenu.cxx
+++ b/vcl/osx/salmenu.cxx
@@ -253,7 +253,11 @@ AquaSalMenu::AquaSalMenu( bool bMenuBar ) :
if( ! mbMenuBar )
{
mpMenu = [[SalNSMenu alloc] initWithMenu: this];
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
+ objc_msgSend(mpMenu, @selector(setDelegate:), mpMenu);
+#else
[mpMenu setDelegate: (id<NSMenuDelegate>)mpMenu];
+#endif
}
else
{