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

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Mon Jun 29 09:09:25 UTC 2026



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


Commits:
3a245825 by Serhii Bykov at 2026-06-29T10:51:30+02:00
macosx: remove dead macOS 10.12/10.13 availability checks in library

- - - - -


7 changed files:

- modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m
- modules/gui/macosx/library/VLCLibraryCollectionViewMediaItemListSupplementaryDetailView.m
- modules/gui/macosx/library/VLCLibraryCollectionViewMediaItemSupplementaryDetailView.m
- modules/gui/macosx/library/VLCLibraryHeaderView.m
- modules/gui/macosx/library/VLCLibraryWindow.m
- modules/gui/macosx/library/VLCLibraryWindowSidebarRootViewController.m
- modules/gui/macosx/library/audio-library/VLCLibraryAudioViewController.m


Changes:

=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewFlowLayout.m
=====================================
@@ -311,11 +311,9 @@ static CVReturn detailViewAnimationCallback(CVDisplayLinkRef displayLink,
         NSCollectionViewLayoutAttributes * const attributes = layoutAttributesArray[i].copy;
         NSString * const elementKind = attributes.representedElementKind;
 
-        if (@available(macOS 10.12, *)) {
-            if (([elementKind isEqualToString:NSCollectionElementKindSectionHeader] && self.sectionHeadersPinToVisibleBounds) ||
-                ([elementKind isEqualToString:NSCollectionElementKindSectionFooter] && self.sectionFootersPinToVisibleBounds)) {
-                continue;
-            }
+        if (([elementKind isEqualToString:NSCollectionElementKindSectionHeader] && self.sectionHeadersPinToVisibleBounds) ||
+            ([elementKind isEqualToString:NSCollectionElementKindSectionFooter] && self.sectionFootersPinToVisibleBounds)) {
+            continue;
         }
 
         [attributes setFrame:[self frameForDisplacedAttributes:attributes]];


=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewMediaItemListSupplementaryDetailView.m
=====================================
@@ -80,9 +80,7 @@ NSCollectionViewSupplementaryElementKind const VLCLibraryCollectionViewMediaItem
         self.secondaryDetailTextButton.contentTintColor = NSColor.secondaryLabelColor;
     }
 
-    if(@available(macOS 10.12.2, *)) {
-        self.playButton.bezelColor = NSColor.VLCAccentColor;
-    }
+    self.playButton.bezelColor = NSColor.VLCAccentColor;
 
     NSNotificationCenter * const notificationCenter = NSNotificationCenter.defaultCenter;
     [notificationCenter addObserver:self


=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewMediaItemSupplementaryDetailView.m
=====================================
@@ -68,9 +68,7 @@ NSCollectionViewSupplementaryElementKind const VLCLibraryCollectionViewMediaItem
         _mediaItemSecondaryDetailButton.contentTintColor = NSColor.secondaryLabelColor;
     }
 
-    if(@available(macOS 10.12.2, *)) {
-        _playMediaItemButton.bezelColor = NSColor.VLCAccentColor;
-    }
+    _playMediaItemButton.bezelColor = NSColor.VLCAccentColor;
 }
 
 - (NSString *)formattedYearAndDurationAndTypeString


=====================================
modules/gui/macosx/library/VLCLibraryHeaderView.m
=====================================
@@ -244,16 +244,7 @@ NSString * const VLCLibraryHeaderViewIdentifier = @"VLCLibraryHeaderView";
 
 - (NSTextField *)buildLabelWithFont:(NSFont *)font textColor:(NSColor *)color alignment:(NSTextAlignment)alignment
 {
-    NSTextField *label;
-    if (@available(macOS 10.12, *)) {
-        label = [NSTextField labelWithString:@""];
-    } else {
-        label = [[NSTextField alloc] initWithFrame:NSZeroRect];
-        label.editable = NO;
-        label.bezeled = NO;
-        label.drawsBackground = NO;
-        label.selectable = NO;
-    }
+    NSTextField *label = [NSTextField labelWithString:@""];
     label.font = font;
     label.textColor = color;
     label.alignment = alignment;
@@ -264,15 +255,7 @@ NSString * const VLCLibraryHeaderViewIdentifier = @"VLCLibraryHeaderView";
 
 - (NSButton *)buildActionButtonWithTitle:(NSString *)title action:(SEL)selector
 {
-    NSButton *button;
-    if (@available(macOS 10.12, *)) {
-        button = [NSButton buttonWithTitle:title target:self action:selector];
-    } else {
-        button = [[NSButton alloc] initWithFrame:NSZeroRect];
-        button.title = title;
-        button.target = self;
-        button.action = selector;
-    }
+    NSButton *button = [NSButton buttonWithTitle:title target:self action:selector];
     button.bezelStyle = NSBezelStyleRounded;
     button.translatesAutoresizingMaskIntoConstraints = NO;
     if (@available(macOS 10.14, *))


=====================================
modules/gui/macosx/library/VLCLibraryWindow.m
=====================================
@@ -164,9 +164,7 @@ static int ShowController(vlc_object_t * __unused p_this,
     self.identifier = VLCLibraryWindowIdentifier;
     self.minSize = NSMakeSize(VLCLibraryWindowMinimalWidth, VLCLibraryWindowMinimalHeight);
 
-    if(@available(macOS 10.12, *)) {
-        self.tabbingMode = NSWindowTabbingModeDisallowed;
-    }
+    self.tabbingMode = NSWindowTabbingModeDisallowed;
 
     VLCMain *mainInstance = VLCMain.sharedInstance;
     _playQueueController = [mainInstance playQueueController];


=====================================
modules/gui/macosx/library/VLCLibraryWindowSidebarRootViewController.m
=====================================
@@ -81,9 +81,7 @@
 
     self.targetView.translatesAutoresizingMaskIntoConstraints = NO;
 
-    if (@available(macOS 10.13, *)) {
-        self.viewSelector.segmentDistribution = NSSegmentDistributionFillEqually;
-    }
+    self.viewSelector.segmentDistribution = NSSegmentDistributionFillEqually;
 
     [self setupViewSelectorSegments];
     [self updateViewSelectorState];


=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioViewController.m
=====================================
@@ -229,9 +229,7 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
     audioLibraryGridModeListSelectionCollectionViewLayout.headerReferenceSize =
         NSMakeSize(self.audioCollectionViewScrollView.documentView.frame.size.width, VLCLibraryHeaderViewHeight);
 
-    if (@available(macOS 10.12, *)) {
-        audioLibraryGridModeListSelectionCollectionViewLayout.sectionHeadersPinToVisibleBounds = YES;
-    }
+    audioLibraryGridModeListSelectionCollectionViewLayout.sectionHeadersPinToVisibleBounds = YES;
 
     [VLCLibraryAudioDataSource setupCollectionView:_audioLibraryGridModeSplitViewListSelectionCollectionView];
     [VLCLibraryAudioGroupDataSource setupCollectionView:_audioLibraryGridModeSplitViewListSelectionCollectionView];



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3a245825af1800060764b9309e5012c1de96b201

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3a245825af1800060764b9309e5012c1de96b201
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