Browse Source

Added List Length Preference. Added About Screen. Added App Icon.

Thomas Buck 10 years ago
parent
commit
a99204c7de

+ 117
- 25
Prefs.xib View File

@@ -6,6 +6,9 @@
6 6
     <objects>
7 7
         <customObject id="-2" userLabel="File's Owner" customClass="PrefController">
8 8
             <connections>
9
+                <outlet property="lengthField" destination="MAv-jO-hIv" id="tbQ-UG-2ew"/>
10
+                <outlet property="lengthFormat" destination="zpc-oG-upp" id="AKk-rK-pM3"/>
11
+                <outlet property="lengthStepper" destination="jxz-fQ-M1L" id="NK5-G4-9UJ"/>
9 12
                 <outlet property="password" destination="ARP-lb-J16" id="EDd-om-ciF"/>
10 13
                 <outlet property="subreddits" destination="EhP-FS-8dT" id="td1-kv-jQm"/>
11 14
                 <outlet property="subscriptions" destination="vW5-Cp-Bm1" id="gja-K0-7Uh"/>
@@ -18,14 +21,14 @@
18 21
         <window title="Reddit Bar Preferences" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" oneShot="NO" releasedWhenClosed="NO" wantsToBeColor="NO" animationBehavior="default" id="1">
19 22
             <windowStyleMask key="styleMask" titled="YES" closable="YES"/>
20 23
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
21
-            <rect key="contentRect" x="196" y="240" width="340" height="320"/>
24
+            <rect key="contentRect" x="196" y="240" width="340" height="339"/>
22 25
             <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1058"/>
23 26
             <view key="contentView" id="2">
24
-                <rect key="frame" x="0.0" y="0.0" width="340" height="320"/>
27
+                <rect key="frame" x="0.0" y="0.0" width="340" height="339"/>
25 28
                 <autoresizingMask key="autoresizingMask"/>
26 29
                 <subviews>
27
-                    <textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="0mi-88-o94">
28
-                        <rect key="frame" x="120" y="280" width="200" height="22"/>
30
+                    <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0mi-88-o94">
31
+                        <rect key="frame" x="120" y="299" width="200" height="22"/>
29 32
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
30 33
                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="xlI-hU-MqM">
31 34
                             <font key="font" metaFont="system"/>
@@ -33,17 +36,20 @@
33 36
                             <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
34 37
                         </textFieldCell>
35 38
                     </textField>
36
-                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="f72-fM-yQc">
37
-                        <rect key="frame" x="18" y="283" width="96" height="17"/>
39
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="f72-fM-yQc">
40
+                        <rect key="frame" x="18" y="302" width="96" height="17"/>
38 41
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
42
+                        <constraints>
43
+                            <constraint firstAttribute="width" constant="92" id="NaA-TF-vqk"/>
44
+                        </constraints>
39 45
                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Username: " id="GTO-OP-MYS">
40 46
                             <font key="font" metaFont="system"/>
41 47
                             <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
42 48
                             <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
43 49
                         </textFieldCell>
44 50
                     </textField>
45
-                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="JMQ-a6-DKC">
46
-                        <rect key="frame" x="18" y="251" width="96" height="17"/>
51
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JMQ-a6-DKC">
52
+                        <rect key="frame" x="18" y="270" width="96" height="17"/>
47 53
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
48 54
                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Password:" id="m11-YF-fEa">
49 55
                             <font key="font" metaFont="system"/>
@@ -51,8 +57,20 @@
51 57
                             <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
52 58
                         </textFieldCell>
53 59
                     </textField>
54
-                    <secureTextField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ARP-lb-J16">
55
-                        <rect key="frame" x="120" y="248" width="200" height="22"/>
60
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qFP-pd-32c">
61
+                        <rect key="frame" x="6" y="52" width="96" height="17"/>
62
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
63
+                        <constraints>
64
+                            <constraint firstAttribute="width" constant="92" id="y5l-ux-awZ"/>
65
+                        </constraints>
66
+                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Items:" id="FNJ-RL-DXT">
67
+                            <font key="font" metaFont="system"/>
68
+                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
69
+                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
70
+                        </textFieldCell>
71
+                    </textField>
72
+                    <secureTextField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ARP-lb-J16">
73
+                        <rect key="frame" x="120" y="267" width="200" height="22"/>
56 74
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
57 75
                         <secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="We7-pG-rAt">
58 76
                             <font key="font" metaFont="system"/>
@@ -63,9 +81,12 @@
63 81
                             </allowedInputSourceLocales>
64 82
                         </secureTextFieldCell>
65 83
                     </secureTextField>
66
-                    <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qwZ-cF-1JN">
84
+                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qwZ-cF-1JN">
67 85
                         <rect key="frame" x="224" y="13" width="102" height="32"/>
68 86
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
87
+                        <constraints>
88
+                            <constraint firstAttribute="width" constant="90" id="6O3-yW-gA0"/>
89
+                        </constraints>
69 90
                         <buttonCell key="cell" type="push" title="Save" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Mqa-FJ-C43">
70 91
                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
71 92
                             <font key="font" metaFont="system"/>
@@ -74,9 +95,12 @@
74 95
                             <action selector="buttonSave:" target="-2" id="thy-nQ-Nld"/>
75 96
                         </connections>
76 97
                     </button>
77
-                    <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="vO2-NN-i1n">
98
+                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="vO2-NN-i1n">
78 99
                         <rect key="frame" x="14" y="13" width="102" height="32"/>
79 100
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
101
+                        <constraints>
102
+                            <constraint firstAttribute="width" constant="90" id="ZXJ-Cb-INd"/>
103
+                        </constraints>
80 104
                         <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="TjO-Z6-Vng">
81 105
                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
82 106
                             <font key="font" metaFont="system"/>
@@ -88,8 +112,8 @@ Gw
88 112
                             <action selector="performClose:" target="1" id="A62-EW-ZrT"/>
89 113
                         </connections>
90 114
                     </button>
91
-                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="R9P-ZH-hHZ">
92
-                        <rect key="frame" x="18" y="216" width="96" height="17"/>
115
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="R9P-ZH-hHZ">
116
+                        <rect key="frame" x="18" y="235" width="96" height="17"/>
93 117
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
94 118
                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Subreddits:" id="Cmr-7n-CaG">
95 119
                             <font key="font" metaFont="system"/>
@@ -97,21 +121,21 @@ Gw
97 121
                             <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
98 122
                         </textFieldCell>
99 123
                     </textField>
100
-                    <scrollView fixedFrame="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8ew-wY-1Yh">
101
-                        <rect key="frame" x="20" y="61" width="300" height="147"/>
124
+                    <scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8ew-wY-1Yh">
125
+                        <rect key="frame" x="20" y="77" width="300" height="150"/>
102 126
                         <autoresizingMask key="autoresizingMask"/>
103
-                        <clipView key="contentView" ambiguous="YES" misplaced="YES" copiesOnScroll="NO" id="ENU-Jw-8fO">
104
-                            <rect key="frame" x="1" y="1" width="298" height="145"/>
127
+                        <clipView key="contentView" copiesOnScroll="NO" id="ENU-Jw-8fO">
128
+                            <rect key="frame" x="1" y="1" width="298" height="148"/>
105 129
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
106 130
                             <subviews>
107
-                                <textView ambiguous="YES" editable="NO" importsGraphics="NO" richText="NO" findStyle="panel" allowsUndo="YES" verticallyResizable="YES" allowsNonContiguousLayout="YES" id="EhP-FS-8dT">
108
-                                    <rect key="frame" x="0.0" y="0.0" width="298" height="145"/>
131
+                                <textView editable="NO" importsGraphics="NO" richText="NO" findStyle="panel" allowsUndo="YES" verticallyResizable="YES" allowsNonContiguousLayout="YES" id="EhP-FS-8dT">
132
+                                    <rect key="frame" x="0.0" y="0.0" width="298" height="148"/>
109 133
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
110 134
                                     <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
111
-                                    <size key="minSize" width="298" height="145"/>
135
+                                    <size key="minSize" width="298" height="148"/>
112 136
                                     <size key="maxSize" width="463" height="10000000"/>
113 137
                                     <color key="insertionPointColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
114
-                                    <size key="minSize" width="298" height="145"/>
138
+                                    <size key="minSize" width="298" height="148"/>
115 139
                                     <size key="maxSize" width="463" height="10000000"/>
116 140
                                 </textView>
117 141
                             </subviews>
@@ -122,12 +146,12 @@ Gw
122 146
                             <autoresizingMask key="autoresizingMask"/>
123 147
                         </scroller>
124 148
                         <scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="z7j-r6-B6f">
125
-                            <rect key="frame" x="283" y="1" width="16" height="145"/>
149
+                            <rect key="frame" x="283" y="1" width="16" height="148"/>
126 150
                             <autoresizingMask key="autoresizingMask"/>
127 151
                         </scroller>
128 152
                     </scrollView>
129
-                    <button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="XZM-90-hQ8">
130
-                        <rect key="frame" x="118" y="215" width="204" height="18"/>
153
+                    <button translatesAutoresizingMaskIntoConstraints="NO" id="XZM-90-hQ8">
154
+                        <rect key="frame" x="118" y="234" width="204" height="18"/>
131 155
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
132 156
                         <buttonCell key="cell" type="check" title="Subscriptions" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="vW5-Cp-Bm1">
133 157
                             <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@@ -137,8 +161,76 @@ Gw
137 161
                             <action selector="toggleSubs:" target="-2" id="TPd-6W-xQv"/>
138 162
                         </connections>
139 163
                     </button>
164
+                    <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MAv-jO-hIv">
165
+                        <rect key="frame" x="120" y="49" width="96" height="22"/>
166
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
167
+                        <constraints>
168
+                            <constraint firstAttribute="width" constant="96" id="Q7V-Gm-EfI"/>
169
+                        </constraints>
170
+                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="right" title="10" drawsBackground="YES" id="0SD-Tf-uZS">
171
+                            <font key="font" metaFont="system"/>
172
+                            <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
173
+                            <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
174
+                        </textFieldCell>
175
+                        <connections>
176
+                            <action selector="lengthDidChange:" target="-2" id="fU0-l2-dIz"/>
177
+                            <outlet property="formatter" destination="zpc-oG-upp" id="cw1-hM-34K"/>
178
+                        </connections>
179
+                    </textField>
180
+                    <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jxz-fQ-M1L">
181
+                        <rect key="frame" x="221" y="46" width="19" height="27"/>
182
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
183
+                        <stepperCell key="cell" continuous="YES" alignment="left" maxValue="100" id="Gba-jV-Ouh"/>
184
+                        <connections>
185
+                            <action selector="lengthDidChange:" target="-2" id="CJm-58-seM"/>
186
+                        </connections>
187
+                    </stepper>
140 188
                 </subviews>
189
+                <constraints>
190
+                    <constraint firstItem="f72-fM-yQc" firstAttribute="top" secondItem="2" secondAttribute="top" constant="20" symbolic="YES" id="29D-Aw-Hsq"/>
191
+                    <constraint firstItem="R9P-ZH-hHZ" firstAttribute="leading" secondItem="JMQ-a6-DKC" secondAttribute="leading" id="37a-j4-cea"/>
192
+                    <constraint firstItem="qFP-pd-32c" firstAttribute="centerY" secondItem="jxz-fQ-M1L" secondAttribute="centerY" id="7Cf-YA-CG9"/>
193
+                    <constraint firstItem="XZM-90-hQ8" firstAttribute="trailing" secondItem="ARP-lb-J16" secondAttribute="trailing" id="7Na-cW-VbT"/>
194
+                    <constraint firstItem="8ew-wY-1Yh" firstAttribute="trailing" secondItem="XZM-90-hQ8" secondAttribute="trailing" id="7bq-Le-SlA"/>
195
+                    <constraint firstItem="qFP-pd-32c" firstAttribute="top" secondItem="8ew-wY-1Yh" secondAttribute="bottom" constant="8" symbolic="YES" id="7uB-Kt-r8c"/>
196
+                    <constraint firstItem="ARP-lb-J16" firstAttribute="leading" secondItem="JMQ-a6-DKC" secondAttribute="trailing" constant="8" symbolic="YES" id="ANm-KU-ah0"/>
197
+                    <constraint firstItem="qFP-pd-32c" firstAttribute="centerY" secondItem="MAv-jO-hIv" secondAttribute="centerY" id="C6t-id-Y7F"/>
198
+                    <constraint firstItem="0mi-88-o94" firstAttribute="leading" secondItem="f72-fM-yQc" secondAttribute="trailing" constant="8" symbolic="YES" id="DeX-3f-5VX"/>
199
+                    <constraint firstItem="R9P-ZH-hHZ" firstAttribute="baseline" secondItem="XZM-90-hQ8" secondAttribute="baseline" id="Dyr-Lq-Ctl"/>
200
+                    <constraint firstItem="vO2-NN-i1n" firstAttribute="baseline" secondItem="qwZ-cF-1JN" secondAttribute="baseline" id="Ess-AZ-MVK"/>
201
+                    <constraint firstItem="R9P-ZH-hHZ" firstAttribute="leading" secondItem="8ew-wY-1Yh" secondAttribute="leading" id="G3T-Ry-7uZ"/>
202
+                    <constraint firstItem="vO2-NN-i1n" firstAttribute="leading" secondItem="8ew-wY-1Yh" secondAttribute="leading" id="IsT-wH-jxK"/>
203
+                    <constraint firstAttribute="trailing" secondItem="0mi-88-o94" secondAttribute="trailing" constant="20" symbolic="YES" id="LZn-1N-eno"/>
204
+                    <constraint firstItem="f72-fM-yQc" firstAttribute="centerY" secondItem="0mi-88-o94" secondAttribute="centerY" id="LfD-Yu-zn8"/>
205
+                    <constraint firstItem="ARP-lb-J16" firstAttribute="leading" secondItem="0mi-88-o94" secondAttribute="leading" id="OYT-lx-Poi"/>
206
+                    <constraint firstItem="f72-fM-yQc" firstAttribute="leading" secondItem="2" secondAttribute="leading" constant="20" symbolic="YES" id="OiS-Rj-NBY"/>
207
+                    <constraint firstItem="XZM-90-hQ8" firstAttribute="leading" secondItem="R9P-ZH-hHZ" secondAttribute="trailing" constant="8" symbolic="YES" id="VL7-JL-apE"/>
208
+                    <constraint firstItem="vO2-NN-i1n" firstAttribute="top" secondItem="qFP-pd-32c" secondAttribute="bottom" constant="11" id="VdU-PT-I2v"/>
209
+                    <constraint firstItem="ARP-lb-J16" firstAttribute="leading" secondItem="XZM-90-hQ8" secondAttribute="leading" id="Vre-Lj-q0h"/>
210
+                    <constraint firstItem="jxz-fQ-M1L" firstAttribute="leading" secondItem="MAv-jO-hIv" secondAttribute="trailing" constant="8" symbolic="YES" id="Zpj-hy-F01"/>
211
+                    <constraint firstItem="ARP-lb-J16" firstAttribute="top" secondItem="0mi-88-o94" secondAttribute="bottom" constant="10" symbolic="YES" id="bI0-EE-Uau"/>
212
+                    <constraint firstItem="qFP-pd-32c" firstAttribute="leading" secondItem="2" secondAttribute="leading" constant="8" id="cqi-Wn-sxQ"/>
213
+                    <constraint firstItem="f72-fM-yQc" firstAttribute="leading" secondItem="JMQ-a6-DKC" secondAttribute="leading" id="fRq-oc-Xhi"/>
214
+                    <constraint firstItem="8ew-wY-1Yh" firstAttribute="top" secondItem="R9P-ZH-hHZ" secondAttribute="bottom" constant="8" symbolic="YES" id="fxf-FX-XZd"/>
215
+                    <constraint firstItem="8ew-wY-1Yh" firstAttribute="trailing" secondItem="qwZ-cF-1JN" secondAttribute="trailing" id="gAk-07-mMq"/>
216
+                    <constraint firstItem="MAv-jO-hIv" firstAttribute="leading" secondItem="qFP-pd-32c" secondAttribute="trailing" constant="20" id="hJP-mL-zrr"/>
217
+                    <constraint firstItem="XZM-90-hQ8" firstAttribute="top" secondItem="ARP-lb-J16" secondAttribute="bottom" constant="17" id="hf0-Vf-fvN"/>
218
+                    <constraint firstItem="JMQ-a6-DKC" firstAttribute="centerY" secondItem="ARP-lb-J16" secondAttribute="centerY" id="pYP-d0-eKw"/>
219
+                    <constraint firstItem="0mi-88-o94" firstAttribute="trailing" secondItem="ARP-lb-J16" secondAttribute="trailing" id="qtc-EY-7HS"/>
220
+                    <constraint firstAttribute="bottom" secondItem="vO2-NN-i1n" secondAttribute="bottom" constant="20" symbolic="YES" id="ynT-D2-t44"/>
221
+                </constraints>
141 222
             </view>
142 223
         </window>
224
+        <numberFormatter formatterBehavior="10_0" positiveFormat="0" negativeFormat="-0" hasThousandSeparators="NO" thousandSeparator="," id="zpc-oG-upp">
225
+            <attributedString key="attributedStringForZero">
226
+                <fragment content="0"/>
227
+            </attributedString>
228
+            <real key="minimum" value="0.0"/>
229
+            <real key="maximum" value="100"/>
230
+            <metadata>
231
+                <bool key="localizesFormat" value="YES"/>
232
+                <real key="inspectorSampleValue" value="1"/>
233
+            </metadata>
234
+        </numberFormatter>
143 235
     </objects>
144 236
 </document>

+ 19
- 0
RedditBar.xcodeproj/project.pbxproj View File

@@ -182,6 +182,7 @@
182 182
 			buildPhases = (
183 183
 				E9CF1F19184961010004AE02 /* Sources */,
184 184
 				E9CF1F1A184961010004AE02 /* Frameworks */,
185
+				E9341915184A3A6500D03488 /* ShellScript */,
185 186
 				E9CF1F1B184961010004AE02 /* Resources */,
186 187
 			);
187 188
 			buildRules = (
@@ -269,6 +270,22 @@
269 270
 		};
270 271
 /* End PBXResourcesBuildPhase section */
271 272
 
273
+/* Begin PBXShellScriptBuildPhase section */
274
+		E9341915184A3A6500D03488 /* ShellScript */ = {
275
+			isa = PBXShellScriptBuildPhase;
276
+			buildActionMask = 2147483647;
277
+			files = (
278
+			);
279
+			inputPaths = (
280
+			);
281
+			outputPaths = (
282
+			);
283
+			runOnlyForDeploymentPostprocessing = 0;
284
+			shellPath = /bin/sh;
285
+			shellScript = "buildNumber=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"${PROJECT_DIR}/${INFOPLIST_FILE}\")\nbuildNumber=$(($buildNumber + 1))\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"${PROJECT_DIR}/${INFOPLIST_FILE}\"";
286
+		};
287
+/* End PBXShellScriptBuildPhase section */
288
+
272 289
 /* Begin PBXSourcesBuildPhase section */
273 290
 		E9CF1F19184961010004AE02 /* Sources */ = {
274 291
 			isa = PBXSourcesBuildPhase;
@@ -411,6 +428,7 @@
411 428
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
412 429
 				GCC_PREFIX_HEADER = "RedditBar/RedditBar-Prefix.pch";
413 430
 				INFOPLIST_FILE = "RedditBar/RedditBar-Info.plist";
431
+				MACOSX_DEPLOYMENT_TARGET = 10.8;
414 432
 				PRODUCT_NAME = "$(TARGET_NAME)";
415 433
 				WRAPPER_EXTENSION = app;
416 434
 			};
@@ -424,6 +442,7 @@
424 442
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
425 443
 				GCC_PREFIX_HEADER = "RedditBar/RedditBar-Prefix.pch";
426 444
 				INFOPLIST_FILE = "RedditBar/RedditBar-Info.plist";
445
+				MACOSX_DEPLOYMENT_TARGET = 10.8;
427 446
 				PRODUCT_NAME = "$(TARGET_NAME)";
428 447
 				WRAPPER_EXTENSION = app;
429 448
 			};

+ 3
- 1
RedditBar/AppDelegate.h View File

@@ -13,6 +13,7 @@
13 13
 @interface AppDelegate : NSObject <NSApplicationDelegate>
14 14
 
15 15
 @property (atomic, retain) IBOutlet NSMenu *statusMenu;
16
+@property (atomic, retain) IBOutlet NSApplication *application;
16 17
 
17 18
 @property (atomic, retain) NSStatusItem *statusItem;
18 19
 @property (atomic, retain) NSImage *statusImage;
@@ -21,7 +22,8 @@
21 22
 @property (atomic, retain) StateModel *currentState;
22 23
 
23 24
 -(IBAction)showPreferences:(id)sender;
25
+-(IBAction)showAbout:(id)sender;
24 26
 
25
--(void)prefReturnName:(NSString *)name Modhash:(NSString *)modhash subscriptions:(Boolean)subscriptions subreddits:(NSString *)subreddits;
27
+-(void)prefReturnName:(NSString *)name Modhash:(NSString *)modhash subscriptions:(Boolean)subscriptions subreddits:(NSString *)subreddits length:(NSInteger)length;
26 28
 
27 29
 @end

+ 11
- 2
RedditBar/AppDelegate.m View File

@@ -10,13 +10,14 @@
10 10
 
11 11
 @implementation AppDelegate
12 12
 
13
-@synthesize statusMenu, statusItem, statusImage, statusHighlightImage, prefWindow, currentState;
13
+@synthesize statusMenu, statusItem, statusImage, statusHighlightImage, prefWindow, currentState, application;
14 14
 
15 15
 -(void)defaultPreferences {
16 16
     NSUserDefaults *store = [NSUserDefaults standardUserDefaults];
17 17
     NSMutableDictionary *appDefaults = [NSMutableDictionary dictionaryWithObject:@"" forKey:@"username"];
18 18
     [appDefaults setValue:@"" forKey:@"modhash"];
19 19
     [appDefaults setValue:[NSNumber numberWithBool:YES] forKey:@"subscriptions"];
20
+    [appDefaults setValue:[NSNumber numberWithInt:10] forKey:@"length"];
20 21
     [store registerDefaults:appDefaults];
21 22
 }
22 23
 
@@ -26,6 +27,7 @@
26 27
     [store setObject:currentState.modhash forKey:@"modhash"];
