@@ -16,6 +16,8 @@ @implementation RCPreferencesController
16
16
@synthesize fieldPassword;
17
17
@synthesize stepperInterval;
18
18
@synthesize stepperMax;
19
+ @synthesize fieldInterval;
20
+ @synthesize checkboxEnabled;
19
21
@synthesize progress;
20
22
@synthesize info;
21
23
@@ -112,13 +114,7 @@ - (void)windowDidLoad
112
114
}
113
115
- (void ) awakeFromNib {
114
116
[feedsArrayController addObserver: self forKeyPath: @" selection" options: (NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld) context: nil ];
115
- /*
116
- [feedsArrayController addObserver:self forKeyPath:@"selection.interval" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld) context:nil];
117
- [feedsArrayController addObserver:self forKeyPath:@"selection.url" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld) context:nil];
118
- [feedsArrayController addObserver:self forKeyPath:@"selection.enabled" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld) context:nil];*/
119
- [feedsArrayController addObserver: self forKeyPath: @" login" options: (NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld) context: nil ];
120
- [feedsArrayController addObserver: self forKeyPath: @" password" options: (NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld) context: nil ];
121
-
117
+
122
118
[self setControlsEnabled ];
123
119
[self updateInfoText ];
124
120
[[NSNotificationCenter defaultCenter ] addObserver: self
@@ -141,9 +137,23 @@ - (void)controlTextDidEndEditing:(NSNotification *)aNotification {
141
137
NSString * uuid=[[self selectedConfig ] objectForKey: @" uuid" ];
142
138
[[RCFeedsPool sharedPool ] restartFeedByUUID: uuid];
143
139
}
144
- // NSLog(@"%@",[[aNotification userInfo] valueForKey:@"NSFieldEditor"] );
145
140
}
146
141
142
+ - (IBAction )stepperChanged : (id )sender {
143
+ NSString * uuid=[[self selectedConfig ] objectForKey: @" uuid" ];
144
+ [[RCFeedsPool sharedPool ] restartFeedByUUID: uuid];
145
+ }
146
+
147
+ - (IBAction )enableFeed : (id )sender {
148
+ NSString * uuid=[[self selectedConfig ] objectForKey: @" uuid" ];
149
+ if ([self .checkboxEnabled state ]==NSOnState )
150
+ [[RCFeedsPool sharedPool ] addFeedByUUID: uuid];
151
+ else
152
+ [[RCFeedsPool sharedPool ] removeFeedByUUID: uuid];
153
+ [self setControlsEnabled ];
154
+ }
155
+
156
+
147
157
#pragma mark *** Buttons ***
148
158
- (IBAction )addRemoveFeed : (id )sender {
149
159
NSInteger button=[sender selectedSegment ];
@@ -239,4 +249,5 @@ - (void)windowWillClose:(NSNotification *) notification{
239
249
// [[RCFeedsPool sharedPool] launchAll];
240
250
}
241
251
252
+
242
253
@end
0 commit comments