[vlc-commits] [Git][videolan/vlc][master] 2 commits: macosx: consistently use . in availability check

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Thu Aug 4 13:45:13 UTC 2022



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
726f58f9 by Marvin Scholz at 2022-08-04T12:47:53+00:00
macosx: consistently use . in availability check

Even though _ seems to work as well, it is weirder to read
and all documentation suggests to use a . here.

- - - - -
eeb078dd by Marvin Scholz at 2022-08-04T12:47:53+00:00
macosx: NSView+VLCAdditions: remove no-break space

- - - - -


4 changed files:

- modules/gui/macosx/extensions/NSView+VLCAdditions.m
- modules/gui/macosx/library/VLCLibraryCollectionViewItem.m
- modules/gui/macosx/library/VLCLibraryWindow.m
- modules/gui/macosx/media-source/VLCMediaSourceCollectionViewItem.m


Changes:

=====================================
modules/gui/macosx/extensions/NSView+VLCAdditions.m
=====================================
@@ -29,8 +29,8 @@
 
 - (BOOL)shouldShowDarkAppearance
 {
-    if (@available(macOS 10_14, *)) {
-        if ([self.effectiveAppearance.name isEqualToString:NSAppearanceNameDarkAqua] || 
+    if (@available(macOS 10.14, *)) {
+        if ([self.effectiveAppearance.name isEqualToString:NSAppearanceNameDarkAqua] ||
         [self.effectiveAppearance.name isEqualToString:NSAppearanceNameVibrantDark]) {
             return YES;
         }


=====================================
modules/gui/macosx/library/VLCLibraryCollectionViewItem.m
=====================================
@@ -68,7 +68,7 @@ const CGFloat VLCLibraryCollectionViewItemMaximumDisplayedProgress = 0.95;
 - (void)dealloc
 {
     [[NSNotificationCenter defaultCenter] removeObserver:self];
-    if (@available(macOS 10_14, *)) {
+    if (@available(macOS 10.14, *)) {
         [[NSApplication sharedApplication] removeObserver:self forKeyPath:@"effectiveAppearance"];
     }
 }
@@ -84,7 +84,7 @@ const CGFloat VLCLibraryCollectionViewItemMaximumDisplayedProgress = 0.95;
     self.unplayedIndicatorTextField.font = [NSFont VLClibraryHighlightCellHighlightLabelFont];
     self.unplayedIndicatorTextField.textColor = [NSColor VLClibraryHighlightColor];
 
-    if (@available(macOS 10_14, *)) {
+    if (@available(macOS 10.14, *)) {
         [[NSApplication sharedApplication] addObserver:self
                                             forKeyPath:@"effectiveAppearance"
                                                options:0


=====================================
modules/gui/macosx/library/VLCLibraryWindow.m
=====================================
@@ -237,7 +237,7 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
                                name:VLCConfigurationChangedNotification
                              object:nil];
 
-    if (@available(macOS 10_14, *)) {
+    if (@available(macOS 10.14, *)) {
         [[NSApplication sharedApplication] addObserver:self
                                             forKeyPath:@"effectiveAppearance"
                                                options:0
@@ -393,7 +393,7 @@ static void addShadow(NSImageView *__unsafe_unretained imageView)
 - (void)dealloc
 {
     [[NSNotificationCenter defaultCenter] removeObserver:self];
-    if (@available(macOS 10_14, *)) {
+    if (@available(macOS 10.14, *)) {
         [[NSApplication sharedApplication] removeObserver:self forKeyPath:@"effectiveAppearance"];
     }
 


=====================================
modules/gui/macosx/media-source/VLCMediaSourceCollectionViewItem.m
=====================================
@@ -52,7 +52,7 @@ NSString *VLCMediaSourceCellIdentifier = @"VLCLibraryCellIdentifier";
 - (void)dealloc
 {
     [[NSNotificationCenter defaultCenter] removeObserver:self];
-    if (@available(macOS 10_14, *)) {
+    if (@available(macOS 10.14, *)) {
         [[NSApplication sharedApplication] removeObserver:self forKeyPath:@"effectiveAppearance"];
     }
 }
@@ -64,7 +64,7 @@ NSString *VLCMediaSourceCellIdentifier = @"VLCLibraryCellIdentifier";
     self.annotationTextField.textColor = [NSColor VLClibraryAnnotationColor];
     self.annotationTextField.backgroundColor = [NSColor VLClibraryAnnotationBackgroundColor];
 
-    if (@available(macOS 10_14, *)) {
+    if (@available(macOS 10.14, *)) {
         [[NSApplication sharedApplication] addObserver:self
                                             forKeyPath:@"effectiveAppearance"
                                                options:0



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/eb06aa442c47819ffa2c38b96ed28e6e256bcf51...eeb078dd0a2aa1fbb6be97f4ab39fa2835a8347c

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/eb06aa442c47819ffa2c38b96ed28e6e256bcf51...eeb078dd0a2aa1fbb6be97f4ab39fa2835a8347c
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list