Sfoglia il codice sorgente

Added Checkboxes in Pref Window for link removal after click and reloading after removal.

Thomas Buck 11 anni fa
parent
commit
7134ece515

+ 6
- 0
RedditBar/Base.lproj/Prefs.strings Vedi File

@@ -8,6 +8,9 @@
8 8
 /* Class = "NSMenuItem"; title = "Cut"; ObjectID = "32T-3T-EcY"; */
9 9
 "32T-3T-EcY.title" = "Cut";
10 10
 
11
+/* Class = "NSButtonCell"; title = "Remove visited links"; ObjectID = "7KI-oO-Qcg"; */
12
+"7KI-oO-Qcg.title" = "Remove visited links";
13
+
11 14
 /* Class = "NSTextFieldCell"; title = "Items:"; ObjectID = "FNJ-RL-DXT"; */
12 15
 "FNJ-RL-DXT.title" = "Items:";
13 16
 
@@ -71,5 +74,8 @@
71 74
 /* Class = "NSMenuItem"; title = "hot"; ObjectID = "sKV-FZ-wbQ"; */
72 75
 "sKV-FZ-wbQ.title" = "hot";
73 76
 
77
+/* Class = "NSButtonCell"; title = "Reload after every visited link"; ObjectID = "twM-Jr-KGn"; */
78
+"twM-Jr-KGn.title" = "Reload after every visited link";
79
+
74 80
 /* Class = "NSMenuItem"; title = "Copy"; ObjectID = "wSY-To-FDI"; */
75 81
 "wSY-To-FDI.title" = "Copy";

+ 43
- 22
RedditBar/Base.lproj/Prefs.xib Vedi File

@@ -14,6 +14,8 @@
14 14
                 <outlet property="progress" destination="vz0-tR-n1f" id="t06-dO-WKY"/>
15 15
                 <outlet property="refreshField" destination="2J7-SH-Grc" id="tsA-1R-BUz"/>
16 16
                 <outlet property="refreshStepper" destination="uaS-Xm-tIa" id="1bf-OR-gsX"/>
17
+                <outlet property="reloadAfterVisit" destination="gmF-24-Psn" id="DMH-sN-L96"/>
18
+                <outlet property="removeVisited" destination="v96-KH-55h" id="40H-g7-GRb"/>
17 19
                 <outlet property="showSubreddit" destination="fRR-M9-szp" id="bGR-ej-R9R"/>
18 20
                 <outlet property="subreddits" destination="EhP-FS-8dT" id="td1-kv-jQm"/>
19 21
                 <outlet property="subscriptions" destination="vW5-Cp-Bm1" id="gja-K0-7Uh"/>
@@ -28,14 +30,14 @@
28 30
         <window title="RedditBar Preferences" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" oneShot="NO" releasedWhenClosed="NO" wantsToBeColor="NO" animationBehavior="default" id="1" customClass="PrefWindow">
29 31
             <windowStyleMask key="styleMask" titled="YES" closable="YES"/>
30 32
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
31
-            <rect key="contentRect" x="196" y="240" width="340" height="398"/>
33
+            <rect key="contentRect" x="196" y="240" width="340" height="430"/>
32 34
             <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1058"/>
33 35
             <view key="contentView" id="2">
34
-                <rect key="frame" x="0.0" y="0.0" width="340" height="398"/>
36
+                <rect key="frame" x="0.0" y="0.0" width="340" height="430"/>
35 37
                 <autoresizingMask key="autoresizingMask"/>
36 38
                 <subviews>
37 39
                     <textField verticalHuggingPriority="750" id="0mi-88-o94">
38
-                        <rect key="frame" x="120" y="358" width="200" height="22"/>
40
+                        <rect key="frame" x="120" y="390" width="200" height="22"/>
39 41
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
40 42
                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="xlI-hU-MqM">
41 43
                             <font key="font" metaFont="system"/>
@@ -44,7 +46,7 @@
44 46
                         </textFieldCell>
45 47
                     </textField>
46 48
                     <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="f72-fM-yQc">
47
-                        <rect key="frame" x="18" y="363" width="96" height="17"/>
49
+                        <rect key="frame" x="18" y="395" width="96" height="17"/>
48 50
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
49 51
                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Username: " id="GTO-OP-MYS">
50 52
                             <font key="font" metaFont="system"/>
@@ -53,7 +55,7 @@
53 55
                         </textFieldCell>
54 56
                     </textField>
55 57
                     <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="JMQ-a6-DKC">
56
-                        <rect key="frame" x="18" y="329" width="96" height="17"/>
58
+                        <rect key="frame" x="18" y="361" width="96" height="17"/>
57 59
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
58 60
                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Password:" id="m11-YF-fEa">
59 61
                             <font key="font" metaFont="system"/>
@@ -62,7 +64,7 @@
62 64
                         </textFieldCell>
63 65
                     </textField>
64 66
                     <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="qFP-pd-32c">
65
-                        <rect key="frame" x="18" y="163" width="63" height="17"/>
67
+                        <rect key="frame" x="18" y="195" width="63" height="17"/>
66 68
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
67 69
                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Items:" id="FNJ-RL-DXT">
68 70
                             <font key="font" metaFont="system"/>
@@ -71,7 +73,7 @@
71 73
                         </textFieldCell>
72 74
                     </textField>
73 75
                     <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="O82-1u-lSr">
74
-                        <rect key="frame" x="152" y="163" width="63" height="17"/>
76
+                        <rect key="frame" x="152" y="195" width="63" height="17"/>
75 77
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
76 78
                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Title:" id="Frl-AE-ROJ">
77 79
                             <font key="font" metaFont="system"/>
@@ -80,7 +82,7 @@
80 82
                         </textFieldCell>
81 83
                     </textField>
82 84
                     <secureTextField verticalHuggingPriority="750" id="ARP-lb-J16">
83
-                        <rect key="frame" x="120" y="326" width="200" height="22"/>
85
+                        <rect key="frame" x="120" y="358" width="200" height="22"/>
84 86
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
85 87
                         <secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="We7-pG-rAt">
86 88
                             <font key="font" metaFont="system"/>
@@ -117,7 +119,7 @@ Gw
117 119
                         </connections>
118 120
                     </button>
119 121
                     <scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" id="8ew-wY-1Yh">
120
-                        <rect key="frame" x="20" y="188" width="300" height="100"/>
122
+                        <rect key="frame" x="20" y="220" width="300" height="100"/>
121 123
                         <autoresizingMask key="autoresizingMask"/>
122 124
                         <clipView key="contentView" copiesOnScroll="NO" id="ENU-Jw-8fO">
123 125
                             <rect key="frame" x="1" y="1" width="298" height="98"/>
@@ -146,7 +148,7 @@ Gw
146 148
                         </scroller>
147 149
                     </scrollView>
148 150
                     <button id="XZM-90-hQ8">
149
-                        <rect key="frame" x="18" y="295" width="280" height="25"/>
151
+                        <rect key="frame" x="18" y="327" width="280" height="25"/>
150 152
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
151 153
                         <buttonCell key="cell" type="check" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="vW5-Cp-Bm1">
152 154
                             <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@@ -157,7 +159,7 @@ Gw
157 159
                         </connections>
158 160
                     </button>
159 161
                     <textField verticalHuggingPriority="750" id="MAv-jO-hIv">
160
-                        <rect key="frame" x="87" y="160" width="38" height="22"/>
162
+                        <rect key="frame" x="87" y="192" width="38" height="22"/>
161 163
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
162 164
                         <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">
163 165
                             <font key="font" metaFont="system"/>
@@ -170,7 +172,7 @@ Gw
170 172
                         </connections>
171 173
                     </textField>
172 174
                     <textField verticalHuggingPriority="750" id="qju-1J-OOV">
173
-                        <rect key="frame" x="221" y="160" width="38" height="22"/>
175
+                        <rect key="frame" x="221" y="192" width="38" height="22"/>
174 176
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
175 177
                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="right" title="66" drawsBackground="YES" id="b76-4r-MEp">
176 178
                             <font key="font" metaFont="system"/>
@@ -183,7 +185,7 @@ Gw
183 185
                         </connections>
184 186
                     </textField>
185 187
                     <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" id="jxz-fQ-M1L">
186
-                        <rect key="frame" x="130" y="157" width="19" height="27"/>
188
+                        <rect key="frame" x="130" y="189" width="19" height="27"/>
187 189
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
188 190
                         <stepperCell key="cell" continuous="YES" alignment="left" minValue="1" maxValue="100" doubleValue="1" id="Gba-jV-Ouh"/>
189 191
                         <connections>
@@ -192,7 +194,7 @@ Gw
192 194
                         </connections>
193 195
                     </stepper>
194 196
                     <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" id="2aV-fo-xh7">
195
-                        <rect key="frame" x="264" y="157" width="19" height="27"/>
197
+                        <rect key="frame" x="264" y="189" width="19" height="27"/>
196 198
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
197 199
                         <stepperCell key="cell" continuous="YES" alignment="left" maxValue="100" doubleValue="1" id="BWQ-gm-H9h"/>
198 200
                         <connections>
@@ -201,11 +203,11 @@ Gw
201 203
                         </connections>
202 204
                     </stepper>
203 205
                     <progressIndicator canDrawConcurrently="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" displayedWhenStopped="NO" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" id="vz0-tR-n1f">
204
-                        <rect key="frame" x="304" y="299" width="16" height="16"/>
206
+                        <rect key="frame" x="304" y="331" width="16" height="16"/>
205 207
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
206 208
                     </progressIndicator>
207 209
                     <button id="fRR-M9-szp">
208
-                        <rect key="frame" x="18" y="128" width="304" height="18"/>
210
+                        <rect key="frame" x="18" y="160" width="304" height="18"/>
209 211
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
210 212
                         <buttonCell key="cell" type="check" title="Show Subreddit after Title" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="nFK-xi-2F3">
211 213
                             <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@@ -213,7 +215,7 @@ Gw
213 215
                         </buttonCell>
214 216
                     </button>
215 217
                     <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="6zt-jq-NXJ">
216
-                        <rect key="frame" x="6" y="64" width="236" height="17"/>
218
+                        <rect key="frame" x="9" y="52" width="236" height="17"/>
217 219
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
218 220
                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="PM Refresh (in Minutes):" id="cwK-wP-wB6">
219 221
                             <font key="font" metaFont="system"/>
@@ -222,14 +224,14 @@ Gw
222 224
                         </textFieldCell>
223 225
                     </textField>
224 226
                     <box autoresizesSubviews="NO" verticalHuggingPriority="750" title="Box" boxType="separator" titlePosition="noTitle" id="paW-kV-tNF">
225
-                        <rect key="frame" x="12" y="87" width="316" height="5"/>
227
+                        <rect key="frame" x="14" y="77" width="316" height="5"/>
226 228
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
227 229
                         <color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
228 230
                         <color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
229 231
                         <font key="titleFont" metaFont="system"/>
230 232
                     </box>
231 233
                     <textField verticalHuggingPriority="750" id="2J7-SH-Grc">
232
-                        <rect key="frame" x="248" y="61" width="38" height="22"/>
234
+                        <rect key="frame" x="251" y="49" width="38" height="22"/>
233 235
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
234 236
                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="right" title="5" drawsBackground="YES" id="gZN-n2-TGX">
235 237
                             <font key="font" metaFont="system"/>
@@ -242,7 +244,7 @@ Gw
242 244
                         </connections>
243 245
                     </textField>
244 246
                     <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" id="uaS-Xm-tIa">
245
-                        <rect key="frame" x="291" y="58" width="19" height="27"/>
247
+                        <rect key="frame" x="294" y="46" width="19" height="27"/>
246 248
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
247 249
                         <stepperCell key="cell" continuous="YES" alignment="left" minValue="1" maxValue="100" doubleValue="1" id="rTZ-Zs-1eO"/>
