Browse Source

macosx: Remove VLCLibraryCollectionViewAudioGroupSupplementaryDetailView

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
pull/162/head
Claudio Cambra 2 years ago
committed by Steve Lhomme
parent
commit
78a7672419
  1. 8
      extras/package/macosx/VLC.xcodeproj/project.pbxproj
  2. 3
      modules/gui/macosx/Makefile.am
  3. 98
      modules/gui/macosx/UI/VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.xib
  4. 43
      modules/gui/macosx/library/audio-library/VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.h
  5. 100
      modules/gui/macosx/library/audio-library/VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.m

8
extras/package/macosx/VLC.xcodeproj/project.pbxproj

@ -102,7 +102,6 @@
536283F3291146BC00640C15 /* VLCLibraryNavigationStack.m in Sources */ = {isa = PBXBuildFile; fileRef = 536283E2291146BC00640C15 /* VLCLibraryNavigationStack.m */; };
536283F4291146BC00640C15 /* VLCLibraryCollectionViewMediaItemSupplementaryDetailView.m in Sources */ = {isa = PBXBuildFile; fileRef = 536283E3291146BC00640C15 /* VLCLibraryCollectionViewMediaItemSupplementaryDetailView.m */; };
536283F5291146BC00640C15 /* VLCLibraryCollectionViewSupplementaryDetailView.m in Sources */ = {isa = PBXBuildFile; fileRef = 536283E5291146BC00640C15 /* VLCLibraryCollectionViewSupplementaryDetailView.m */; };
536283F6291146BC00640C15 /* VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.m in Sources */ = {isa = PBXBuildFile; fileRef = 536283E9291146BC00640C15 /* VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.m */; };
536283F7291146BC00640C15 /* VLCLibraryNavigationState.m in Sources */ = {isa = PBXBuildFile; fileRef = 536283EB291146BC00640C15 /* VLCLibraryNavigationState.m */; };
536283F8291146BC00640C15 /* VLCLibrarySongTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 536283EC291146BC00640C15 /* VLCLibrarySongTableCellView.m */; };
536283F9291146BC00640C15 /* VLCLibraryCollectionViewFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 536283EE291146BC00640C15 /* VLCLibraryCollectionViewFlowLayout.m */; };
@ -332,9 +331,7 @@
536283E4291146BC00640C15 /* VLCLibraryNavigationState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCLibraryNavigationState.h; sourceTree = "<group>"; };
536283E5291146BC00640C15 /* VLCLibraryCollectionViewSupplementaryDetailView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryCollectionViewSupplementaryDetailView.m; sourceTree = "<group>"; };
536283E6291146BC00640C15 /* VLCLibraryCollectionViewSupplementaryDetailView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCLibraryCollectionViewSupplementaryDetailView.h; sourceTree = "<group>"; };
536283E7291146BC00640C15 /* VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.h; sourceTree = "<group>"; };
536283E8291146BC00640C15 /* VLCLibraryCollectionViewAlbumSupplementaryDetailView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCLibraryCollectionViewAlbumSupplementaryDetailView.h; sourceTree = "<group>"; };
536283E9291146BC00640C15 /* VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.m; sourceTree = "<group>"; };
536283EA291146BC00640C15 /* VLCLibraryCollectionViewMediaItemSupplementaryDetailView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCLibraryCollectionViewMediaItemSupplementaryDetailView.h; sourceTree = "<group>"; };
536283EB291146BC00640C15 /* VLCLibraryNavigationState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryNavigationState.m; sourceTree = "<group>"; };
536283EC291146BC00640C15 /* VLCLibrarySongTableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCLibrarySongTableCellView.m; sourceTree = "<group>"; };
@ -342,7 +339,6 @@
536283EE291146BC00640C15 /* VLCLibraryCollectionViewFlowLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryCollectionViewFlowLayout.m; sourceTree = "<group>"; };
536283EF291146BC00640C15 /* VLCLibraryNavigationStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCLibraryNavigationStack.h; sourceTree = "<group>"; };
536283FA2911476A00640C15 /* VLCLibrarySongTableCellView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VLCLibrarySongTableCellView.xib; sourceTree = "<group>"; };
536283FB2911476A00640C15 /* VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.xib; sourceTree = "<group>"; };
536283FC2911476A00640C15 /* VLCLibraryCollectionViewMediaItemSupplementaryDetailView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VLCLibraryCollectionViewMediaItemSupplementaryDetailView.xib; sourceTree = "<group>"; };
536283FD2911476A00640C15 /* VLCLibraryCollectionViewAlbumSupplementaryDetailView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VLCLibraryCollectionViewAlbumSupplementaryDetailView.xib; sourceTree = "<group>"; };
536283FE291147C500640C15 /* VLCBasicView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCBasicView.h; sourceTree = "<group>"; };
@ -1496,8 +1492,6 @@
53ED472229C74D1F00795DB1 /* VLCLibraryAudioTableViewDelegate.m */,
536283E8291146BC00640C15 /* VLCLibraryCollectionViewAlbumSupplementaryDetailView.h */,
536283E1291146BC00640C15 /* VLCLibraryCollectionViewAlbumSupplementaryDetailView.m */,
536283E7291146BC00640C15 /* VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.h */,
536283E9291146BC00640C15 /* VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.m */,
536283DD291146BC00640C15 /* VLCLibrarySongTableCellView.h */,
536283EC291146BC00640C15 /* VLCLibrarySongTableCellView.m */,
53B447C82939823E00857588 /* VLCLibrarySongsTableViewSongPlayingTableCellView.h */,
@ -1960,7 +1954,6 @@
53BFB1E02A6A72160065EA7A /* VLCLibraryAudioGroupHeaderView.xib */,
53088E122AD6EADF00C21358 /* VLCLibraryCarouselViewItemView.xib */,
536283FD2911476A00640C15 /* VLCLibraryCollectionViewAlbumSupplementaryDetailView.xib */,
536283FB2911476A00640C15 /* VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.xib */,
7D0F64052202047900FDB91F /* VLCLibraryCollectionViewItem.xib */,
536283FC2911476A00640C15 /* VLCLibraryCollectionViewMediaItemSupplementaryDetailView.xib */,
53B40FD42AA7618000C814E4 /* VLCLibraryHeroView.xib */,
@ -2103,7 +2096,6 @@
7DFBDCAB2269E77F00B700A5 /* VLCLibraryModel.m in Sources */,
1CCC89012078A3D500E5626F /* Preferences.xib in Sources */,
7DC21A7422049A6600F98A02 /* VLCOpenInputMetadata.m in Sources */,
536283F6291146BC00640C15 /* VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.m in Sources */,
1CCC89022078A3D500E5626F /* ResumeDialog.xib in Sources */,
7DE7232E22A51F8D00D72616 /* VLCPositionFormatter.m in Sources */,
534E8E3A29A06325009503F8 /* VLCMainVideoViewController.m in Sources */,

3
modules/gui/macosx/Makefile.am

@ -209,8 +209,6 @@ libmacosx_plugin_la_SOURCES = \
gui/macosx/library/audio-library/VLCLibraryAudioViewController.m \
gui/macosx/library/audio-library/VLCLibraryCollectionViewAlbumSupplementaryDetailView.h \
gui/macosx/library/audio-library/VLCLibraryCollectionViewAlbumSupplementaryDetailView.m \
gui/macosx/library/audio-library/VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.h \
gui/macosx/library/audio-library/VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.m \
gui/macosx/library/audio-library/VLCLibrarySongTableCellView.h \
gui/macosx/library/audio-library/VLCLibrarySongTableCellView.m \
gui/macosx/library/audio-library/VLCLibrarySongsTableViewSongPlayingTableCellView.h \
@ -451,7 +449,6 @@ libmacosx_plugin_la_XIB_SOURCES = \
gui/macosx/UI/VLCLibraryCarouselViewItemView.xib \
gui/macosx/UI/VLCLibraryCollectionViewItem.xib \
gui/macosx/UI/VLCLibraryCollectionViewAlbumSupplementaryDetailView.xib \
gui/macosx/UI/VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.xib \
gui/macosx/UI/VLCLibraryCollectionViewMediaItemSupplementaryDetailView.xib \
gui/macosx/UI/VLCLibraryHeroView.xib \
gui/macosx/UI/VLCLibrarySongTableCellView.xib \

98
modules/gui/macosx/UI/VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.xib

@ -1,98 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="20037" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="20037"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="VLCLibraryCollectionViewAudioGroupSupplementaryDetailView"/>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<view id="HAc-or-XD8" customClass="VLCLibraryCollectionViewAudioGroupSupplementaryDetailView">
<rect key="frame" x="0.0" y="0.0" width="1071" height="322"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<subviews>
<stackView distribution="fill" orientation="vertical" alignment="leading" spacing="5" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bw7-QB-Ssc">
<rect key="frame" x="10" y="10" width="1051" height="282"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nCe-dY-YMM">
<rect key="frame" x="-2" y="203" width="178" height="79"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" title="Audio group name" id="6RM-x8-Y4y">
<font key="font" textStyle="title1" name=".SFNS-Regular"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" horizontalScrollElasticity="none" id="9ZS-oy-iP9" customClass="VLCSubScrollView">
<rect key="frame" x="0.0" y="0.0" width="701" height="198"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<clipView key="contentView" drawsBackground="NO" id="3V4-tX-owM">
<rect key="frame" x="0.0" y="0.0" width="701" height="198"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="fullWidth" columnReordering="NO" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" typeSelect="NO" rowSizeStyle="automatic" viewBased="YES" id="eEJ-WA-0aM" customClass="VLCLibraryTableView">
<rect key="frame" x="0.0" y="0.0" width="701" height="188"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn width="689" minWidth="10" maxWidth="3.4028234663852886e+38" id="fqq-am-CS8">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left">
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</tableHeaderCell>
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="1js-Fu-KuW">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
</tableColumn>
</tableColumns>
</tableView>
</subviews>
<nil key="backgroundColor"/>
</clipView>
<edgeInsets key="contentInsets" left="0.0" right="0.0" top="0.0" bottom="10"/>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="ZBY-pE-E7T">
<rect key="frame" x="-100" y="-100" width="701" height="15"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="WRE-VM-L7s">
<rect key="frame" x="224" y="17" width="15" height="102"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
</subviews>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
</stackView>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="bw7-QB-Ssc" secondAttribute="trailing" constant="10" id="8QK-wS-vnX"/>
<constraint firstItem="bw7-QB-Ssc" firstAttribute="leading" secondItem="HAc-or-XD8" secondAttribute="leading" constant="10" id="L0r-A5-7Xq"/>
<constraint firstAttribute="bottom" secondItem="bw7-QB-Ssc" secondAttribute="bottom" constant="10" id="eS3-iK-oGV"/>
<constraint firstItem="bw7-QB-Ssc" firstAttribute="top" secondItem="HAc-or-XD8" secondAttribute="top" constant="30" id="oWk-8b-f1e"/>
</constraints>
<connections>
<outlet property="audioGroupAlbumsTableView" destination="eEJ-WA-0aM" id="l8k-M9-a8e"/>
<outlet property="audioGroupNameTextField" destination="nCe-dY-YMM" id="h3l-p0-w3e"/>
<outlet property="contentViewBottomConstraint" destination="eS3-iK-oGV" id="T0p-C1-8jm"/>
<outlet property="contentViewLeftConstraint" destination="L0r-A5-7Xq" id="T0p-C1-a8j"/>
<outlet property="contentViewRightConstraint" destination="8QK-wS-vnX" id="T0p-C1-a7l"/>
<outlet property="contentViewTopConstraint" destination="oWk-8b-f1e" id="T0p-C1-1nv"/>
<outlet property="internalScrollView" destination="9ZS-oy-iP9" id="afa-6P-b12"/>
<outlet property="tableClipView" destination="3V4-tX-owM" id="t4b-1e-Cl1"/>
<outlet property="tableScrollView" destination="9ZS-oy-iP9" id="tab-L3-Scr"/>
</connections>
<point key="canvasLocation" x="-237.5" y="-284"/>
</view>
</objects>
</document>

43
modules/gui/macosx/library/audio-library/VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.h

