[vlc-commits] osx_notifications: Remove availability and SDK checks
Marvin Scholz
git at videolan.org
Wed Feb 14 22:18:37 CET 2018
vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Wed Feb 14 22:11:59 2018 +0100| [04edeb6ba8e48b52d03028a249c05bfe2c3cbecc] | committer: Marvin Scholz
osx_notifications: Remove availability and SDK checks
Targeting 10.10, NSUserNotificationCenter will always be available so
there is no need to guard these calls.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=04edeb6ba8e48b52d03028a249c05bfe2c3cbecc
---
modules/notify/osx_notifications.m | 22 ----------------------
1 file changed, 22 deletions(-)
diff --git a/modules/notify/osx_notifications.m b/modules/notify/osx_notifications.m
index e4b8f516ab..8413b2391c 100644
--- a/modules/notify/osx_notifications.m
+++ b/modules/notify/osx_notifications.m
@@ -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
More information about the vlc-commits
mailing list