Added a stop button to the play controls, handy for when playing a stream, which shouldn't really be paused. Also handy for other reasons.

CQTexperiment
Chris Moeller 2013-10-18 06:36:19 -07:00
parent 5b13ee3f97
commit bc9d9458b4
2 changed files with 61 additions and 50 deletions

View File

@ -17,15 +17,15 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" unifiedTitleAndToolbar="YES"/>
<windowCollectionBehavior key="collectionBehavior" fullScreenPrimary="YES"/>
<windowPositionMask key="initialPositionMask" topStrut="YES"/>
<rect key="contentRect" x="331" y="367" width="760" height="400"/>
<rect key="contentRect" x="331" y="367" width="800" height="400"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="878"/>
<value key="minSize" type="size" width="400" height="400"/>
<view key="contentView" id="2">
<rect key="frame" x="0.0" y="0.0" width="760" height="400"/>
<rect key="frame" x="0.0" y="0.0" width="800" height="400"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField verticalHuggingPriority="750" id="778">
<rect key="frame" x="17" y="4" width="718" height="15"/>
<rect key="frame" x="17" y="4" width="758" height="15"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" controlSize="small" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" alignment="center" title="Total Duration: 00 hours 00 minutes 00 seconds" bezelStyle="round" id="1473">
<font key="font" metaFont="smallSystem"/>
@ -41,24 +41,24 @@
</connections>
</textField>
<splitView dividerStyle="thin" vertical="YES" id="2123">
<rect key="frame" x="0.0" y="24" width="760" height="377"/>
<rect key="frame" x="0.0" y="24" width="800" height="377"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES"/>
<subviews>
<scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="24" horizontalPageScroll="0.0" verticalLineScroll="24" verticalPageScroll="0.0" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" id="206" userLabel="Scroll View - Playlist View">
<rect key="frame" x="0.0" y="0.0" width="760" height="377"/>
<rect key="frame" x="0.0" y="0.0" width="800" height="377"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="KWC-Ti-8KY">
<rect key="frame" x="0.0" y="17" width="760" height="360"/>
<rect key="frame" x="0.0" y="17" width="800" height="360"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" alternatingRowBackgroundColors="YES" autosaveName="Playlist" rowHeight="18" headerView="1517" id="207" customClass="PlaylistView">
<rect key="frame" x="0.0" y="0.0" width="760" height="360"/>
<rect key="frame" x="0.0" y="0.0" width="800" height="360"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<size key="intercellSpacing" width="3" height="6"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn identifier="index" editable="NO" width="35" minWidth="28" maxWidth="64" id="209">
<tableColumn identifier="index" editable="NO" width="41" minWidth="28" maxWidth="64" id="209">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="right" title="#">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
@ -85,7 +85,7 @@
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
<imageCell key="dataCell" controlSize="small" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="DE10E5BB-5D9E-4B74-9085-7E5ACEFB1BB0" id="1801">
<imageCell key="dataCell" controlSize="small" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="B847B194-BBAF-4B8C-B139-D0EA4FFCEBAA" id="1801">
<font key="font" metaFont="system"/>
</imageCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
@ -98,7 +98,7 @@
</binding>
</connections>
</tableColumn>
<tableColumn identifier="title" editable="NO" width="120" minWidth="96" maxWidth="1024" id="208">
<tableColumn identifier="title" editable="NO" width="126" minWidth="96" maxWidth="1024" id="208">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Title">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
@ -120,7 +120,7 @@
<binding destination="1689" name="fontSize" keyPath="values.fontSize" id="1914"/>
</connections>
</tableColumn>
<tableColumn identifier="artist" editable="NO" width="120" minWidth="96" maxWidth="1024" id="391">
<tableColumn identifier="artist" editable="NO" width="125" minWidth="96" maxWidth="1024" id="391">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Artist">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
@ -142,7 +142,7 @@
<binding destination="1689" name="fontSize" keyPath="values.fontSize" id="1916"/>
</connections>
</tableColumn>
<tableColumn identifier="album" editable="NO" width="120" minWidth="96" maxWidth="1024" id="806">
<tableColumn identifier="album" editable="NO" width="125" minWidth="96" maxWidth="1024" id="806">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Album">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
@ -164,7 +164,7 @@
<binding destination="1689" name="fontSize" keyPath="values.fontSize" id="1917"/>
</connections>
</tableColumn>
<tableColumn identifier="length" editable="NO" width="66" minWidth="43.62012" maxWidth="96" id="807">
<tableColumn identifier="length" editable="NO" width="71" minWidth="43.62012" maxWidth="96" id="807">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="right" title="Length">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
@ -185,7 +185,7 @@
<binding destination="1689" name="fontSize" keyPath="values.fontSize" id="1919"/>
</connections>
</tableColumn>
<tableColumn identifier="year" editable="NO" width="66" minWidth="42" maxWidth="96" id="848">
<tableColumn identifier="year" editable="NO" width="71" minWidth="42" maxWidth="96" id="848">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="right" title="Year">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
@ -202,7 +202,7 @@
<binding destination="1689" name="fontSize" keyPath="values.fontSize" id="1921"/>
</connections>
</tableColumn>
<tableColumn identifier="genre" editable="NO" width="119" minWidth="96" maxWidth="512" id="849">
<tableColumn identifier="genre" editable="NO" width="123" minWidth="96" maxWidth="512" id="849">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Genre">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
@ -220,7 +220,7 @@
<binding destination="1689" name="fontSize" keyPath="values.fontSize" id="1922"/>
</connections>
</tableColumn>
<tableColumn identifier="track" editable="NO" width="67" minWidth="24" maxWidth="72" id="850">
<tableColumn identifier="track" editable="NO" width="71" minWidth="24" maxWidth="72" id="850">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="right" title="№">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
@ -306,7 +306,7 @@
<autoresizingMask key="autoresizingMask"/>
</scroller>
<tableHeaderView key="headerView" id="1517" customClass="PlaylistHeaderView">
<rect key="frame" x="0.0" y="0.0" width="760" height="17"/>
<rect key="frame" x="0.0" y="0.0" width="800" height="17"/>
<autoresizingMask key="autoresizingMask"/>
</tableHeaderView>
</scrollView>
@ -328,17 +328,20 @@
<toolbarItem implicitItemIdentifier="NSToolbarCustomizeToolbarItem" id="1645"/>
<toolbarItem implicitItemIdentifier="A06F7688-72A2-4AAD-B9E1-C66720B2B0D3" label="Playback Control" paletteLabel="Playback Control" id="1539">
<nil key="toolTip"/>
<size key="minSize" width="92" height="25"/>
<size key="maxSize" width="94" height="25"/>
<size key="minSize" width="120" height="25"/>
<size key="maxSize" width="130" height="25"/>
<segmentedControl key="view" verticalHuggingPriority="750" id="1537" customClass="PlaybackButtons">
<rect key="frame" x="3" y="14" width="92" height="25"/>
<rect key="frame" x="0.0" y="14" width="121" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<segmentedCell key="cell" state="on" alignment="left" style="automatic" trackingMode="momentary" id="1538">
<font key="font" metaFont="system"/>
<segments>
<segment toolTip="Previous" image="previousTemplate" imageScaling="none" width="28"/>
<segment toolTip="Play" image="playTemplate" imageScaling="none" width="28" tag="1"/>
<segment toolTip="Next" image="nextTemplate" imageScaling="none" width="28"/>
<segment toolTip="Next" image="stopTemplate" imageScaling="none" width="28"/>
<segment image="nextTemplate" imageScaling="none" width="28">
<nil key="label"/>
</segment>
</segments>
</segmentedCell>
<connections>
@ -379,19 +382,19 @@
<binding destination="218" name="predicate4" keyPath="filterPredicate" previousBinding="1580" id="1582">
<dictionary key="options">
<integer key="NSValidatesImmediately" value="0"/>
<integer key="NSAlwaysPresentsApplicationModalAlerts" value="0"/>
<string key="NSPredicateFormat">artist contains[cd] $value</string>
<string key="NSDisplayName">Album</string>
<string key="NSPredicateFormat">artist contains[cd] $value</string>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<integer key="NSAlwaysPresentsApplicationModalAlerts" value="0"/>
</dictionary>
</binding>
<binding destination="218" name="predicate5" keyPath="filterPredicate" previousBinding="1582" id="1583">
<dictionary key="options">
<integer key="NSValidatesImmediately" value="0"/>
<integer key="NSAlwaysPresentsApplicationModalAlerts" value="0"/>
<string key="NSPredicateFormat">genre contains[cd] $value</string>
<string key="NSDisplayName">Genre</string>
<string key="NSPredicateFormat">genre contains[cd] $value</string>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<integer key="NSAlwaysPresentsApplicationModalAlerts" value="0"/>
</dictionary>
</binding>
</connections>
@ -600,17 +603,20 @@
<toolbarItem implicitItemIdentifier="NSToolbarFlexibleSpaceItem" id="2228"/>
<toolbarItem implicitItemIdentifier="6F5A6C43-A09C-462A-AEE2-C86DC3C55128" label="Playback Buttons" paletteLabel="Playback Buttons" id="2272">
<nil key="toolTip"/>
<size key="minSize" width="92" height="25"/>
<size key="maxSize" width="92" height="25"/>
<size key="minSize" width="121" height="25"/>
<size key="maxSize" width="121" height="25"/>
<segmentedControl key="view" verticalHuggingPriority="750" id="2295" customClass="PlaybackButtons">
<rect key="frame" x="3" y="14" width="92" height="25"/>
<rect key="frame" x="0.0" y="14" width="121" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<segmentedCell key="cell" state="on" alignment="left" style="automatic" trackingMode="momentary" id="2296">
<font key="font" metaFont="system"/>
<segments>
<segment toolTip="Previous" image="previousTemplate" imageScaling="none" width="28"/>
<segment toolTip="Play" image="playTemplate" imageScaling="none" width="28" tag="1"/>
<segment toolTip="Next" image="nextTemplate" imageScaling="none" width="28"/>
<segment toolTip="Stop" image="stopTemplate" imageScaling="none" width="28"/>
<segment toolTip="Next" image="nextTemplate" imageScaling="none" width="28">
<nil key="label"/>
</segment>
</segments>
</segmentedCell>
<connections>
@ -1099,8 +1105,8 @@
<string key="NSValueTransformerName">NSIsNotNil</string>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
</dictionary>
</binding>
</connections>
@ -1150,8 +1156,8 @@ CA
<string key="NSValueTransformerName">NSIsNotNil</string>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="1"/>
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="1"/>
</dictionary>
</binding>
</connections>
@ -1200,11 +1206,11 @@ CA
<dictionary key="options">
<integer key="NSConditionallySetsEnabled" value="0"/>
<integer key="NSAlwaysPresentsApplicationModalAlerts" value="0"/>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<integer key="NSAllowsEditingMultipleValuesSelection" value="0"/>
<string key="NSValueTransformerName">RepeatAllTransformer</string>
<integer key="NSConditionallySetsHidden" value="0"/>
<integer key="NSValidatesImmediately" value="0"/>
<integer key="NSAllowsEditingMultipleValuesSelection" value="0"/>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
</dictionary>
</binding>
</connections>
@ -1226,11 +1232,11 @@ CA
<dictionary key="options">
<integer key="NSConditionallySetsEnabled" value="0"/>
<integer key="NSAlwaysPresentsApplicationModalAlerts" value="0"/>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<integer key="NSAllowsEditingMultipleValuesSelection" value="0"/>
<string key="NSValueTransformerName">RepeatOneTransformer</string>
<integer key="NSConditionallySetsHidden" value="0"/>
<integer key="NSValidatesImmediately" value="0"/>
<integer key="NSAllowsEditingMultipleValuesSelection" value="0"/>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
</dictionary>
</binding>
</connections>
@ -1241,11 +1247,11 @@ CA
<dictionary key="options">
<integer key="NSConditionallySetsEnabled" value="0"/>
<integer key="NSAlwaysPresentsApplicationModalAlerts" value="0"/>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<integer key="NSAllowsEditingMultipleValuesSelection" value="0"/>
<string key="NSValueTransformerName">RepeatNoneTransformer</string>
<integer key="NSConditionallySetsHidden" value="0"/>
<integer key="NSValidatesImmediately" value="0"/>
<integer key="NSAllowsEditingMultipleValuesSelection" value="0"/>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
</dictionary>
</binding>
</connections>
@ -1491,11 +1497,11 @@ Gw
<connections>
<binding destination="1897" name="title" keyPath="content.artist" id="2085">
<dictionary key="options">
<string key="NSMultipleValuesPlaceholder"></string>
<string key="NSNullPlaceholder">Not Playing</string>
<string key="NSNotApplicablePlaceholder"></string>
<string key="NSNoSelectionPlaceholder"></string>
<string key="NSNullPlaceholder">Not Playing</string>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<string key="NSMultipleValuesPlaceholder"></string>
</dictionary>
</binding>
</connections>
@ -1505,11 +1511,11 @@ Gw
<connections>
<binding destination="1897" name="title" keyPath="content.title" id="2083">
<dictionary key="options">
<string key="NSMultipleValuesPlaceholder"></string>
<string key="NSNullPlaceholder">Not Playing</string>
<string key="NSNotApplicablePlaceholder"></string>
<string key="NSNoSelectionPlaceholder"></string>
<string key="NSNullPlaceholder">Not Playing</string>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<string key="NSMultipleValuesPlaceholder"></string>
</dictionary>
</binding>
</connections>
@ -1632,8 +1638,8 @@ Gw
<string key="NSValueTransformerName">NSIsNotNil</string>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
</dictionary>
</binding>
</connections>
@ -1647,8 +1653,8 @@ Gw
<string key="NSValueTransformerName">NSIsNotNil</string>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
</dictionary>
</binding>
</connections>
@ -1665,8 +1671,8 @@ Gw
<string key="NSValueTransformerName">NSIsNotNil</string>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
</dictionary>
</binding>
</connections>
@ -1680,8 +1686,8 @@ Gw
<string key="NSValueTransformerName">NSIsNotNil</string>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
</dictionary>
</binding>
</connections>
@ -1693,10 +1699,10 @@ Gw
<action selector="showWindow:" target="2422" id="lET-Cq-KED"/>
<binding destination="2020" name="enabled" keyPath="selection" id="Ff1-eV-AGk">
<dictionary key="options">
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<string key="NSValueTransformerName">NSIsNotNil</string>
</dictionary>
</binding>
@ -1730,7 +1736,7 @@ Gw
<slider horizontalHuggingPriority="750" id="1612" customClass="VolumeSlider">
<rect key="frame" x="6" y="19" width="15" height="129"/>
<autoresizingMask key="autoresizingMask"/>
<sliderCell key="cell" controlSize="small" continuous="YES" alignment="left" maxValue="100" doubleValue="50" tickMarkPosition="right" sliderType="linear" id="1613"/>
<sliderCell key="cell" controlSize="small" continuous="YES" alignment="left" maxValue="100" doubleValue="50" tickMarkPosition="left" sliderType="linear" id="1613"/>
<connections>
<action selector="changeVolume:" target="705" id="1614"/>
</connections>
@ -1786,7 +1792,7 @@ Gw
<customObject id="2434" customClass="FeedbackController"/>
</objects>
<resources>
<image name="DE10E5BB-5D9E-4B74-9085-7E5ACEFB1BB0" width="17" height="17">
<image name="B847B194-BBAF-4B8C-B139-D0EA4FFCEBAA" width="17" height="17">
<mutableData key="keyedArchiveRepresentation">
YnBsaXN0MDDUAQIDBAUGRkdYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoK8QDwcI
ExQZHh8qKyw0NzpAQ1UkbnVsbNUJCgsMDQ4PEBESVk5TU2l6ZVYkY2xhc3NcTlNJbWFnZUZsYWdzVk5T
@ -1882,6 +1888,7 @@ Ek0SVRJYEmoSbRJyAAAAAAAAAgEAAAAAAAAASgAAAAAAAAAAAAAAAAAAEnQ
<image name="randomizeTemplate" width="17" height="16"/>
<image name="repeatModeOffTemplate" width="20" height="19"/>
<image name="shuffleOffTemplate" width="20" height="19"/>
<image name="stopTemplate" width="16" height="16"/>
<image name="volume3Template" width="17" height="16"/>
</resources>
</document>

View File

@ -75,7 +75,11 @@ static NSString *PlaybackButtonsPlaybackStatusObservationContext = @"PlaybackBut
{
[playbackController playPauseResume:self];
}
else if (clickedSegment == 2) //Next
else if (clickedSegment == 2) //Stop
{
[playbackController stop:self];
}
else if (clickedSegment == 3) //Next
{
[playbackController next:self];
}