Playlist: Implemented Composer column
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
a3c8149612
commit
9593902aff
2 changed files with 51 additions and 2 deletions
|
@ -303,7 +303,51 @@
|
|||
</binding>
|
||||
</connections>
|
||||
</tableColumn>
|
||||
<tableColumn identifier="album" editable="NO" width="151" minWidth="96" maxWidth="1024" id="806">
|
||||
<tableColumn identifier="composer" editable="NO" width="151" minWidth="96" maxWidth="1024" hidden="YES" id="B9Z-OR-rQP" userLabel="Composer">
|
||||
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Composer">
|
||||
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
|
||||
</tableHeaderCell>
|
||||
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="JX7-wV-kUU">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<sortDescriptor key="sortDescriptorPrototype" selector="caseInsensitiveCompare:" sortKey="composer"/>
|
||||
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
|
||||
<prototypeCellViews>
|
||||
<tableCellView misplaced="YES" id="dgP-m4-g1z">
|
||||
<rect key="frame" x="1" y="3" width="0.0" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="4cz-aa-d2B">
|
||||
<rect key="frame" x="0.0" y="1" width="4" height="16"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="DDa-1D-XYS">
|
||||
<font key="font" usesAppearanceFont="YES"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="4cz-aa-d2B" firstAttribute="leading" secondItem="dgP-m4-g1z" secondAttribute="leading" constant="2" id="4Gd-Da-cTb"/>
|
||||
<constraint firstItem="4cz-aa-d2B" firstAttribute="centerY" secondItem="dgP-m4-g1z" secondAttribute="centerY" id="MBR-lu-Sqm"/>
|
||||
<constraint firstItem="4cz-aa-d2B" firstAttribute="centerX" secondItem="dgP-m4-g1z" secondAttribute="centerX" id="rWE-oT-geg"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="textField" destination="4cz-aa-d2B" id="bar-OG-9cs"/>
|
||||
</connections>
|
||||
</tableCellView>
|
||||
</prototypeCellViews>
|
||||
<connections>
|
||||
<binding destination="218" name="value" keyPath="arrangedObjects.composer" id="MiB-Bd-qrj">
|
||||
<dictionary key="options">
|
||||
<bool key="NSConditionallySetsEditable" value="YES"/>
|
||||
</dictionary>
|
||||
</binding>
|
||||
</connections>
|
||||
</tableColumn>
|
||||
<tableColumn identifier="album" editable="NO" width="194.5" minWidth="96" maxWidth="1024" id="806">
|
||||
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Album">
|
||||
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
|
||||
|
|
|
@ -48,7 +48,7 @@ static void *playlistControllerContext = &playlistControllerContext;
|
|||
cellIdentifiers = @[@"index", @"status", @"title", @"albumartist", @"artist",
|
||||
@"album", @"length", @"year", @"genre", @"track", @"path",
|
||||
@"filename", @"codec", @"rating", @"samplerate",
|
||||
@"bitspersample", @"bitrate"];
|
||||
@"bitspersample", @"bitrate", @"composer"];
|
||||
|
||||
NSValueTransformer *repeatNoneTransformer =
|
||||
[[RepeatModeTransformer alloc] initWithMode:RepeatModeNoRepeat];
|
||||
|
@ -523,6 +523,10 @@ static void *playlistControllerContext = &playlistControllerContext;
|
|||
cellText = [NSString stringWithFormat:@"%u kbps", pe.bitrate];
|
||||
cellTextAlignment = NSTextAlignmentRight;
|
||||
break;
|
||||
|
||||
case 17:
|
||||
if([pe composer]) cellText = pe.composer;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -664,6 +668,7 @@ static void *playlistControllerContext = &playlistControllerContext;
|
|||
case 12:
|
||||
case 14:
|
||||
case 15:
|
||||
case 17:
|
||||
sortDescriptor = [[NSSortDescriptor alloc] initWithKey:[tableColumn identifier] ascending:ascending selector:@selector(caseInsensitiveCompare:)];
|
||||
sortDescriptors = @[sortDescriptor];
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue