mirror of https://code.videolan.org/videolan/vlc
macosx: Adapt all items entry text to current audio group type
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
This commit is contained in:
parent
406ab6c1d1
commit
1cc3ce63a8
|
@ -550,11 +550,16 @@ static NSString *VLCLibraryYearSortDescriptorKey = @"VLCLibraryYearSortDescripto
|
|||
- (id<VLCMediaLibraryItemProtocol>)libraryItemAtRow:(NSInteger)row
|
||||
forTableView:(NSTableView *)tableView
|
||||
{
|
||||
if ([self displayAllArtistsGenresTableEntry]) {
|
||||
if (row == 0) {
|
||||
return [[VLCMediaLibraryDummyItem alloc] initWithDisplayString:_NS("All items")
|
||||
withDetailString:@""];
|
||||
}
|
||||
BOOL viewDisplayingAllItemsEntry = [self displayAllArtistsGenresTableEntry];
|
||||
BOOL provideAllItemsEntry = viewDisplayingAllItemsEntry && row == 0;
|
||||
|
||||
if (provideAllItemsEntry && _currentParentType == VLC_ML_PARENT_GENRE) {
|
||||
return [[VLCMediaLibraryDummyItem alloc] initWithDisplayString:_NS("All genres")
|
||||
withDetailString:@""];
|
||||
} else if (provideAllItemsEntry && _currentParentType == VLC_ML_PARENT_ARTIST) {
|
||||
return [[VLCMediaLibraryDummyItem alloc] initWithDisplayString:_NS("All artists")
|
||||
withDetailString:@""];
|
||||
} else if (viewDisplayingAllItemsEntry) {
|
||||
return _displayedCollection[row - 1];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue