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.
This commit is contained in:
parent
eb0310950c
commit
9cefd5612d
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue