Commit 88dd577b authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx/library: rename data source

There will be designated classes for audio and video
parent 38fc9389
......@@ -157,7 +157,7 @@
7DF14FBD2270CB1C0008ABE4 /* VLCMediaSourceCollectionViewItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DF14FBB2270CB1C0008ABE4 /* VLCMediaSourceCollectionViewItem.m */; };
7DFBDCA82269E77500B700A5 /* VLCLibraryController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DFBDCA72269E77500B700A5 /* VLCLibraryController.m */; };
7DFBDCAB2269E77F00B700A5 /* VLCLibraryModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DFBDCAA2269E77F00B700A5 /* VLCLibraryModel.m */; };
7DFBDCAE2269ED0C00B700A5 /* VLCLibraryDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DFBDCAD2269ED0C00B700A5 /* VLCLibraryDataSource.m */; };
7DFBDCAE2269ED0C00B700A5 /* VLCLibraryVideoDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DFBDCAD2269ED0C00B700A5 /* VLCLibraryVideoDataSource.m */; };
7DFBDCB1226A518400B700A5 /* VLCLibraryMenuController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DFBDCB0226A518400B700A5 /* VLCLibraryMenuController.m */; };
7DFBDCB4226CD00900B700A5 /* VLCLibraryDataTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DFBDCB3226CD00900B700A5 /* VLCLibraryDataTypes.m */; };
7DFBDCB7226CDFD600B700A5 /* VLCImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DFBDCB6226CDFD600B700A5 /* VLCImageView.m */; };
......@@ -548,8 +548,8 @@
7DFBDCA72269E77500B700A5 /* VLCLibraryController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryController.m; sourceTree = "<group>"; };
7DFBDCA92269E77F00B700A5 /* VLCLibraryModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryModel.h; sourceTree = "<group>"; };
7DFBDCAA2269E77F00B700A5 /* VLCLibraryModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryModel.m; sourceTree = "<group>"; };
7DFBDCAC2269ED0C00B700A5 /* VLCLibraryDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryDataSource.h; sourceTree = "<group>"; };
7DFBDCAD2269ED0C00B700A5 /* VLCLibraryDataSource.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryDataSource.m; sourceTree = "<group>"; };
7DFBDCAC2269ED0C00B700A5 /* VLCLibraryVideoDataSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryVideoDataSource.h; sourceTree = "<group>"; };
7DFBDCAD2269ED0C00B700A5 /* VLCLibraryVideoDataSource.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryVideoDataSource.m; sourceTree = "<group>"; };
7DFBDCAF226A518400B700A5 /* VLCLibraryMenuController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryMenuController.h; sourceTree = "<group>"; };
7DFBDCB0226A518400B700A5 /* VLCLibraryMenuController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryMenuController.m; sourceTree = "<group>"; };
7DFBDCB2226CD00900B700A5 /* VLCLibraryDataTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryDataTypes.h; sourceTree = "<group>"; };
......@@ -989,8 +989,8 @@
7DFBDCAA2269E77F00B700A5 /* VLCLibraryModel.m */,
7DFBDCB2226CD00900B700A5 /* VLCLibraryDataTypes.h */,
7DFBDCB3226CD00900B700A5 /* VLCLibraryDataTypes.m */,
7DFBDCAC2269ED0C00B700A5 /* VLCLibraryDataSource.h */,
7DFBDCAD2269ED0C00B700A5 /* VLCLibraryDataSource.m */,
7DFBDCAC2269ED0C00B700A5 /* VLCLibraryVideoDataSource.h */,
7DFBDCAD2269ED0C00B700A5 /* VLCLibraryVideoDataSource.m */,
7DFBDCAF226A518400B700A5 /* VLCLibraryMenuController.h */,
7DFBDCB0226A518400B700A5 /* VLCLibraryMenuController.m */,
7D94E28A2274D2140008057F /* VLCLibraryFolderManagementWindow.h */,
......@@ -1705,7 +1705,7 @@
7D2FFA40227B8A5B0085D649 /* VLCLinearProgressIndicator.m in Sources */,
7DFBDCB1226A518400B700A5 /* VLCLibraryMenuController.m in Sources */,
1C3113D51E508C6900D4DD76 /* VLCTextfieldPanelController.m in Sources */,
7DFBDCAE2269ED0C00B700A5 /* VLCLibraryDataSource.m in Sources */,
7DFBDCAE2269ED0C00B700A5 /* VLCLibraryVideoDataSource.m in Sources */,
1C3113D71E508C6900D4DD76 /* VLCPopupPanelController.m in Sources */,
7D445D8B22032B9200263D34 /* VLCPlaylistTableView.m in Sources */,
1C3113D91E508C6900D4DD76 /* VLCSimplePrefsController.m in Sources */,
......
......@@ -58,8 +58,8 @@ libmacosx_plugin_la_SOURCES = \
gui/macosx/library/VLCLibraryCollectionViewSupplementaryElementView.m \
gui/macosx/library/VLCLibraryController.h \
gui/macosx/library/VLCLibraryController.m \
gui/macosx/library/VLCLibraryDataSource.h \
gui/macosx/library/VLCLibraryDataSource.m \
gui/macosx/library/VLCLibraryVideoDataSource.h \
gui/macosx/library/VLCLibraryVideoDataSource.m \
gui/macosx/library/VLCLibraryDataTypes.h \
gui/macosx/library/VLCLibraryDataTypes.m \
gui/macosx/library/VLCLibraryFolderManagementWindow.h \
......
/*****************************************************************************
* VLCLibraryDataSource.h: MacOS X interface module
* VLCLibraryVideoDataSource.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2019 VLC authors and VideoLAN
*
......@@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
@class VLCLibraryModel;
@interface VLCLibraryDataSource : NSObject <NSCollectionViewDataSource, NSCollectionViewDelegate>
@interface VLCLibraryVideoDataSource : NSObject <NSCollectionViewDataSource, NSCollectionViewDelegate>
@property (readwrite, assign) VLCLibraryModel *libraryModel;
@property (readwrite, assign) NSCollectionView *recentMediaCollectionView;
......
/*****************************************************************************
* VLCLibraryDataSource.m: MacOS X interface module
* VLCLibraryVideoDataSource.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 "VLCLibraryDataSource.h"
#import "VLCLibraryVideoDataSource.h"
#import "library/VLCLibraryCollectionViewItem.h"
#import "library/VLCLibraryCollectionViewSupplementaryElementView.h"
......@@ -29,7 +29,7 @@
#import "main/CompatibilityFixes.h"
#import "extensions/NSString+Helpers.h"
@implementation VLCLibraryDataSource
@implementation VLCLibraryVideoDataSource
- (NSInteger)collectionView:(NSCollectionView *)collectionView
numberOfItemsInSection:(NSInteger)section
......
......@@ -32,7 +32,7 @@
#import "playlist/VLCPlaylistDataSource.h"
#import "library/VLCLibraryController.h"
#import "library/VLCLibraryDataSource.h"
#import "library/VLCLibraryVideoDataSource.h"
#import "library/VLCLibraryCollectionViewItem.h"
#import "library/VLCLibraryModel.h"
#import "library/VLCLibraryCollectionViewSupplementaryElementView.h"
......@@ -52,7 +52,7 @@ static const float f_playlist_row_height = 72.;
@interface VLCLibraryWindow ()
{
VLCPlaylistDataSource *_playlistDataSource;
VLCLibraryDataSource *_libraryDataSource;
VLCLibraryVideoDataSource *_libraryVideoDataSource;
VLCMediaSourceDataSource *_mediaSourceDataSource;
VLCPlaylistController *_playlistController;
......@@ -135,19 +135,19 @@ static const float f_playlist_row_height = 72.;
_playlistTableView.rowHeight = f_playlist_row_height;
[_playlistTableView reloadData];
_libraryDataSource = [[VLCLibraryDataSource alloc] init];
_libraryDataSource.libraryModel = mainInstance.libraryController.libraryModel;
_libraryDataSource.recentMediaCollectionView = _recentVideoLibraryCollectionView;
_libraryDataSource.libraryMediaCollectionView = _videoLibraryCollectionView;
_videoLibraryCollectionView.dataSource = _libraryDataSource;
_videoLibraryCollectionView.delegate = _libraryDataSource;
_libraryVideoDataSource = [[VLCLibraryVideoDataSource alloc] init];
_libraryVideoDataSource.libraryModel = mainInstance.libraryController.libraryModel;
_libraryVideoDataSource.recentMediaCollectionView = _recentVideoLibraryCollectionView;
_libraryVideoDataSource.libraryMediaCollectionView = _videoLibraryCollectionView;
_videoLibraryCollectionView.dataSource = _libraryVideoDataSource;
_videoLibraryCollectionView.delegate = _libraryVideoDataSource;
[_videoLibraryCollectionView registerClass:[VLCLibraryCollectionViewItem class] forItemWithIdentifier:VLCLibraryCellIdentifier];
[_videoLibraryCollectionView registerClass:[VLCLibraryCollectionViewSupplementaryElementView class]
forSupplementaryViewOfKind:NSCollectionElementKindSectionHeader
withIdentifier:VLCLibrarySupplementaryElementViewIdentifier];
[(NSCollectionViewFlowLayout *)_videoLibraryCollectionView.collectionViewLayout setHeaderReferenceSize:[VLCLibraryCollectionViewSupplementaryElementView defaultHeaderSize]];
_recentVideoLibraryCollectionView.dataSource = _libraryDataSource;
_recentVideoLibraryCollectionView.delegate = _libraryDataSource;
_recentVideoLibraryCollectionView.dataSource = _libraryVideoDataSource;
_recentVideoLibraryCollectionView.delegate = _libraryVideoDataSource;
[_recentVideoLibraryCollectionView registerClass:[VLCLibraryCollectionViewItem class] forItemWithIdentifier:VLCLibraryCellIdentifier];
_mediaSourceDataSource = [[VLCMediaSourceDataSource alloc] init];
......@@ -258,7 +258,7 @@ static const float f_playlist_row_height = 72.;
{
switch (_segmentedTitleControl.selectedSegment) {
case 0:
_libraryDataSource.libraryModel.libraryMode = VLCLibraryModeVideo;
_libraryVideoDataSource.libraryModel.libraryMode = VLCLibraryModeVideo;
if (_mediaSourceScrollView.superview != nil) {
[_mediaSourceScrollView removeFromSuperview];
}
......@@ -274,7 +274,7 @@ static const float f_playlist_row_height = 72.;
break;
case 1:
_libraryDataSource.libraryModel.libraryMode = VLCLibraryModeAudio;
_libraryVideoDataSource.libraryModel.libraryMode = VLCLibraryModeAudio;
if (_mediaSourceScrollView.superview != nil) {
[_mediaSourceScrollView removeFromSuperview];
}
......
......@@ -466,8 +466,8 @@ modules/gui/macosx/library/VLCLibraryCollectionViewSupplementaryElementView.h
modules/gui/macosx/library/VLCLibraryCollectionViewSupplementaryElementView.m
modules/gui/macosx/library/VLCLibraryController.h
modules/gui/macosx/library/VLCLibraryController.m
modules/gui/macosx/library/VLCLibraryDataSource.h
modules/gui/macosx/library/VLCLibraryDataSource.m
modules/gui/macosx/library/VLCLibraryVideoDataSource.h
modules/gui/macosx/library/VLCLibraryVideoDataSource.m
modules/gui/macosx/library/VLCLibraryDataTypes.h
modules/gui/macosx/library/VLCLibraryDataTypes.m
modules/gui/macosx/library/VLCLibraryFolderManagementWindow.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