248 250
                         <connections>
@@ -251,7 +253,7 @@ Gw
251 253
                         </connections>
252 254
                     </stepper>
253 255
                     <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="cec-PF-2Hn">
254
-                        <rect key="frame" x="18" y="98" width="130" height="17"/>
256
+                        <rect key="frame" x="18" y="130" width="130" height="17"/>
255 257
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
256 258
                         <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Filter:" id="coc-11-MQH">
257 259
                             <font key="font" metaFont="system"/>
@@ -260,7 +262,7 @@ Gw
260 262
                         </textFieldCell>
261 263
                     </textField>
262 264
                     <popUpButton verticalHuggingPriority="750" id="FR2-RR-NOg">
263
-                        <rect key="frame" x="164" y="93" width="159" height="26"/>
265
+                        <rect key="frame" x="164" y="125" width="159" height="26"/>
264 266
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
265 267
                         <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="zJW-6u-fHd">
266 268
                             <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
@@ -277,6 +279,25 @@ Gw
277 279
                             </menu>
278 280
                         </popUpButtonCell>
279 281
                     </popUpButton>
282
+                    <button id="v96-KH-55h">
283
+                        <rect key="frame" x="18" y="106" width="304" height="18"/>
284
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
285
+                        <buttonCell key="cell" type="check" title="Remove visited links" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="7KI-oO-Qcg">
286
+                            <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
287
+                            <font key="font" metaFont="system"/>
288
+                        </buttonCell>
289
+                        <connections>
290
+                            <action selector="removeVisitedToggled:" target="-2" id="dSw-IW-lQ9"/>
291
+                        </connections>
292
+                    </button>
293
+                    <button id="gmF-24-Psn">
294
+                        <rect key="frame" x="18" y="86" width="304" height="18"/>
295
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
296
+                        <buttonCell key="cell" type="check" title="Reload after every visited link" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="twM-Jr-KGn">
297
+                            <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
298
+                            <font key="font" metaFont="system"/>
299
+                        </buttonCell>
300
+                    </button>
280 301
                 </subviews>
281 302
             </view>
282 303
         </window>

+ 3
- 0
RedditBar/PrefController.h Vedi File

@@ -45,6 +45,8 @@
45 45
 @property (atomic, retain) IBOutlet NSTextField *refreshField;
46 46
 @property (atomic, retain) IBOutlet NSStepper *refreshStepper;
47 47
 @property (atomic, retain) IBOutlet NSPopUpButton *filterSelection;
48
+@property (atomic, retain) IBOutlet NSButton *removeVisited;
49
+@property (atomic, retain) IBOutlet NSButton *reloadAfterVisit;
48 50
 
49 51
 @property (atomic, retain) NSObject *parent;
50 52
 @property (atomic, retain) StateModel *state;
@@ -57,5 +59,6 @@
57 59
 -(IBAction)lengthDidChange:(id)sender;
58 60
 -(IBAction)titleDidChange:(id)sender;
59 61
 -(IBAction)refreshDidChange:(id)sender;
62
+- (IBAction)removeVisitedToggled:(id)sender;
60 63
 
61 64
 @end

+ 33
- 1
RedditBar/PrefController.m Vedi File

@@ -34,7 +34,7 @@
34 34
 NSString *modhashSetLiteral = @"__MODHASH__IS__SET__";
35 35
 NSString *subredditCharacters = @"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_\n";
36 36
 
37
-@synthesize username, password, subscriptions, subreddits, win, parent, state, lengthField, lengthStepper, length, progress, showSubreddit, titleField, titleStepper, titleLength, refreshField, refreshStepper, refreshInterval, filterSelection;
37
+@synthesize username, password, subscriptions, subreddits, win, parent, state, lengthField, lengthStepper, length, progress, showSubreddit, titleField, titleStepper, titleLength, refreshField, refreshStepper, refreshInterval, filterSelection, removeVisited, reloadAfterVisit;
38 38
 