27 28
     [store setBool:currentState.useSubsciptions forKey:@"subscriptions"];
28 29
     [store setObject:currentState.subreddits forKey:@"subreddits"];
30
+    [store setInteger:currentState.length forKey:@"length"];
29 31
     [store synchronize];
30 32
 }
31 33
 
@@ -36,6 +38,7 @@
36 38
     [currentState setModhash:[store stringForKey:@"modhash"]];
37 39
     [currentState setUseSubsciptions:[store boolForKey:@"subscriptions"]];
38 40
     [currentState setSubreddits:[store arrayForKey:@"subreddits"]];
41
+    [currentState setLength:[store integerForKey:@"length"]];
39 42
 }
40 43
 
41 44
 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
@@ -65,11 +68,17 @@
65 68
     [prefWindow showWindow:self];
66 69
 }
67 70
 
68
--(void)prefReturnName:(NSString *)name Modhash:(NSString *)modhash subscriptions:(Boolean)subscriptions subreddits:(NSString *)subreddits {
71
+-(IBAction)showAbout:(id)sender {
72
+    [NSApp activateIgnoringOtherApps:YES];
73
+    [application orderFrontStandardAboutPanel:self];
74
+}
75
+
76
+-(void)prefReturnName:(NSString *)name Modhash:(NSString *)modhash subscriptions:(Boolean)subscriptions subreddits:(NSString *)subreddits length:(NSInteger)length {
69 77
     currentState.username = name;
70 78
     currentState.modhash = modhash;
71 79
     currentState.useSubsciptions = subscriptions;
72 80
     currentState.subreddits = [subreddits componentsSeparatedByString: @"\n"];
81
+    currentState.length = length;
73 82
     [self savePreferences]; // write currentState
74 83
     
75 84
     // TODO apply currentState

+ 10
- 3
RedditBar/Base.lproj/MainMenu.xib View File

@@ -13,6 +13,7 @@
13 13
         <customObject id="-3" userLabel="Application"/>
14 14
         <customObject id="494" customClass="AppDelegate">
15 15
             <connections>
16
+                <outlet property="application" destination="-3" id="1K5-sF-Im7"/>
16 17
                 <outlet property="statusMenu" destination="fuB-VS-nSq" id="AZY-3d-h8G"/>
17 18
             </connections>
18 19
         </customObject>
@@ -23,16 +24,22 @@
23 24
                     <modifierMask key="keyEquivalentModifierMask"/>
24 25
                 </menuItem>
25 26
                 <menuItem isSeparatorItem="YES" id="7Rc-fG-5uQ"/>
26
-                <menuItem title="Preferences" id="1lW-9C-xt6">
27
+                <menuItem title="Preferences..." id="1lW-9C-xt6">
27 28
                     <modifierMask key="keyEquivalentModifierMask"/>
28 29
                     <connections>
29 30
                         <action selector="showPreferences:" target="494" id="Fen-Ci-4tc"/>
30 31
                     </connections>
31 32
                 </menuItem>
32
-                <menuItem title="Quit" id="710-jT-UTj">
33
+                <menuItem title="About Reddit Bar" id="4ah-qP-9eP">
33 34
                     <modifierMask key="keyEquivalentModifierMask"/>
34 35
                     <connections>
35
-                        <action selector="terminate:" target="-1" id="xXG-pT-ly4"/>
36
+                        <action selector="showAbout:" target="494" id="7IO-ZS-OJf"/>
37
+                    </connections>
38
+                </menuItem>
39
+                <menuItem title="Quit" id="oyC-3G-WEc">
40
+                    <modifierMask key="keyEquivalentModifierMask"/>
41
+                    <connections>
42
+                        <action selector="terminate:" target="-1" id="AHO-0z-nt2"/>
36 43
                     </connections>
37 44
                 </menuItem>
38 45
             </items>

+ 20
- 10
RedditBar/Images.xcassets/AppIcon.appiconset/Contents.json View File

@@ -1,53 +1,63 @@
1 1
 {
2 2
   "images" : [
3 3
     {
4
-      "idiom" : "mac",
5 4
       "size" : "16x16",
5
+      "idiom" : "mac",
6
+      "filename" : "icon_16x16.png",
6 7
       "scale" : "1x"
7 8
     },
8 9
     {
9
-      "idiom" : "mac",
10 10
       "size" : "16x16",
11
+      "idiom" : "mac",
12
+      "filename" : "icon_16x16@2x.png",
11 13
       "scale" : "2x"
12 14
     },
13 15
     {
14
-      "idiom" : "mac",
15 16
       "size" : "32x32",
17
+      "idiom" : "mac",
18
+      "filename" : "icon_32x32-1.png",
16 19
       "scale" : "1x"
17 20
     },
18 21
     {
19
-      "idiom" : "mac",
20 22
       "size" : "32x32",
23
+      "idiom" : "mac",
24
+      "filename" : "icon_32x32@2x.png",
21 25
       "scale" : "2x"
22 26
     },
23 27
     {
24
-      "idiom" : "mac",
25 28
       "size" : "128x128",
29
+      "idiom" : "mac",
30
+      "filename" : "icon_128x128.png",
26 31
       "scale" : "1x"
27 32
     },
28 33
     {
29
-      "idiom" : "mac",
30 34
       "size" : "128x128",
35
+      "idiom" : "mac",
36
+      "filename" : "icon_128x128@2x.png",
31 37
       "scale" : "2x"
32 38
     },
33 39
     {
34
-      "idiom" : "mac",
35 40
       "size" : "256x256",
41
+      "idiom" : "mac",
42
+      "filename" : "icon_256x256.png",
36 43
       "scale" : "1x"
37 44
     },
38 45
     {
39
-      "idiom" : "mac",
40 46
       "size" : "256x256",
47
+      "idiom" : "mac",
48
+      "filename" : "icon_256x256@2x.png",
41 49
       "scale" : "2x"
42 50
     },
43 51
     {
44
-      "idiom" : "mac",
45 52
       "size" : "512x512",
53
+      "idiom" : "mac",
54
+      "filename" : "icon_512x512.png",
46 55
       "scale" : "1x"
47 56
     },
48 57
     {
49
-      "idiom" : "mac",
50 58
       "size" : "512x512",
59
+      "idiom" : "mac",
60
+      "filename" : "icon_512x512@2x.png",
51 61
       "scale" : "2x"
52 62
     }
53 63
   ],

BIN
RedditBar/Images.xcassets/AppIcon.appiconset/icon_128x128.png View File


BIN
RedditBar/Images.xcassets/AppIcon.appiconset/icon_128x128@2x.png View File


BIN
RedditBar/Images.xcassets/AppIcon.appiconset/icon_16x16.png View File


BIN
RedditBar/Images.xcassets/AppIcon.appiconset/icon_16x16@2x.png View File


BIN
RedditBar/Images.xcassets/AppIcon.appiconset/icon_256x256.png View File


BIN
RedditBar/Images.xcassets/AppIcon.appiconset/icon_256x256@2x.png View File


BIN
RedditBar/Images.xcassets/AppIcon.appiconset/icon_32x32-1.png View File


BIN
RedditBar/Images.xcassets/AppIcon.appiconset/icon_32x32@2x.png View File


BIN
RedditBar/Images.xcassets/AppIcon.appiconset/icon_512x512.png View File


BIN
RedditBar/Images.xcassets/AppIcon.appiconset/icon_512x512@2x.png View File


+ 7
- 2
RedditBar/PrefController.h View File

@@ -11,15 +11,20 @@
11 11
 
12 12
 @interface PrefController : NSWindowController
13 13
 
14
-@property (weak) IBOutlet NSTextField *username;
15
-@property (weak) IBOutlet NSSecureTextField *password;
14
+@property (atomic, retain) IBOutlet NSTextField *username;
15
+@property (atomic, retain) IBOutlet NSSecureTextField *password;
16 16
 @property (atomic, retain) IBOutlet NSButtonCell *subscriptions;
17 17
 @property (atomic, retain) IBOutlet NSTextView *subreddits;
18 18
 @property (atomic, retain) IBOutlet NSWindow *win;
19
+@property (atomic, retain) IBOutlet NSNumberFormatter *lengthFormat;
20
+@property (atomic, retain) IBOutlet NSTextField *lengthField;
21
+@property (atomic, retain) IBOutlet NSStepper *lengthStepper;
19 22
 @property (atomic, retain) NSObject *parent;
20 23
 @property (atomic, retain) StateModel *state;
24
+@property (atomic) NSInteger length;
21 25
 
22 26
 -(IBAction)buttonSave:(id)sender;
23 27
 -(IBAction)toggleSubs:(id)sender;
28
+-(IBAction)lengthDidChange:(id)sender;
24 29
 
25 30
 @end

+ 11
- 2
RedditBar/PrefController.m View File

@@ -11,7 +11,7 @@
11 11
 
12 12
 @implementation PrefController
13 13
 
14
-@synthesize username, password, subscriptions, subreddits, win, parent, state;
14
+@synthesize username, password, subscriptions, subreddits, win, parent, state, lengthFormat, lengthField, lengthStepper, length;
15 15
 
16 16
 -(Boolean)isValidList:(NSString *)input {
17 17
     NSCharacterSet *invalidChars = [[NSCharacterSet characterSetWithCharactersInString:@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_\n"] invertedSet];
@@ -37,6 +37,9 @@
37 37
         [reddits appendFormat:@"%@\n", [state.subreddits objectAtIndex:i]];
38 38
     }
39 39
     [subreddits setString:reddits];
40
+    length = state.length;
41
+    [lengthStepper setIntegerValue:length];
42
+    [lengthField setIntegerValue:length];
40 43
 }
41 44
 
42 45
 -(IBAction)buttonSave:(id)sender {
@@ -60,7 +63,7 @@
60 63
     NSString *modhash;
61 64
     
62 65
     AppDelegate *app = (AppDelegate *)parent;
63
-    [app prefReturnName:username.stringValue Modhash:modhash subscriptions:subs subreddits:subreddits.textStorage.string];
66
+    [app prefReturnName:username.stringValue Modhash:modhash subscriptions:subs subreddits:subreddits.textStorage.string length:length];
64 67
     [win performClose:self];
65 68
 }
66 69
 
@@ -72,4 +75,10 @@
72 75
     }
73 76
 }
74 77
 
78
+-(IBAction)lengthDidChange:(id)sender {
79
+    length = [sender integerValue];
80
+    [lengthStepper setIntegerValue:length];
81
+    [lengthField setIntegerValue:length];
82
+}
83
+
75 84
 @end

+ 3
- 3
RedditBar/RedditBar-Info.plist View File

@@ -17,11 +17,11 @@
17 17
 	<key>CFBundlePackageType</key>
18 18
 	<string>APPL</string>
19 19
 	<key>CFBundleShortVersionString</key>
20
-	<string>1.0</string>
20
+	<string>1.0.0</string>
21 21
 	<key>CFBundleSignature</key>
22 22
 	<string>????</string>
23 23
 	<key>CFBundleVersion</key>
24
-	<string>1</string>
24
+	<string>30</string>
25 25
 	<key>LSApplicationCategoryType</key>
26 26
 	<string>public.app-category.utilities</string>
27 27
 	<key>LSMinimumSystemVersion</key>
@@ -29,7 +29,7 @@
29 29
 	<key>LSUIElement</key>
30 30
 	<true/>
31 31
 	<key>NSHumanReadableCopyright</key>
32
-	<string>Copyright © 2013 xythobuz. All rights reserved.</string>
32
+	<string>Copyright © 2013 Thomas Buck. All rights reserved.</string>
33 33
 	<key>NSMainNibFile</key>
34 34
 	<string>MainMenu</string>
35 35
 	<key>NSPrincipalClass</key>

+ 1
- 0
RedditBar/StateModel.h View File

@@ -14,5 +14,6 @@
14 14
 @property (atomic, retain) NSString *modhash;
15 15
 @property (atomic) Boolean useSubsciptions;
16 16
 @property (atomic, retain) NSArray *subreddits;
17
+@property (atomic) NSInteger length;
17 18
 
18 19
 @end

+ 12
- 20
RedditBar/en.lproj/Credits.rtf View File

@@ -1,29 +1,21 @@
1
-{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
1
+{\rtf1\ansi\ansicpg1252\cocoartf1265
2
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
2 3
 {\colortbl;\red255\green255\blue255;}
3
-\paperw9840\paperh8400
4
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
4
+\paperw11900\paperh16840\vieww9600\viewh8400\viewkind0
5
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
5 6
 
6
-\f0\b\fs24 \cf0 Engineering:
7
+\f0\b\fs24 \cf0 Made by:
7 8
 \b0 \
8
-	Some people\
9
+	Thomas Buck\
10
+	<xythobuz@xythobuz.de>\
9 11
 \
10 12
 
11
-\b Human Interface Design:
13
+\b Website:
12 14
 \b0 \
13
-	Some other people\
15
+	{\field{\*\fldinst{HYPERLINK "http://xythobuz.de"}}{\fldrslt http://xythobuz.de}}\
14 16
 \
15 17
 
16
-\b Testing:
18
+\b Inspired by:
17 19
 \b0 \
18
-	Hopefully not nobody\
19
-\
20
-
21
-\b Documentation:
22
-\b0 \
23
-	Whoever\
24
-\
25
-
26
-\b With special thanks to:
27
-\b0 \
28
-	Mom\
29
-}
20
+	HackerBar App ({\field{\*\fldinst{HYPERLINK "http://hackerbarapp.com"}}{\fldrslt http://hackerbarapp.com}})\
21
+}

Loading…
Cancel
Save