@ -1,43 +0,0 @@
/*****************************************************************************
* VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2022 VLC authors and VideoLAN
*
* Authors: Claudio Cambra <claudio.cambra@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <Cocoa/Cocoa.h>
#import "library/VLCLibraryCollectionViewSupplementaryDetailView.h"
NS_ASSUME_NONNULL_BEGIN
@class VLCImageView;
extern NSString *const VLCLibraryCollectionViewAudioGroupSupplementaryDetailViewIdentifier;
extern NSCollectionViewSupplementaryElementKind const VLCLibraryCollectionViewAudioGroupSupplementaryDetailViewKind;
@interface VLCLibraryCollectionViewAudioGroupSupplementaryDetailView : VLCLibraryCollectionViewSupplementaryDetailView
@property (readwrite, weak) IBOutlet NSTextField *audioGroupNameTextField;
@property (readwrite, weak) IBOutlet NSTableView *audioGroupAlbumsTableView;
@property (readwrite, weak) IBOutlet NSClipView *tableClipView;
@property (readwrite, weak) IBOutlet NSScrollView *tableScrollView;
@end
NS_ASSUME_NONNULL_END

100
modules/gui/macosx/library/audio-library/VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.m

@ -1,100 +0,0 @@
/*****************************************************************************
* VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.m: MacOS X interface module
*****************************************************************************
* Copyright (C) 2022 VLC authors and VideoLAN
*
* Authors: Claudio Cambra <claudio.cambra@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import "VLCLibraryCollectionViewAudioGroupSupplementaryDetailView.h"
#import "extensions/NSFont+VLCAdditions.h"
#import "library/VLCLibraryDataTypes.h"
#import "library/VLCLibraryModel.h"
#import "library/VLCLibraryRepresentedItem.h"
#import "library/audio-library/VLCLibraryAudioGroupDataSource.h"
#import "library/audio-library/VLCLibraryAudioGroupTableViewDelegate.h"
NSString *const VLCLibraryCollectionViewAudioGroupSupplementaryDetailViewIdentifier = @"VLCLibraryCollectionViewAudioGroupSupplementaryDetailViewIdentifier";
NSCollectionViewSupplementaryElementKind const VLCLibraryCollectionViewAudioGroupSupplementaryDetailViewKind = @"VLCLibraryCollectionViewAudioGroupSupplementaryDetailViewIdentifier";
@interface VLCLibraryCollectionViewAudioGroupSupplementaryDetailView ()
{
VLCLibraryAudioGroupDataSource *_audioGroupAlbumsDataSource;
VLCLibraryAudioGroupTableViewDelegate *_audioGroupAlbumsTableViewDelegate;
}
@end
@implementation VLCLibraryCollectionViewAudioGroupSupplementaryDetailView
- (void)awakeFromNib
{
_audioGroupAlbumsDataSource = [[VLCLibraryAudioGroupDataSource alloc] init];
_audioGroupAlbumsDataSource.tableViews = @[_audioGroupAlbumsTableView];
_audioGroupAlbumsTableViewDelegate = [[VLCLibraryAudioGroupTableViewDelegate alloc] init];
_audioGroupAlbumsTableView.dataSource = _audioGroupAlbumsDataSource;
_audioGroupAlbumsTableView.delegate = _audioGroupAlbumsTableViewDelegate;
_audioGroupNameTextField.font = NSFont.VLCLibrarySubsectionHeaderFont;
NSNotificationCenter * const notificationCenter = NSNotificationCenter.defaultCenter;
[notificationCenter addObserver:self
selector:@selector(handleAudioGroupUpdated:)
name:VLCLibraryModelAlbumUpdated
object:nil];
[notificationCenter addObserver:self
selector:@selector(handleAudioGroupUpdated:)
name:VLCLibraryModelArtistUpdated
object:nil];
[notificationCenter addObserver:self
selector:@selector(handleAudioGroupUpdated:)
name:VLCLibraryModelGenreUpdated
object:nil];
}
- (void)handleAudioGroupUpdated:(NSNotification *)notification
{
NSParameterAssert(notification);
if (self.representedItem == nil ||
notification.object == nil ||
![notification.object conformsToProtocol:@protocol(VLCMediaLibraryAudioGroupProtocol)]) {
return;
}
const id<VLCMediaLibraryAudioGroupProtocol> audioGroup = (id<VLCMediaLibraryAudioGroupProtocol>)notification.object;
VLCLibraryRepresentedItem * const representedItem = [[VLCLibraryRepresentedItem alloc] initWithItem:audioGroup parentType:self.representedItem.parentType];
self.representedItem = representedItem;
}
- (void)updateRepresentation
{
NSAssert(self.representedItem != nil, @"no media item assigned for collection view item", nil);
const id<VLCMediaLibraryAudioGroupProtocol> audioGroup = (id<VLCMediaLibraryAudioGroupProtocol>)self.representedItem.item;
NSAssert(audioGroup != nil, @"audio group should not be nil!");
_audioGroupNameTextField.stringValue = audioGroup.displayString;
_audioGroupAlbumsDataSource.representedAudioGroup = audioGroup;
}
@end
Loading…
Cancel
Save