diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-06-14 15:34:05 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-06-14 15:36:05 +0300 |
commit | 9cefd5612d9a74f821fdb0d5fdaa50ad180f54c7 (patch) | |
tree | cf3ca38aadba20d1d8ed42a8c52f102ddcdd1179 /intern/ghost | |
parent | eb0310950c9e6dec9ea1da294430ae8fcf98021e (diff) |
GHost: Attempt to fix compilation error on older OSX systems
The issue was caused by using NotificationCenter which is only available
since 10.9 so trying to build blender on OSX with 10.7 SDK would fail.
Now it should be possible to build blender with SDK 10.7 and at the same
time official builds should still be doing proper weak-linking to a
notification center.
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCocoa.mm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index 65d371c8ca8..f1f38cc14b3 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -1328,6 +1328,7 @@ GHOST_TSuccess GHOST_WindowCocoa::setProgressBar(float progress) return GHOST_kSuccess; } +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 static void postNotification() { NSUserNotification *notification = [[NSUserNotification alloc] init]; @@ -1337,7 +1338,8 @@ static void postNotification() [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification]; [notification release]; } - +#endif + GHOST_TSuccess GHOST_WindowCocoa::endProgressBar() { if (!m_progressBarVisible) return GHOST_kFailure; @@ -1355,11 +1357,12 @@ GHOST_TSuccess GHOST_WindowCocoa::endProgressBar() // With OSX 10.8 and later, we can use notifications to inform the user when the progress reached 100% // Atm. just fire this when the progressbar ends, the behavior is controlled in the NotificationCenter // If Blender is not frontmost window, a message pops up with sound, in any case an entry in notifications - +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 if ([NSUserNotificationCenter respondsToSelector:@selector(defaultUserNotificationCenter)]) { postNotification(); } - +#endif + [dockIcon release]; [pool drain]; |