Commit 23b959f1 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: rename tiled audio view controller

parent 8488a905
......@@ -162,7 +162,7 @@
7DE2F0442282C84A0040DD0A /* VLCLibraryAudioDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DE2F0432282C84A0040DD0A /* VLCLibraryAudioDataSource.m */; };
7DE2F0472282D5D10040DD0A /* VLCLibraryTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DE2F0462282D5D10040DD0A /* VLCLibraryTableCellView.m */; };
7DE7232E22A51F8D00D72616 /* VLCPositionFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DE7232D22A51F8D00D72616 /* VLCPositionFormatter.m */; };
7DE7E72F228C795B00D6EA38 /* VLCLibraryAlternativeAudioViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DE7E72E228C795B00D6EA38 /* VLCLibraryAlternativeAudioViewController.m */; };
7DE7E72F228C795B00D6EA38 /* VLCLibraryTiledAudioViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DE7E72E228C795B00D6EA38 /* VLCLibraryTiledAudioViewController.m */; };
7DE82E7922843781002D341A /* VLCLibraryAlbumTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DE82E7822843781002D341A /* VLCLibraryAlbumTableCellView.m */; };
7DE9C7DD220728420089108F /* VLCPlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DE9C7DC220728420089108F /* VLCPlayerController.m */; };
7DFBDCA82269E77500B700A5 /* VLCLibraryController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DFBDCA72269E77500B700A5 /* VLCLibraryController.m */; };
......@@ -565,8 +565,8 @@
7DE2F0482282D7980040DD0A /* VLCLibraryTableCellView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VLCLibraryTableCellView.xib; sourceTree = "<group>"; };
7DE7232C22A51F8C00D72616 /* VLCPositionFormatter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCPositionFormatter.h; sourceTree = "<group>"; };
7DE7232D22A51F8D00D72616 /* VLCPositionFormatter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCPositionFormatter.m; sourceTree = "<group>"; };
7DE7E72D228C795B00D6EA38 /* VLCLibraryAlternativeAudioViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryAlternativeAudioViewController.h; sourceTree = "<group>"; };
7DE7E72E228C795B00D6EA38 /* VLCLibraryAlternativeAudioViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryAlternativeAudioViewController.m; sourceTree = "<group>"; };
7DE7E72D228C795B00D6EA38 /* VLCLibraryTiledAudioViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryTiledAudioViewController.h; sourceTree = "<group>"; };
7DE7E72E228C795B00D6EA38 /* VLCLibraryTiledAudioViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryTiledAudioViewController.m; sourceTree = "<group>"; };
7DE82E7722843781002D341A /* VLCLibraryAlbumTableCellView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryAlbumTableCellView.h; sourceTree = "<group>"; };
7DE82E7822843781002D341A /* VLCLibraryAlbumTableCellView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryAlbumTableCellView.m; sourceTree = "<group>"; };
7DE82E7A228437AA002D341A /* VLCLibraryAlbumTableCellView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VLCLibraryAlbumTableCellView.xib; sourceTree = "<group>"; };
......@@ -1026,8 +1026,8 @@
7DBB7638227F3FBC002649E1 /* VLCLibraryCollectionViewSupplementaryElementView.m */,
7D713D302201AE350042BEB7 /* VLCLibraryWindow.h */,
7D713D312201AE350042BEB7 /* VLCLibraryWindow.m */,
7DE7E72D228C795B00D6EA38 /* VLCLibraryAlternativeAudioViewController.h */,
7DE7E72E228C795B00D6EA38 /* VLCLibraryAlternativeAudioViewController.m */,
7DE7E72D228C795B00D6EA38 /* VLCLibraryTiledAudioViewController.h */,
7DE7E72E228C795B00D6EA38 /* VLCLibraryTiledAudioViewController.m */,
7DFBDCA62269E77400B700A5 /* VLCLibraryController.h */,
7DFBDCA72269E77500B700A5 /* VLCLibraryController.m */,
7DFBDCA92269E77F00B700A5 /* VLCLibraryModel.h */,
......@@ -1767,7 +1767,7 @@
1C3113D31E508C6900D4DD76 /* VLCResumeDialogController.m in Sources */,
7D2FFA40227B8A5B0085D649 /* VLCLinearProgressIndicator.m in Sources */,
7DFBDCB1226A518400B700A5 /* VLCLibraryMenuController.m in Sources */,
7DE7E72F228C795B00D6EA38 /* VLCLibraryAlternativeAudioViewController.m in Sources */,
7DE7E72F228C795B00D6EA38 /* VLCLibraryTiledAudioViewController.m in Sources */,
1C3113D51E508C6900D4DD76 /* VLCTextfieldPanelController.m in Sources */,
7DFBDCAE2269ED0C00B700A5 /* VLCLibraryVideoDataSource.m in Sources */,
1C3113D71E508C6900D4DD76 /* VLCPopupPanelController.m in Sources */,
......
......@@ -54,8 +54,6 @@ libmacosx_plugin_la_SOURCES = \
gui/macosx/library/VLCInputItem.m \
gui/macosx/library/VLCLibraryAlbumTableCellView.h \
gui/macosx/library/VLCLibraryAlbumTableCellView.m \
gui/macosx/library/VLCLibraryAlternativeAudioViewController.h \
gui/macosx/library/VLCLibraryAlternativeAudioViewController.m \
gui/macosx/library/VLCLibraryAudioDataSource.h \
gui/macosx/library/VLCLibraryAudioDataSource.m \
gui/macosx/library/VLCLibraryCollectionViewItem.h \
......@@ -74,6 +72,8 @@ libmacosx_plugin_la_SOURCES = \
gui/macosx/library/VLCLibrarySortingMenuController.m \
gui/macosx/library/VLCLibraryTableCellView.h \
gui/macosx/library/VLCLibraryTableCellView.m \
gui/macosx/library/VLCLibraryTiledAudioViewController.h \
gui/macosx/library/VLCLibraryTiledAudioViewController.m \
gui/macosx/library/VLCLibraryVideoDataSource.h \
gui/macosx/library/VLCLibraryVideoDataSource.m \
gui/macosx/library/VLCLibraryWindow.h \
......
......@@ -510,12 +510,10 @@
</constraints>
</view>
<connections>
<outlet property="alternativeAudioCollectionView" destination="QAt-jP-zE7" id="269-UN-dfM"/>
<outlet property="alternativeAudioSegmentedControl" destination="8iI-b7-Eag" id="ZYQ-79-H8k"/>
<outlet property="alternativeAudioView" destination="k7f-ic-LrF" id="8Cp-d2-3UJ"/>
<outlet property="audioCollectionSelectionTableView" destination="LNt-ot-2wU" id="eJS-WZ-Ri7"/>
<outlet property="audioGroupSelectionTableView" destination="4ll-T2-J16" id="bjS-a8-ePC"/>
<outlet property="audioLibrarySplitView" destination="llh-BF-BEJ" id="Uri-tX-OQS"/>
<outlet property="audioSegmentedControl" destination="8iI-b7-Eag" id="ERG-nc-ziq"/>
<outlet property="clearPlaylistButton" destination="cih-xp-HmY" id="PoU-co-0kn"/>
<outlet property="clearPlaylistSeparator" destination="nAW-KH-ipk" id="Af9-fg-u7m"/>
<outlet property="controlsBar" destination="Uzf-Tf-H8x" id="n0G-92-F2Q"/>
......@@ -538,6 +536,8 @@
<outlet property="repeatPlaylistButton" destination="8zF-Wo-H79" id="6bH-HF-arx"/>
<outlet property="segmentedTitleControl" destination="W1M-0o-qYG" id="Gw1-T6-78k"/>
<outlet property="shufflePlaylistButton" destination="jg5-33-vH0" id="FV2-36-3lG"/>
<outlet property="tiledAudioCollectionView" destination="QAt-jP-zE7" id="xub-8L-KQV"/>
<outlet property="tiledAudioView" destination="k7f-ic-LrF" id="GIA-T1-rxU"/>
<outlet property="upNextLabel" destination="TET-5r-zHx" id="3oI-LK-NDP"/>
<outlet property="upNextSeparator" destination="qmL-Ar-cj1" id="GRX-ZE-2UG"/>
<outlet property="videoLibraryCollectionView" destination="B8x-e8-7zp" id="u1I-gn-IU1"/>
......@@ -569,7 +569,7 @@
<rect key="frame" x="0.0" y="498" width="242" height="310"/>
<clipView key="contentView" copiesOnScroll="NO" id="J5s-sy-il6">
<rect key="frame" x="0.0" y="0.0" width="242" height="310"/>
<autoresizingMask key="autoresizingMask"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView selectable="YES" id="hnE-Hj-MZo">
<rect key="frame" x="0.0" y="0.0" width="242" height="310"/>
......@@ -599,7 +599,7 @@
<rect key="frame" x="0.0" y="0.0" width="242" height="498"/>
<clipView key="contentView" copiesOnScroll="NO" id="OKa-dt-1yY">
<rect key="frame" x="0.0" y="0.0" width="242" height="498"/>
<autoresizingMask key="autoresizingMask"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView selectable="YES" id="B8x-e8-7zp">
<rect key="frame" x="0.0" y="0.0" width="242" height="498"/>
......@@ -781,7 +781,7 @@
<rect key="frame" x="0.0" y="0.0" width="500" height="302"/>
<clipView key="contentView" id="2oa-WL-dxA">
<rect key="frame" x="0.0" y="0.0" width="500" height="302"/>
<autoresizingMask key="autoresizingMask"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView id="QAt-jP-zE7">
<rect key="frame" x="0.0" y="0.0" width="500" height="302"/>
......
/*****************************************************************************
* VLCLibraryAlternativeAudioViewController.h: MacOS X interface module
* VLCLibraryTiledAudioViewController.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2019 VLC authors and VideoLAN
*
......@@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
@class VLCLibraryModel;
@interface VLCLibraryAlternativeAudioViewController : NSObject
@interface VLCLibraryTiledAudioViewController : NSObject
@property (readwrite, assign) NSCollectionView *collectionView;
@property (readwrite, assign) NSSegmentedControl *segmentedControl;
......
/*****************************************************************************
* VLCLibraryAlternativeAudioViewController.m: MacOS X interface module
* VLCLibraryTiledAudioViewController.m: MacOS X interface module
*****************************************************************************
* Copyright (C) 2019 VLC authors and VideoLAN
*
......@@ -20,7 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import "VLCLibraryAlternativeAudioViewController.h"
#import "VLCLibraryTiledAudioViewController.h"
#import "library/VLCLibraryModel.h"
#import "library/VLCLibraryCollectionViewItem.h"
......@@ -29,14 +29,14 @@
#import "extensions/NSString+Helpers.h"
#import "views/VLCImageView.h"
@interface VLCLibraryAlternativeAudioViewController () <NSCollectionViewDelegate, NSCollectionViewDataSource>
@interface VLCLibraryTiledAudioViewController () <NSCollectionViewDelegate, NSCollectionViewDataSource>
{
NSArray *_displayedCollection;
enum vlc_ml_parent_type _currentParentType;
}
@end
@implementation VLCLibraryAlternativeAudioViewController
@implementation VLCLibraryTiledAudioViewController
- (void)setupAppearance
{
......
......@@ -62,9 +62,9 @@ NS_ASSUME_NONNULL_BEGIN
@property (readwrite, weak) IBOutlet NSButton *repeatPlaylistButton;
@property (readwrite, weak) IBOutlet NSButton *shufflePlaylistButton;
@property (readwrite, weak) IBOutlet VLCRoundedCornerTextField *playlistCounterTextField;
@property (readwrite, weak) IBOutlet NSView *alternativeAudioView;
@property (readwrite, weak) IBOutlet NSCollectionView *alternativeAudioCollectionView;
@property (readwrite, weak) IBOutlet NSSegmentedControl *alternativeAudioSegmentedControl;
@property (readwrite, weak) IBOutlet NSView *tiledAudioView;
@property (readwrite, weak) IBOutlet NSCollectionView *tiledAudioCollectionView;
@property (readwrite, weak) IBOutlet NSSegmentedControl *audioSegmentedControl;
@property (readwrite, weak) IBOutlet NSButton *librarySortButton;
@property (readonly) BOOL nativeFullscreenMode;
......
......@@ -38,7 +38,7 @@
#import "library/VLCLibraryCollectionViewItem.h"
#import "library/VLCLibraryModel.h"
#import "library/VLCLibraryCollectionViewSupplementaryElementView.h"
#import "library/VLCLibraryAlternativeAudioViewController.h"
#import "library/VLCLibraryTiledAudioViewController.h"
#import "library/VLCLibrarySortingMenuController.h"
#import "media-source/VLCMediaSourceBaseDataSource.h"
......@@ -72,7 +72,7 @@ const CGFloat VLCLibraryWindowDefaultPlaylistWidth = 340.;
VLCLibraryGroupDataSource *_libraryAudioGroupDataSource;
VLCLibrarySortingMenuController *_librarySortingMenuController;
VLCMediaSourceBaseDataSource *_mediaSourceDataSource;
VLCLibraryAlternativeAudioViewController *_alternativeAudioViewController;
VLCLibraryTiledAudioViewController *_tiledAudioViewController;
VLCPlaylistSortingMenuController *_playlistSortingMenuController;
VLCPlaylistController *_playlistController;
......@@ -224,7 +224,7 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
_libraryAudioDataSource.libraryModel = mainInstance.libraryController.libraryModel;
_libraryAudioDataSource.collectionSelectionTableView = _audioCollectionSelectionTableView;
_libraryAudioDataSource.groupSelectionTableView = _audioGroupSelectionTableView;
_libraryAudioDataSource.segmentedControl = self.alternativeAudioSegmentedControl;
_libraryAudioDataSource.segmentedControl = self.audioSegmentedControl;
_audioCollectionSelectionTableView.dataSource = _libraryAudioDataSource;
_audioCollectionSelectionTableView.delegate = _libraryAudioDataSource;
_audioCollectionSelectionTableView.rowHeight = VLCLibraryWindowLargeRowHeight;
......@@ -249,11 +249,11 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
[self updateColorsBasedOnAppearance];
self.openMediaButton.title = _NS("Open media...");
_alternativeAudioViewController = [[VLCLibraryAlternativeAudioViewController alloc] init];
_alternativeAudioViewController.collectionView = self.alternativeAudioCollectionView;
_alternativeAudioViewController.segmentedControl = self.alternativeAudioSegmentedControl;
_alternativeAudioViewController.libraryModel = mainInstance.libraryController.libraryModel;
[_alternativeAudioViewController setupAppearance];
_tiledAudioViewController = [[VLCLibraryTiledAudioViewController alloc] init];
_tiledAudioViewController.collectionView = self.tiledAudioCollectionView;
_tiledAudioViewController.segmentedControl = self.audioSegmentedControl;
_tiledAudioViewController.libraryModel = mainInstance.libraryController.libraryModel;
[_tiledAudioViewController setupAppearance];
_mainSplitView.delegate = self;
_lastPlaylistWidthBeforeCollaps = VLCLibraryWindowDefaultPlaylistWidth;
......@@ -369,8 +369,8 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
if (_audioLibrarySplitView.superview != nil) {
[_audioLibrarySplitView removeFromSuperview];
}
if (_alternativeAudioView.superview != nil) {
[_alternativeAudioView removeFromSuperview];
if (_tiledAudioView.superview != nil) {
[_tiledAudioView removeFromSuperview];
}
if (_videoLibraryStackView.superview == nil) {
_videoLibraryStackView.translatesAutoresizingMaskIntoConstraints = NO;
......@@ -382,7 +382,7 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
[_videoLibraryCollectionView reloadData];
[_recentVideoLibraryCollectionView reloadData];
_librarySortButton.hidden = NO;
_alternativeAudioSegmentedControl.hidden = YES;
_audioSegmentedControl.hidden = YES;
break;
case 1:
......@@ -392,8 +392,8 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
if (_videoLibraryStackView.superview != nil) {
[_videoLibraryStackView removeFromSuperview];
}
if (_alternativeAudioView.superview != nil) {
[_alternativeAudioView removeFromSuperview];
if (_tiledAudioView.superview != nil) {
[_tiledAudioView removeFromSuperview];
}
if (_audioLibrarySplitView.superview == nil) {
_audioLibrarySplitView.translatesAutoresizingMaskIntoConstraints = NO;
......@@ -405,7 +405,7 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
[_libraryAudioDataSource reloadAppearance];
[_audioCollectionSelectionTableView reloadData];
_librarySortButton.hidden = NO;
_alternativeAudioSegmentedControl.hidden = NO;
_audioSegmentedControl.hidden = NO;
break;
case 2:
......@@ -418,16 +418,16 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
if (_audioLibrarySplitView.superview != nil) {
[_audioLibrarySplitView removeFromSuperview];
}
if (_alternativeAudioView.superview == nil) {
_alternativeAudioView.translatesAutoresizingMaskIntoConstraints = NO;
[_libraryTargetView addSubview:_alternativeAudioView];
NSDictionary *dict = NSDictionaryOfVariableBindings(_alternativeAudioView);
[_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_alternativeAudioView(>=572.)]|" options:0 metrics:0 views:dict]];
[_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_alternativeAudioView(>=444.)]|" options:0 metrics:0 views:dict]];
if (_tiledAudioView.superview == nil) {
_tiledAudioView.translatesAutoresizingMaskIntoConstraints = NO;
[_libraryTargetView addSubview:_tiledAudioView];
NSDictionary *dict = NSDictionaryOfVariableBindings(_tiledAudioView);
[_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_tiledAudioView(>=572.)]|" options:0 metrics:0 views:dict]];
[_libraryTargetView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_tiledAudioView(>=444.)]|" options:0 metrics:0 views:dict]];
}
[_alternativeAudioViewController reloadAppearance];
[_tiledAudioViewController reloadAppearance];
_librarySortButton.hidden = NO;
_alternativeAudioSegmentedControl.hidden = NO;
_audioSegmentedControl.hidden = NO;
break;
default:
......@@ -437,8 +437,8 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
if (_audioLibrarySplitView.superview != nil) {
[_audioLibrarySplitView removeFromSuperview];
}
if (_alternativeAudioView.superview != nil) {
[_alternativeAudioView removeFromSuperview];
if (_tiledAudioView.superview != nil) {
[_tiledAudioView removeFromSuperview];
}
if (_mediaSourceView.superview == nil) {
_mediaSourceView.translatesAutoresizingMaskIntoConstraints = NO;
......@@ -449,7 +449,7 @@ static int ShowController(vlc_object_t *p_this, const char *psz_variable,
}
_mediaSourceDataSource.mediaSourceMode = _segmentedTitleControl.selectedSegment == 3 ? VLCMediaSourceModeLAN : VLCMediaSourceModeInternet;
_librarySortButton.hidden = YES;
_alternativeAudioSegmentedControl.hidden = YES;
_audioSegmentedControl.hidden = YES;
break;
}
}
......
......@@ -459,8 +459,6 @@ modules/gui/macosx/library/VLCInputItem.h
modules/gui/macosx/library/VLCInputItem.m
modules/gui/macosx/library/VLCLibraryAlbumTableCellView.h
modules/gui/macosx/library/VLCLibraryAlbumTableCellView.m
modules/gui/macosx/library/VLCLibraryAlternativeAudioViewController.h
modules/gui/macosx/library/VLCLibraryAlternativeAudioViewController.m
modules/gui/macosx/library/VLCLibraryAudioDataSource.h
modules/gui/macosx/library/VLCLibraryAudioDataSource.m
modules/gui/macosx/library/VLCLibraryCollectionViewItem.h
......@@ -479,6 +477,8 @@ modules/gui/macosx/library/VLCLibrarySortingMenuController.h
modules/gui/macosx/library/VLCLibrarySortingMenuController.m
modules/gui/macosx/library/VLCLibraryTableCellView.h
modules/gui/macosx/library/VLCLibraryTableCellView.m
modules/gui/macosx/library/VLCLibraryTiledAudioViewController.h
modules/gui/macosx/library/VLCLibraryTiledAudioViewController.m
modules/gui/macosx/library/VLCLibraryVideoDataSource.h
modules/gui/macosx/library/VLCLibraryVideoDataSource.m
modules/gui/macosx/library/VLCLibraryWindow.h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment