[vlc-commits] [Git][videolan/vlc][master] 2 commits: macosx: Constify references in placeholder audio view empty presentation

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Apr 18 13:39:23 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
88eb8a8e by Claudio Cambra at 2023-04-18T13:05:14+00:00
macosx: Constify references in placeholder audio view empty presentation

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -
af630c70 by Claudio Cambra at 2023-04-18T13:05:14+00:00
macosx: Actually run placeholder setup during audio view controller setup

Signed-off-by: Claudio Cambra <developer at claudiocambra.com>

- - - - -


1 changed file:

- modules/gui/macosx/library/audio-library/VLCLibraryAudioViewController.m


Changes:

=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioViewController.m
=====================================
@@ -77,6 +77,7 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
         _audioGroupLibraryTableViewDelegate = [[VLCLibraryAudioGroupTableViewDelegate alloc] init];
         _splitViewDelegate = [[VLCLibraryTwoPaneSplitViewDelegate alloc] init];
 
+        [self setupAudioPlaceholderView];
         [self setupAudioCollectionView];
         [self setupGridModeSplitView];
         [self setupAudioTableViews];
@@ -294,14 +295,14 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
 
 - (void)presentPlaceholderAudioView
 {
-    for (NSLayoutConstraint *constraint in _libraryWindow.libraryVideoViewController.videoPlaceholderImageViewSizeConstraints) {
+    for (NSLayoutConstraint * const constraint in _libraryWindow.libraryVideoViewController.videoPlaceholderImageViewSizeConstraints) {
         constraint.active = NO;
     }
-    for (NSLayoutConstraint *constraint in _audioPlaceholderImageViewSizeConstraints) {
+    for (NSLayoutConstraint * const constraint in _audioPlaceholderImageViewSizeConstraints) {
         constraint.active = YES;
     }
 
-    NSInteger selectedLibrarySegment = _audioSegmentedControl.selectedSegment;
+    const NSInteger selectedLibrarySegment = _audioSegmentedControl.selectedSegment;
 
     if(selectedLibrarySegment < _placeholderImageNames.count && selectedLibrarySegment >= 0) {
         _placeholderImageView.image = [NSImage imageNamed:_placeholderImageNames[selectedLibrarySegment]];
@@ -313,7 +314,7 @@ NSString *VLCLibraryPlaceholderAudioViewIdentifier = @"VLCLibraryPlaceholderAudi
 
     _emptyLibraryView.translatesAutoresizingMaskIntoConstraints = NO;
     _libraryTargetView.subviews = @[_emptyLibraryView];
-    NSDictionary *dict = NSDictionaryOfVariableBindings(_emptyLibraryView);
+    NSDictionary * const dict = NSDictionaryOfVariableBindings(_emptyLibraryView);
     [_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_emptyLibraryView(>=572.)]|" options:0 metrics:0 views:dict]];
     [_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_emptyLibraryView(>=444.)]|" options:0 metrics:0 views:dict]];
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/942fe445288fb0120d1a4d413f5b4b5dd2415213...af630c7010ba29431a8a4da9cc24e09ccd06e241

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/942fe445288fb0120d1a4d413f5b4b5dd2415213...af630c7010ba29431a8a4da9cc24e09ccd06e241
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