39 39
 -(Boolean)isValidList:(NSString *)input {
40 40
     NSCharacterSet *invalidChars = [[NSCharacterSet characterSetWithCharactersInString:subredditCharacters] invertedSet];
@@ -75,6 +75,18 @@ NSString *subredditCharacters = @"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST
75 75
     } else {
76 76
         [filterSelection selectItemAtIndex:1];
77 77
     }
78
+    if (state.removeVisited) {
79
+        [removeVisited setState:1];
80
+        [reloadAfterVisit setEnabled:TRUE];
81
+    } else {
82
+        [removeVisited setState:0];
83
+        [reloadAfterVisit setEnabled:FALSE];
84
+    }
85
+    if (state.reloadAfterVisit) {
86
+        [reloadAfterVisit setState:1];
87
+    } else {
88
+        [reloadAfterVisit setState:0];
89
+    }
78 90
 }
79 91
 
80 92
 -(IBAction)buttonSave:(id)sender {
@@ -135,6 +147,16 @@ NSString *subredditCharacters = @"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST
135 147
         print = TRUE;
136 148
     else
137 149
         print = FALSE;
150
+    Boolean remove;
151
+    if (removeVisited.state != 0)
152
+        remove = TRUE;
153
+    else
154
+        remove = FALSE;
155
+    Boolean reload;
156
+    if (reloadAfterVisit.state != 0)
157
+        reload = TRUE;
158
+    else
159
+        reload = FALSE;
138 160
     
139 161
     state.username = username.stringValue;
140 162
     state.modhash = modhash;
@@ -145,6 +167,8 @@ NSString *subredditCharacters = @"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST
145 167
     state.titleLength = [titleField integerValue];
146 168
     state.refreshInterval = [refreshField integerValue];
147 169
     state.filter = [filterSelection titleOfSelectedItem];
170
+    state.removeVisited = remove;
171
+    state.reloadAfterVisit = reload;
148 172
     [(AppDelegate *)parent prefsDidSave];
149 173
     [win performClose:self];
150 174
 }
@@ -177,4 +201,12 @@ NSString *subredditCharacters = @"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST
177 201
     [refreshField setIntegerValue:refreshInterval];
178 202
 }
179 203
 
204
+- (IBAction)removeVisitedToggled:(id)sender {
205
+    if (removeVisited.state != 0) {
206
+        [reloadAfterVisit setEnabled:TRUE];
207
+    } else {
208
+        [reloadAfterVisit setEnabled:FALSE];
209
+    }
210
+}
211
+
180 212
 @end

+ 1
- 1
RedditBar/RedditBar-Info.plist Vedi File

@@ -21,7 +21,7 @@
21 21
 	<key>CFBundleSignature</key>
22 22
 	<string>????</string>
23 23
 	<key>CFBundleVersion</key>
24
-	<string>280</string>
24
+	<string>283</string>
25 25
 	<key>LSApplicationCategoryType</key>
26 26
 	<string>public.app-category.utilities</string>
27 27
 	<key>LSMinimumSystemVersion</key>

+ 2
- 0
RedditBar/StateModel.h Vedi File

@@ -39,6 +39,8 @@
39 39
 @property (atomic) NSInteger titleLength;
40 40
 @property (atomic) NSInteger refreshInterval;
41 41
 @property (atomic, retain) NSString *filter;
42
+@property (atomic) Boolean removeVisited;
43
+@property (atomic) Boolean reloadAfterVisit;
42 44
 
43 45
 -(void)registerDefaultPreferences;
44 46
 -(void)savePreferences;

+ 9
- 1
RedditBar/StateModel.m Vedi File

@@ -30,7 +30,7 @@
30 30
 
31 31
 @implementation StateModel
32 32
 
33
-@synthesize username, modhash, useSubscriptions, subreddits, length, showSubreddit, titleLength, refreshInterval, filter;
33
+@synthesize username, modhash, useSubscriptions, subreddits, length, showSubreddit, titleLength, refreshInterval, filter, removeVisited, reloadAfterVisit;
34 34
 
