[vlc-commits] [Git][videolan/vlc][master] macosx: remove dead macOS 10.12/10.13 availability checks in misc utilities

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Sun Jun 28 14:33:01 UTC 2026



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
266f1fe0 by Serhii Bykov at 2026-06-28T16:22:33+02:00
macosx: remove dead macOS 10.12/10.13 availability checks in misc utilities

- - - - -


4 changed files:

- modules/gui/macosx/extensions/NSColor+VLCAdditions.m
- modules/gui/macosx/extensions/NSTextField+VLCAdditions.m
- modules/gui/macosx/imported/AppleRemote/AppleRemote.m
- modules/gui/macosx/playqueue/VLCPlayerController.m


Changes:

=====================================
modules/gui/macosx/extensions/NSColor+VLCAdditions.m
=====================================
@@ -110,11 +110,7 @@
 
 + (NSColor *)VLCSubtleBorderColor
 {
-    if (@available(macOS 10.13, *)) {
-        return [NSColor colorNamed:@"VLCSubtleBorderColor"];
-    }
-
-    return NSColor.VLCLightSubtleBorderColor;
+    return [NSColor colorNamed:@"VLCSubtleBorderColor"];
 }
 
 @end


=====================================
modules/gui/macosx/extensions/NSTextField+VLCAdditions.m
=====================================
@@ -26,20 +26,9 @@
 
 + (instancetype)defaultLabelWithString:(NSString *)stringValue
 {
-    if (@available(macOS 10.12, *)) {
-        NSTextField * const textField = [NSTextField wrappingLabelWithString:stringValue];
-        textField.translatesAutoresizingMaskIntoConstraints = NO;
-        textField.selectable = NO;
-        return textField;
-    }
-    NSTextField * const textField = [[NSTextField alloc] initWithFrame:NSZeroRect];
+    NSTextField * const textField = [NSTextField wrappingLabelWithString:stringValue];
     textField.translatesAutoresizingMaskIntoConstraints = NO;
-    textField.stringValue = stringValue;
-    textField.editable = NO;
     textField.selectable = NO;
-    textField.bordered = NO;
-    textField.drawsBackground = NO;
-    textField.lineBreakMode = NSLineBreakByWordWrapping;
     return textField;
 }
 


=====================================
modules/gui/macosx/imported/AppleRemote/AppleRemote.m
=====================================
@@ -103,10 +103,8 @@ const NSTimeInterval HOLD_RECOGNITION_TIME_INTERVAL=0.4;
             [mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:k2009RemoteButtonFullscreen] forKey:@"33_21_20_3_2_33_21_20_3_2_"];
             [mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteControl_Switched]     forKey:@"42_33_23_21_20_2_33_23_21_20_2_"];
 
-            if (@available(macOS 10.13, *)) {
-                [mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonVolume_Plus]    forKey:@"33_21_20_15_12_2_"];
-                [mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonVolume_Minus]   forKey:@"33_21_20_16_12_2_"];
-            }
+            [mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonVolume_Plus]    forKey:@"33_21_20_15_12_2_"];
+            [mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonVolume_Minus]   forKey:@"33_21_20_16_12_2_"];
         }
 
         _cookieToButtonMapping = [[NSDictionary alloc] initWithDictionary: mutableCookieToButtonMapping];


=====================================
modules/gui/macosx/playqueue/VLCPlayerController.m
=====================================
@@ -697,10 +697,8 @@ static int BossCallback(vlc_object_t *p_this,
 
 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
 {
-    if (@available(macOS 10.12.2, *)) {
-        _remoteControlService = [[VLCRemoteControlService alloc] init];
-        [_remoteControlService subscribeToRemoteCommands];
-    }
+    _remoteControlService = [[VLCRemoteControlService alloc] init];
+    [_remoteControlService subscribeToRemoteCommands];
 
     dispatch_async(dispatch_get_global_queue(QOS_CLASS_BACKGROUND, 0), ^{
         if (@available(macOS 10.15, *)) {
@@ -725,9 +723,7 @@ static int BossCallback(vlc_object_t *p_this,
     var_DelCallback(libvlc, "intf-boss", BossCallback, (__bridge void *)self);
 
     [self onPlaybackHasTruelyEnded:nil];
-    if (@available(macOS 10.12.2, *)) {
-        [_remoteControlService unsubscribeFromRemoteCommands];
-    }
+    [_remoteControlService unsubscribeFromRemoteCommands];
     if (_currentTitleList) {
         vlc_player_title_list_Release(_currentTitleList);
     }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/266f1fe08a8bce490c51d830262f0b965b12c698

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/266f1fe08a8bce490c51d830262f0b965b12c698
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list