Merge lp:~rockstar/ubuntuone-ios-music/settings-view into lp:ubuntuone-ios-music
- settings-view
- Merge into trunk
Proposed by
Paul Hummer
Status: | Merged |
---|---|
Approved by: | Paul Hummer |
Approved revision: | 262 |
Merged at revision: | 245 |
Proposed branch: | lp:~rockstar/ubuntuone-ios-music/settings-view |
Merge into: | lp:ubuntuone-ios-music |
Prerequisite: | lp:~rockstar/ubuntuone-ios-music/download-song |
Diff against target: |
531 lines (+202/-223) 3 files modified
Music/Storyboard_iPhone.storyboard (+149/-201) Music/View Controllers/SettingsViewController.m (+52/-21) U1Music-Info.plist (+1/-1) |
To merge this branch: | bzr merge lp:~rockstar/ubuntuone-ios-music/settings-view |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michał Karnicki (community) | Approve | ||
Review via email: mp+145212@code.launchpad.net |
Commit message
Polish SettingsAuthent
Description of the change
This branch adds the polish to the SettingsAuthent
SettingsAuthent
http://
http://
The SettingsViewCon
To post a comment you must log in.
Revision history for this message
Michał Karnicki (karni) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Music/Storyboard_iPhone.storyboard' |
2 | --- Music/Storyboard_iPhone.storyboard 2013-01-28 17:45:31 +0000 |
3 | +++ Music/Storyboard_iPhone.storyboard 2013-01-28 17:45:31 +0000 |
4 | @@ -614,39 +614,110 @@ |
5 | <rect key="frame" x="0.0" y="20" width="320" height="411"/> |
6 | <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
7 | <subviews> |
8 | - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="2qY-Nn-ktN"> |
9 | - <rect key="frame" x="64" y="68" width="193" height="44"/> |
10 | - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
11 | - <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/> |
12 | + <navigationBar contentMode="scaleToFill" barStyle="blackOpaque" id="fi9-Gu-y7h"> |
13 | + <rect key="frame" x="0.0" y="0.0" width="320" height="44"/> |
14 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> |
15 | + <items> |
16 | + <navigationItem title="Settings" id="1OL-cf-ieJ"/> |
17 | + </items> |
18 | + </navigationBar> |
19 | + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Song cache size" lineBreakMode="tailTruncation" minimumFontSize="10" id="PUs-Rk-Zrs"> |
20 | + <rect key="frame" x="20" y="245" width="158" height="21"/> |
21 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
22 | + <fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="13"/> |
23 | + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
24 | + <nil key="highlightedColor"/> |
25 | + </label> |
26 | + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Album art cache size" lineBreakMode="tailTruncation" minimumFontSize="10" id="oEU-Li-sVc"> |
27 | + <rect key="frame" x="20" y="274" width="158" height="21"/> |
28 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
29 | + <fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="13"/> |
30 | + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
31 | + <nil key="highlightedColor"/> |
32 | + </label> |
33 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" reversesTitleShadowWhenHighlighted="YES" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" id="LNT-7d-odm"> |
34 | + <rect key="frame" x="64" y="303" width="193" height="32"/> |
35 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
36 | + <color key="backgroundColor" red="0.86666673419999996" green="0.2823529541" blue="0.078431375319999996" alpha="1" colorSpace="deviceRGB"/> |
37 | + <fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="14"/> |
38 | + <state key="normal" title="Clear all caches"> |
39 | + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
40 | + <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/> |
41 | + </state> |
42 | + <state key="highlighted"> |
43 | + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
44 | + </state> |
45 | + <connections> |
46 | + <action selector="deleteCaches:" destination="1UW-CE-b1Y" eventType="touchUpInside" id="1Gj-ny-7JM"/> |
47 | + </connections> |
48 | + </button> |
49 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" reversesTitleShadowWhenHighlighted="YES" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" id="863-4b-UXs"> |
50 | + <rect key="frame" x="64" y="134" width="193" height="32"/> |
51 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
52 | + <color key="backgroundColor" red="0.86666673419999996" green="0.2823529541" blue="0.078431375319999996" alpha="1" colorSpace="deviceRGB"/> |
53 | + <fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="14"/> |
54 | <state key="normal" title="Sign out of Ubuntu One"> |
55 | - <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/> |
56 | + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
57 | <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/> |
58 | </state> |
59 | <state key="highlighted"> |
60 | <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
61 | </state> |
62 | <connections> |
63 | - <action selector="deleteCredentials:" destination="1UW-CE-b1Y" eventType="touchUpInside" id="dMs-la-BSc"/> |
64 | + <action selector="deleteCredentials:" destination="1UW-CE-b1Y" eventType="touchUpInside" id="M8K-LG-oBl"/> |
65 | </connections> |
66 | </button> |
67 | - <navigationBar contentMode="scaleToFill" barStyle="blackOpaque" id="fi9-Gu-y7h"> |
68 | - <rect key="frame" x="0.0" y="0.0" width="320" height="44"/> |
69 | - <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> |
70 | - <items> |
71 | - <navigationItem title="Settings" id="1OL-cf-ieJ"> |
72 | - <barButtonItem key="rightBarButtonItem" title="About" id="5t4-pZ-HZ3"> |
73 | - <connections> |
74 | - <segue destination="XwX-yD-gmZ" kind="modal" identifier="AboutSegue" id="q67-cb-9ch"/> |
75 | - </connections> |
76 | - </barButtonItem> |
77 | - </navigationItem> |
78 | - </items> |
79 | - </navigationBar> |
80 | + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Build number" lineBreakMode="tailTruncation" minimumFontSize="10" id="QdR-b3-4bk"> |
81 | + <rect key="frame" x="20" y="105" width="158" height="21"/> |
82 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
83 | + <fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="13"/> |
84 | + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
85 | + <nil key="highlightedColor"/> |
86 | + </label> |
87 | + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Version number" lineBreakMode="tailTruncation" minimumFontSize="10" id="Qow-i4-9k0"> |
88 | + <rect key="frame" x="20" y="76" width="158" height="21"/> |
89 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
90 | + <fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="13"/> |
91 | + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
92 | + <nil key="highlightedColor"/> |
93 | + </label> |
94 | + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="1.0" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="cOm-2r-Il3"> |
95 | + <rect key="frame" x="186" y="76" width="114" height="21"/> |
96 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
97 | + <fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="13"/> |
98 | + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
99 | + <nil key="highlightedColor"/> |
100 | + </label> |
101 | + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="69" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="mm9-ic-ZRm"> |
102 | + <rect key="frame" x="186" y="105" width="114" height="21"/> |
103 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
104 | + <fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="13"/> |
105 | + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
106 | + <nil key="highlightedColor"/> |
107 | + </label> |
108 | + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="800MB" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="lVK-6h-cMd"> |
109 | + <rect key="frame" x="186" y="245" width="114" height="21"/> |
110 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
111 | + <fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="13"/> |
112 | + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
113 | + <nil key="highlightedColor"/> |
114 | + </label> |
115 | + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="40MB" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="YkC-kB-145"> |
116 | + <rect key="frame" x="186" y="274" width="114" height="21"/> |
117 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
118 | + <fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="13"/> |
119 | + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
120 | + <nil key="highlightedColor"/> |
121 | + </label> |
122 | </subviews> |
123 | <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> |
124 | </view> |
125 | <tabBarItem key="tabBarItem" title="Settings" image="settings.png" id="PuB-gs-lxg"/> |
126 | <connections> |
127 | + <outlet property="artCacheSize" destination="YkC-kB-145" id="jvN-6G-FSp"/> |
128 | + <outlet property="buildNumber" destination="mm9-ic-ZRm" id="b6H-Qo-xNW"/> |
129 | + <outlet property="songCacheSize" destination="lVK-6h-cMd" id="MiM-1J-9Ww"/> |
130 | + <outlet property="versionNumber" destination="cOm-2r-Il3" id="ith-pv-96x"/> |
131 | <segue destination="iRB-yQ-1TX" kind="modal" identifier="AuthenticationSegue" id="HlT-h9-MTb"/> |
132 | </connections> |
133 | </viewController> |
134 | @@ -662,45 +733,69 @@ |
135 | <rect key="frame" x="0.0" y="64" width="320" height="504"/> |
136 | <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
137 | <subviews> |
138 | - <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Username" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ZEC-2H-d7Z"> |
139 | - <rect key="frame" x="121" y="20" width="79" height="21"/> |
140 | - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
141 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> |
142 | - <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
143 | - <nil key="highlightedColor"/> |
144 | - </label> |
145 | - <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Password" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="UfC-eE-bcj"> |
146 | - <rect key="frame" x="123" y="87" width="75" height="21"/> |
147 | - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
148 | - <fontDescription key="fontDescription" type="system" pointSize="17"/> |
149 | - <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
150 | - <nil key="highlightedColor"/> |
151 | - </label> |
152 | - <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" id="waC-mM-MFm"> |
153 | - <rect key="frame" x="20" y="116" width="280" height="30"/> |
154 | - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
155 | - <fontDescription key="fontDescription" type="system" pointSize="14"/> |
156 | - <textInputTraits key="textInputTraits" returnKeyType="done" secureTextEntry="YES"/> |
157 | - </textField> |
158 | - <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" minimumFontSize="17" id="9eo-83-zSr"> |
159 | - <rect key="frame" x="20" y="49" width="280" height="30"/> |
160 | - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
161 | - <fontDescription key="fontDescription" type="system" pointSize="14"/> |
162 | - <textInputTraits key="textInputTraits" autocorrectionType="no" keyboardType="emailAddress" returnKeyType="next"/> |
163 | - </textField> |
164 | - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="du9-HJ-oTk"> |
165 | - <rect key="frame" x="126" y="154" width="69" height="44"/> |
166 | - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
167 | - <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/> |
168 | - <state key="normal" title="Log In"> |
169 | - <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/> |
170 | + <view contentMode="scaleToFill" id="br3-co-Aht"> |
171 | + <rect key="frame" x="0.0" y="0.0" width="320" height="44"/> |
172 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
173 | + <subviews> |
174 | + <view contentMode="scaleToFill" id="lUF-KI-wuR"> |
175 | + <rect key="frame" x="0.0" y="0.0" width="320" height="44"/> |
176 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
177 | + <subviews> |
178 | + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Log in to Ubuntu One" lineBreakMode="tailTruncation" minimumFontSize="10" id="m0d-R2-p4A"> |
179 | + <rect key="frame" x="69" y="11" width="182" height="22"/> |
180 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
181 | + <fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="17"/> |
182 | + <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
183 | + <nil key="highlightedColor"/> |
184 | + <color key="shadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
185 | + <size key="shadowOffset" width="0.0" height="0.0"/> |
186 | + </label> |
187 | + </subviews> |
188 | + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> |
189 | + </view> |
190 | + </subviews> |
191 | + <color key="backgroundColor" red="0.86666673419999996" green="0.2823529541" blue="0.078431375319999996" alpha="1" colorSpace="deviceRGB"/> |
192 | + </view> |
193 | + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="user@example.com" minimumFontSize="17" id="JoC-hu-hLx"> |
194 | + <rect key="frame" x="120" y="58" width="180" height="31"/> |
195 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
196 | + <fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="12"/> |
197 | + <textInputTraits key="textInputTraits" autocorrectionType="no" keyboardType="emailAddress"/> |
198 | + </textField> |
199 | + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="password" minimumFontSize="17" id="Ks6-tM-pWd"> |
200 | + <rect key="frame" x="120" y="97" width="180" height="31"/> |
201 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
202 | + <fontDescription key="fontDescription" type="system" pointSize="12"/> |
203 | + <textInputTraits key="textInputTraits" secureTextEntry="YES"/> |
204 | + </textField> |
205 | + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Email address:" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="dLK-0a-SBm"> |
206 | + <rect key="frame" x="13" y="62" width="101" height="21"/> |
207 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
208 | + <fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="13"/> |
209 | + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
210 | + <nil key="highlightedColor"/> |
211 | + </label> |
212 | + <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Password:" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="tPE-XB-SZr"> |
213 | + <rect key="frame" x="13" y="101" width="101" height="21"/> |
214 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
215 | + <fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="13"/> |
216 | + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> |
217 | + <nil key="highlightedColor"/> |
218 | + </label> |
219 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" reversesTitleShadowWhenHighlighted="YES" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" id="tcx-D1-zOs"> |
220 | + <rect key="frame" x="180" y="143" width="120" height="32"/> |
221 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
222 | + <color key="backgroundColor" red="0.86666673419999996" green="0.2823529541" blue="0.078431375319999996" alpha="1" colorSpace="deviceRGB"/> |
223 | + <fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="14"/> |
224 | + <state key="normal" title="Log in"> |
225 | + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
226 | <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/> |
227 | </state> |
228 | <state key="highlighted"> |
229 | <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
230 | </state> |
231 | <connections> |
232 | - <action selector="authenticate:" destination="iRB-yQ-1TX" eventType="touchUpInside" id="Sfs-XA-OBI"/> |
233 | + <action selector="authenticate:" destination="iRB-yQ-1TX" eventType="touchUpInside" id="w5w-kg-773"/> |
234 | </connections> |
235 | </button> |
236 | <view hidden="YES" alpha="0.70000000000000007" contentMode="scaleToFill" id="KV8-kp-weQ"> |
237 | @@ -720,55 +815,16 @@ |
238 | <navigationItem key="navigationItem" title="Log In" id="lZr-l9-Rd0"/> |
239 | <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/> |
240 | <connections> |
241 | - <outlet property="passwordField" destination="waC-mM-MFm" id="J4I-c0-hPj"/> |
242 | + <outlet property="passwordField" destination="Ks6-tM-pWd" id="gGt-DG-MeG"/> |
243 | <outlet property="shade" destination="KV8-kp-weQ" id="HgB-zm-dOv"/> |
244 | <outlet property="spinner" destination="ixc-ts-ry3" id="Zjn-Dn-l1x"/> |
245 | - <outlet property="usernameField" destination="9eo-83-zSr" id="k5m-z6-dNf"/> |
246 | + <outlet property="usernameField" destination="JoC-hu-hLx" id="GNM-ip-H5g"/> |
247 | </connections> |
248 | </viewController> |
249 | <placeholder placeholderIdentifier="IBFirstResponder" id="Oct-dr-Jot" userLabel="First Responder" sceneMemberID="firstResponder"/> |
250 | </objects> |
251 | <point key="canvasLocation" x="1047" y="2638"/> |
252 | </scene> |
253 | - <!--Settings About View Controller - Ubuntu One Music--> |
254 | - <scene sceneID="DCB-cK-aCY"> |
255 | - <objects> |
256 | - <viewController storyboardIdentifier="SettingsAboutViewController" title="Ubuntu One Music" useStoryboardIdentifierAsRestorationIdentifier="YES" id="XwX-yD-gmZ" customClass="SettingsAboutViewController" sceneMemberID="viewController"> |
257 | - <view key="view" contentMode="scaleToFill" id="ezs-Zb-PEL"> |
258 | - <rect key="frame" x="0.0" y="64" width="320" height="504"/> |
259 | - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
260 | - <subviews> |
261 | - <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="4sj-Hk-nsd"> |
262 | - <rect key="frame" x="130" y="248" width="62" height="44"/> |
263 | - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
264 | - <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/> |
265 | - <state key="normal" title="Done"> |
266 | - <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/> |
267 | - <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/> |
268 | - </state> |
269 | - <state key="highlighted"> |
270 | - <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> |
271 | - </state> |
272 | - <connections> |
273 | - <action selector="close:" destination="XwX-yD-gmZ" eventType="touchUpInside" id="GOR-Ec-Jnn"/> |
274 | - </connections> |
275 | - </button> |
276 | - </subviews> |
277 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> |
278 | - </view> |
279 | - <navigationItem key="navigationItem" title="Ubuntu One Music" id="mZO-nv-iEf"> |
280 | - <barButtonItem key="rightBarButtonItem" title="Done" id="sDu-OP-vCU"> |
281 | - <connections> |
282 | - <action selector="close:" destination="XwX-yD-gmZ" id="3kP-cf-7xQ"/> |
283 | - </connections> |
284 | - </barButtonItem> |
285 | - </navigationItem> |
286 | - <simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/> |
287 | - </viewController> |
288 | - <placeholder placeholderIdentifier="IBFirstResponder" id="Gk9-4p-GpB" userLabel="First Responder" sceneMemberID="firstResponder"/> |
289 | - </objects> |
290 | - <point key="canvasLocation" x="1047" y="3324"/> |
291 | - </scene> |
292 | <!--Navigation Controller - Songs--> |
293 | <scene sceneID="H5C-K6-iJr"> |
294 | <objects> |
295 | @@ -818,114 +874,6 @@ |
296 | <image name="settings.png" width="30" height="30"/> |
297 | <image name="songs.png" width="30" height="30"/> |
298 | </resources> |
299 | - <classes> |
300 | - <class className="AlbumCell" superclassName="UITableViewCell"> |
301 | - <source key="sourceIdentifier" type="project" relativePath="./Classes/AlbumCell.h"/> |
302 | - </class> |
303 | - <class className="AlbumViewController" superclassName="SubsonicTableViewController"> |
304 | - <source key="sourceIdentifier" type="project" relativePath="./Classes/AlbumViewController.h"/> |
305 | - <relationships> |
306 | - <relationship kind="outlet" name="albumArt" candidateClass="UIImageView"/> |
307 | - <relationship kind="outlet" name="albumDescription" candidateClass="UILabel"/> |
308 | - <relationship kind="outlet" name="albumTitle" candidateClass="UILabel"/> |
309 | - <relationship kind="outlet" name="tableView" candidateClass="UITableView"/> |
310 | - </relationships> |
311 | - </class> |
312 | - <class className="AlbumsViewController" superclassName="UOIndexedViewController"> |
313 | - <source key="sourceIdentifier" type="project" relativePath="./Classes/AlbumsViewController.h"/> |
314 | - </class> |
315 | - <class className="ArtistCell" superclassName="UITableViewCell"> |
316 | - <source key="sourceIdentifier" type="project" relativePath="./Classes/ArtistCell.h"/> |
317 | - </class> |
318 | - <class className="ArtistViewController" superclassName="UIViewController"> |
319 | - <source key="sourceIdentifier" type="project" relativePath="./Classes/ArtistViewController.h"/> |
320 | - <relationships> |
321 | - <relationship kind="outlet" name="albumArt" candidateClass="UIImageView"/> |
322 | - <relationship kind="outlet" name="artistDescription" candidateClass="UILabel"/> |
323 | - <relationship kind="outlet" name="artistName" candidateClass="UILabel"/> |
324 | - <relationship kind="outlet" name="nowPlayingButton" candidateClass="UIBarButtonItem"/> |
325 | - <relationship kind="outlet" name="tableView" candidateClass="UITableView"/> |
326 | - </relationships> |
327 | - </class> |
328 | - <class className="ArtistsViewController" superclassName="UOIndexedViewController"> |
329 | - <source key="sourceIdentifier" type="project" relativePath="./Classes/ArtistsViewController.h"/> |
330 | - </class> |
331 | - <class className="PlayerHeaderView" superclassName="UIView"> |
332 | - <source key="sourceIdentifier" type="project" relativePath="./Classes/PlayerHeaderView.h"/> |
333 | - <relationships> |
334 | - <relationship kind="outlet" name="album" candidateClass="UILabel"/> |
335 | - <relationship kind="outlet" name="artist" candidateClass="UILabel"/> |
336 | - <relationship kind="outlet" name="title" candidateClass="UILabel"/> |
337 | - </relationships> |
338 | - </class> |
339 | - <class className="PlayerViewController" superclassName="UIViewController"> |
340 | - <source key="sourceIdentifier" type="project" relativePath="./Classes/PlayerViewController.h"/> |
341 | - <relationships> |
342 | - <relationship kind="action" name="hide:"/> |
343 | - <relationship kind="action" name="next:"/> |
344 | - <relationship kind="action" name="pause:"/> |
345 | - <relationship kind="action" name="play:"/> |
346 | - <relationship kind="action" name="previous:"/> |
347 | - <relationship kind="outlet" name="albumart" candidateClass="UIButton"/> |
348 | - <relationship kind="outlet" name="artistLabel" candidateClass="UILabel"/> |
349 | - <relationship kind="outlet" name="controlBar" candidateClass="UIToolbar"/> |
350 | - <relationship kind="outlet" name="nextButton" candidateClass="UIBarButtonItem"/> |
351 | - <relationship kind="outlet" name="pauseButton" candidateClass="UIBarButtonItem"/> |
352 | - <relationship kind="outlet" name="playButton" candidateClass="UIBarButtonItem"/> |
353 | - <relationship kind="outlet" name="previousButton" candidateClass="UIBarButtonItem"/> |
354 | - <relationship kind="outlet" name="titleLabel" candidateClass="UILabel"/> |
355 | - </relationships> |
356 | - </class> |
357 | - <class className="PlaylistCell" superclassName="UITableViewCell"> |
358 | - <source key="sourceIdentifier" type="project" relativePath="./Classes/PlaylistCell.h"/> |
359 | - </class> |
360 | - <class className="PlaylistsViewController" superclassName="UOIndexedViewController"> |
361 | - <source key="sourceIdentifier" type="project" relativePath="./Classes/PlaylistsViewController.h"/> |
362 | - </class> |
363 | - <class className="SettingsAboutViewController" superclassName="UIViewController"> |
364 | - <source key="sourceIdentifier" type="project" relativePath="./Classes/SettingsAboutViewController.h"/> |
365 | - <relationships> |
366 | - <relationship kind="action" name="close:"/> |
367 | - </relationships> |
368 | - </class> |
369 | - <class className="SettingsAuthenticationViewController" superclassName="UIViewController"> |
370 | - <source key="sourceIdentifier" type="project" relativePath="./Classes/SettingsAuthenticationViewController.h"/> |
371 | - <relationships> |
372 | - <relationship kind="action" name="authenticate:"/> |
373 | - <relationship kind="outlet" name="passwordField" candidateClass="UITextField"/> |
374 | - <relationship kind="outlet" name="shade" candidateClass="UIView"/> |
375 | - <relationship kind="outlet" name="spinner" candidateClass="UIActivityIndicatorView"/> |
376 | - <relationship kind="outlet" name="usernameField" candidateClass="UITextField"/> |
377 | - </relationships> |
378 | - </class> |
379 | - <class className="SettingsViewController" superclassName="UIViewController"> |
380 | - <source key="sourceIdentifier" type="project" relativePath="./Classes/SettingsViewController.h"/> |
381 | - <relationships> |
382 | - <relationship kind="action" name="deleteCredentials:"/> |
383 | - </relationships> |
384 | - </class> |
385 | - <class className="SongCell" superclassName="UITableViewCell"> |
386 | - <source key="sourceIdentifier" type="project" relativePath="./Classes/SongCell.h"/> |
387 | - <relationships> |
388 | - <relationship kind="outlet" name="cacheImageIndicator" candidateClass="UIImageView"/> |
389 | - <relationship kind="outlet" name="cacheIndicator" candidateClass="UIView"/> |
390 | - <relationship kind="outlet" name="clock" candidateClass="UILabel"/> |
391 | - <relationship kind="outlet" name="handle" candidateClass="UIImageView"/> |
392 | - <relationship kind="outlet" name="title" candidateClass="UILabel"/> |
393 | - <relationship kind="outlet" name="topView" candidateClass="UIView"/> |
394 | - <relationship kind="outlet" name="track" candidateClass="UILabel"/> |
395 | - </relationships> |
396 | - </class> |
397 | - <class className="SongsViewController" superclassName="UOIndexedViewController"> |
398 | - <source key="sourceIdentifier" type="project" relativePath="./Classes/SongsViewController.h"/> |
399 | - </class> |
400 | - <class className="UOIndexedViewController" superclassName="UITableViewController"> |
401 | - <source key="sourceIdentifier" type="project" relativePath="./Classes/UOIndexedViewController.h"/> |
402 | - <relationships> |
403 | - <relationship kind="outlet" name="nowPlayingButton" candidateClass="UIBarButtonItem"/> |
404 | - </relationships> |
405 | - </class> |
406 | - </classes> |
407 | <simulatedMetricsContainer key="defaultSimulatedMetrics"> |
408 | <simulatedStatusBarMetrics key="statusBar"/> |
409 | <simulatedOrientationMetrics key="orientation"/> |
410 | |
411 | === modified file 'Music/View Controllers/SettingsViewController.m' |
412 | --- Music/View Controllers/SettingsViewController.m 2013-01-22 19:50:43 +0000 |
413 | +++ Music/View Controllers/SettingsViewController.m 2013-01-28 17:45:31 +0000 |
414 | @@ -8,40 +8,31 @@ |
415 | |
416 | #import "SettingsViewController.h" |
417 | #import "UOAuthManager.h" |
418 | +#import "UOAppDelegate.h" |
419 | |
420 | @interface SettingsViewController () |
421 | - (IBAction)deleteCredentials:(id)sender; |
422 | +- (IBAction)deleteCaches:(id)sender; |
423 | + |
424 | +@property (nonatomic, weak) IBOutlet UILabel *versionNumber; |
425 | +@property (nonatomic, weak) IBOutlet UILabel *buildNumber; |
426 | +@property (nonatomic, weak) IBOutlet UILabel *songCacheSize; |
427 | +@property (nonatomic, weak) IBOutlet UILabel *artCacheSize; |
428 | |
429 | @end |
430 | |
431 | @implementation SettingsViewController |
432 | |
433 | -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil |
434 | -{ |
435 | - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; |
436 | - if (self) { |
437 | - // Custom initialization |
438 | - } |
439 | - return self; |
440 | -} |
441 | - |
442 | -- (void)viewDidLoad |
443 | -{ |
444 | - [super viewDidLoad]; |
445 | - // Do any additional setup after loading the view. |
446 | -} |
447 | - |
448 | - (void)viewDidAppear:(BOOL)animated { |
449 | [super viewDidAppear:animated]; |
450 | + |
451 | + self.versionNumber.text = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; |
452 | + self.buildNumber.text = [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey]; |
453 | + [self updateCacheSizes]; |
454 | + |
455 | [self checkAuthentication]; |
456 | } |
457 | |
458 | -- (void)didReceiveMemoryWarning |
459 | -{ |
460 | - [super didReceiveMemoryWarning]; |
461 | - // Dispose of any resources that can be recreated. |
462 | -} |
463 | - |
464 | #pragma mark - Actions |
465 | |
466 | - (IBAction)deleteCredentials:(id)sender { |
467 | @@ -49,6 +40,20 @@ |
468 | [self checkAuthentication]; |
469 | } |
470 | |
471 | +- (IBAction)deleteCaches:(id)sender { |
472 | + NSArray *cacheDirectories = @[ |
473 | + [[UOAppDelegate delegate] songDirectory], |
474 | + [[UOAppDelegate delegate] albumArtDirectory] |
475 | + ]; |
476 | + |
477 | + NSError *error = nil; |
478 | + for (NSURL *directory in cacheDirectories) { |
479 | + [[NSFileManager defaultManager] removeItemAtURL:directory error:&error]; |
480 | + [[NSFileManager defaultManager] createDirectoryAtPath:[directory path] withIntermediateDirectories:YES attributes:nil error:&error]; |
481 | + } |
482 | + [self updateCacheSizes]; |
483 | +} |
484 | + |
485 | #pragma mark - Private methods |
486 | |
487 | - (void)checkAuthentication { |
488 | @@ -57,4 +62,30 @@ |
489 | } |
490 | } |
491 | |
492 | +- (void)updateCacheSizes { |
493 | + double artCacheSize = [self getFolderSize:[[[UOAppDelegate delegate] albumArtDirectory] path]]; |
494 | + self.artCacheSize.text = [NSString stringWithFormat:@"%.2f MB",((artCacheSize / 1024.0f) / 1024.0f)]; |
495 | + |
496 | + double offlineCacheSize = [self getFolderSize:[[[UOAppDelegate delegate] songDirectory] path]]; |
497 | + self.songCacheSize.text = [NSString stringWithFormat:@"%.2f MB", ((offlineCacheSize / 1024.0f) / 1024.0f)]; |
498 | +} |
499 | + |
500 | +- (double)getFolderSize:(NSString *)path { |
501 | + static int minBlock = 4096; |
502 | + |
503 | + NSString *file = nil; |
504 | + NSDictionary *fileAttrs = nil; |
505 | + double totalSize = 0; |
506 | + |
507 | + NSDirectoryEnumerator *enumerator = [[NSFileManager defaultManager] enumeratorAtPath:path]; |
508 | + |
509 | + while (file = [enumerator nextObject]) { |
510 | + fileAttrs = [enumerator fileAttributes]; |
511 | + if (![[fileAttrs valueForKey:NSFileType] isEqual:NSFileTypeDirectory]) { |
512 | + totalSize += ((([[fileAttrs valueForKey:NSFileSize] unsignedIntValue] + minBlock - 1) / minBlock) * minBlock); |
513 | + } |
514 | + } |
515 | + return totalSize; |
516 | +} |
517 | + |
518 | @end |
519 | |
520 | === modified file 'U1Music-Info.plist' |
521 | --- U1Music-Info.plist 2013-01-22 19:50:43 +0000 |
522 | +++ U1Music-Info.plist 2013-01-28 17:45:31 +0000 |
523 | @@ -24,7 +24,7 @@ |
524 | <key>CFBundlePackageType</key> |
525 | <string>APPL</string> |
526 | <key>CFBundleShortVersionString</key> |
527 | - <string>2.4</string> |
528 | + <string>3.0b1</string> |
529 | <key>CFBundleSignature</key> |
530 | <string>UOMS</string> |
531 | <key>CFBundleURLTypes</key> |