35 35
 NSString *s_username = @"username";
36 36
 NSString *s_modhash = @"modhash";
@@ -41,6 +41,8 @@ NSString *s_subs = @"showSubs";
41 41
 NSString *s_title = @"titleLength";
42 42
 NSString *s_refresh = @"refreshInterval";
43 43
 NSString *s_filter = @"filter";
44
+NSString *s_remove = @"remove";
45
+NSString *s_reload = @"reload";
44 46
 
45 47
 -(void)registerDefaultPreferences {
46 48
     NSUserDefaults *store = [NSUserDefaults standardUserDefaults];
@@ -52,6 +54,8 @@ NSString *s_filter = @"filter";
52 54
     [appDefaults setValue:[NSNumber numberWithInt:66] forKey:s_title];
53 55
     [appDefaults setValue:[NSNumber numberWithInt:5] forKey:s_refresh];
54 56
     [appDefaults setValue:@"hot" forKey:s_filter];
57
+    [appDefaults setValue:[NSNumber numberWithBool:YES] forKey:s_remove];
58
+    [appDefaults setValue:[NSNumber numberWithBool:YES] forKey:s_reload];
55 59
     [store registerDefaults:appDefaults];
56 60
 }
57 61
 
@@ -66,6 +70,8 @@ NSString *s_filter = @"filter";
66 70
     [store setInteger:titleLength forKey:s_title];
67 71
     [store setInteger:refreshInterval forKey:s_refresh];
68 72
     [store setObject:filter forKey:s_filter];
73
+    [store setBool:removeVisited forKey:s_remove];
74
+    [store setBool:reloadAfterVisit forKey:s_reload];
69 75
     [store synchronize];
70 76
 }
71 77
 
@@ -81,6 +87,8 @@ NSString *s_filter = @"filter";
81 87
     titleLength = [store integerForKey:s_title];
82 88
     refreshInterval = [store integerForKey:s_refresh];
83 89
     filter = [store stringForKey:s_filter];
90
+    removeVisited = [store boolForKey:s_remove];
91
+    reloadAfterVisit = [store boolForKey:s_reload];
84 92
 }
85 93
 
86 94
 @end

+ 6
- 0
RedditBar/de.lproj/Prefs.strings Vedi File

@@ -7,6 +7,9 @@
7 7
 /* Class = "NSMenuItem"; title = "Cut"; ObjectID = "32T-3T-EcY"; */
8 8
 "32T-3T-EcY.title" = "Ausschneiden";
9 9
 
10
+/* Class = "NSButtonCell"; title = "Remove visited links"; ObjectID = "7KI-oO-Qcg"; */
11
+"7KI-oO-Qcg.title" = "Remove visited links";
12
+
10 13
 /* Class = "NSTextFieldCell"; title = "Items:"; ObjectID = "FNJ-RL-DXT"; */
11 14
 "FNJ-RL-DXT.title" = "Links:";
12 15
 
@@ -70,6 +73,9 @@
70 73
 /* Class = "NSMenuItem"; title = "hot"; ObjectID = "sKV-FZ-wbQ"; */
71 74
 "sKV-FZ-wbQ.title" = "hot";
72 75
 
76
+/* Class = "NSButtonCell"; title = "Reload after every visited link"; ObjectID = "twM-Jr-KGn"; */
77
+"twM-Jr-KGn.title" = "Reload after every visited link";
78
+
73 79
 /* Class = "NSMenuItem"; title = "Copy"; ObjectID = "wSY-To-FDI"; */
74 80
 "wSY-To-FDI.title" = "Kopieren";
75 81
 

+ 6
- 0
RedditBar/en.lproj/Prefs.strings Vedi File

@@ -7,6 +7,9 @@
7 7
 /* Class = "NSMenuItem"; title = "Cut"; ObjectID = "32T-3T-EcY"; */
8 8
 "32T-3T-EcY.title" = "Cut";
9 9
 
10
+/* Class = "NSButtonCell"; title = "Remove visited links"; ObjectID = "7KI-oO-Qcg"; */
11
+"7KI-oO-Qcg.title" = "Remove visited links";
12
+
10 13
 /* Class = "NSTextFieldCell"; title = "Items:"; ObjectID = "FNJ-RL-DXT"; */
11 14
 "FNJ-RL-DXT.title" = "Items:";
12 15
 
@@ -70,6 +73,9 @@
70 73
 /* Class = "NSMenuItem"; title = "hot"; ObjectID = "sKV-FZ-wbQ"; */
71 74
 "sKV-FZ-wbQ.title" = "hot";
72 75
 
76
+/* Class = "NSButtonCell"; title = "Reload after every visited link"; ObjectID = "twM-Jr-KGn"; */
77
+"twM-Jr-KGn.title" = "Reload after every visited link";
78
+
73 79
 /* Class = "NSMenuItem"; title = "Copy"; ObjectID = "wSY-To-FDI"; */
74 80
 "wSY-To-FDI.title" = "Copy";
75 81
 

+ 6
- 0
RedditBarTests/de.lproj/Prefs.strings Vedi File

@@ -7,6 +7,9 @@
7 7
 /* Class = "NSMenuItem"; title = "Cut"; ObjectID = "32T-3T-EcY"; */
8 8
 "32T-3T-EcY.title" = "Cut";
9 9
 
10
+/* Class = "NSButtonCell"; title = "Remove visited links"; ObjectID = "7KI-oO-Qcg"; */
11
+"7KI-oO-Qcg.title" = "Remove visited links";
12
+
10 13
 /* Class = "NSTextFieldCell"; title = "Items:"; ObjectID = "FNJ-RL-DXT"; */
11 14
 "FNJ-RL-DXT.title" = "Items:";
12 15
 
@@ -70,6 +73,9 @@
70 73
 /* Class = "NSMenuItem"; title = "hot"; ObjectID = "sKV-FZ-wbQ"; */
71 74
 "sKV-FZ-wbQ.title" = "hot";
72 75
 
76
+/* Class = "NSButtonCell"; title = "Reload after every visited link"; ObjectID = "twM-Jr-KGn"; */
77
+"twM-Jr-KGn.title" = "Reload after every visited link";
78
+
73 79
 /* Class = "NSMenuItem"; title = "Copy"; ObjectID = "wSY-To-FDI"; */
74 80
 "wSY-To-FDI.title" = "Copy";
75 81
 

+ 6
- 0
RedditBarTests/en.lproj/Prefs.strings Vedi File

@@ -7,6 +7,9 @@
7 7
 /* Class = "NSMenuItem"; title = "Cut"; ObjectID = "32T-3T-EcY"; */
8 8
 "32T-3T-EcY.title" = "Cut";
9 9
 
10
+/* Class = "NSButtonCell"; title = "Remove visited links"; ObjectID = "7KI-oO-Qcg"; */
11
+"7KI-oO-Qcg.title" = "Remove visited links";
12
+
10 13
 /* Class = "NSTextFieldCell"; title = "Items:"; ObjectID = "FNJ-RL-DXT"; */
11 14
 "FNJ-RL-DXT.title" = "Items:";
12 15
 
@@ -70,6 +73,9 @@
70 73
 /* Class = "NSMenuItem"; title = "hot"; ObjectID = "sKV-FZ-wbQ"; */
71 74
 "sKV-FZ-wbQ.title" = "hot";
72 75
 
76
+/* Class = "NSButtonCell"; title = "Reload after every visited link"; ObjectID = "twM-Jr-KGn"; */
77
+"twM-Jr-KGn.title" = "Reload after every visited link";
78
+
73 79
 /* Class = "NSMenuItem"; title = "Copy"; ObjectID = "wSY-To-FDI"; */
74 80
 "wSY-To-FDI.title" = "Copy";
75 81
 

Loading…
Annulla
Salva