osx_notifications: Remove availability and SDK checks

Targeting 10.10, NSUserNotificationCenter will always be available so
there is no need to guard these calls.
This commit is contained in:
Marvin Scholz 2018-02-14 22:11:59 +01:00
parent 1fe5c1e3b1
commit 04edeb6ba8
1 changed files with 0 additions and 22 deletions

View File

@ -60,8 +60,6 @@
* Preamble
*****************************************************************************/
#pragma clang diagnostic ignored "-Wunguarded-availability"
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@ -274,9 +272,6 @@ static int InputCurrent( vlc_object_t *p_this, const char *psz_var,
- (void)dealloc
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpartial-availability"
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
// Clear the remaining lastNotification in Notification Center, if any
@autoreleasepool {
if (lastNotification && hasNativeNotifications) {
@ -286,8 +281,6 @@ static int InputCurrent( vlc_object_t *p_this, const char *psz_var,
}
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
#endif
#pragma clang diagnostic pop
// Release everything
[applicationName release];
@ -311,15 +304,10 @@ static int InputCurrent( vlc_object_t *p_this, const char *psz_var,
[GrowlApplicationBridge setGrowlDelegate:self];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpartial-availability"
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
if (hasNativeNotifications) {
[[NSUserNotificationCenter defaultUserNotificationCenter]
setDelegate:(id<NSUserNotificationCenterDelegate>)self];
}
#endif
#pragma clang diagnostic pop
}
}
@ -383,9 +371,6 @@ static int InputCurrent( vlc_object_t *p_this, const char *psz_var,
clickContext:nil
identifier:@"VLCNowPlayingNotification"];
} else if (hasNativeNotifications) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpartial-availability"
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
// Make the OS X notification and string
NSUserNotification *notification = [NSUserNotification new];
NSString *desc = nil;
@ -407,8 +392,6 @@ static int InputCurrent( vlc_object_t *p_this, const char *psz_var,
[notification setValue:@(YES) forKey:@"_showsButtons"];
[NSUserNotificationCenter.defaultUserNotificationCenter deliverNotification:notification];
[notification release];
#endif
#pragma clang diagnostic pop
}
// Release stuff
@ -436,9 +419,6 @@ static int InputCurrent( vlc_object_t *p_this, const char *psz_var,
isInForeground = NO;
}
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpartial-availability"
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
- (void)userNotificationCenter:(NSUserNotificationCenter *)center
didActivateNotification:(NSUserNotification *)notification
{
@ -459,6 +439,4 @@ static int InputCurrent( vlc_object_t *p_this, const char *psz_var,
[notification retain];
lastNotification = notification;
}
#endif
#pragma clang diagnostic pop
@end