Skip to content

Commit b23b93f

Browse files
committed
no crytical
1 parent 8c96048 commit b23b93f

File tree

4 files changed

+66
-184
lines changed

4 files changed

+66
-184
lines changed

RSSCue.xcodeproj/xcuserdata/dsa.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
continueAfterRunningActions = "No"
1010
isPathRelative = "1"
1111
filePath = "RSSCue/RCPreferencesController.m"
12-
timestampString = "404155568.219929"
12+
timestampString = "404159065.361124"
1313
startingColumnNumber = "9223372036854775807"
1414
endingColumnNumber = "9223372036854775807"
15-
startingLineNumber = "64"
16-
endingLineNumber = "64"
15+
startingLineNumber = "66"
16+
endingLineNumber = "66"
1717
landmarkName = "-updateInfoText"
1818
landmarkType = "5">
1919
</FileBreakpoint>

RSSCue/RCPreferencesController.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,10 @@
3030
@property (assign) IBOutlet NSTextField *fieldPassword;
3131
@property (assign) IBOutlet NSStepper *stepperInterval;
3232
@property (assign) IBOutlet NSStepper *stepperMax;
33+
@property (assign) IBOutlet NSTextField *fieldInterval;
34+
@property (assign) IBOutlet NSButton *checkboxEnabled;
35+
36+
- (IBAction)stepperChanged:(id)sender;
37+
- (IBAction)enableFeed:(id)sender;
3338

3439
@end

RSSCue/RCPreferencesController.m

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ @implementation RCPreferencesController
1616
@synthesize fieldPassword;
1717
@synthesize stepperInterval;
1818
@synthesize stepperMax;
19+
@synthesize fieldInterval;
20+
@synthesize checkboxEnabled;
1921
@synthesize progress;
2022
@synthesize info;
2123

@@ -112,13 +114,7 @@ - (void)windowDidLoad
112114
}
113115
- (void) awakeFromNib {
114116
[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+
122118
[self setControlsEnabled];
123119
[self updateInfoText];
124120
[[NSNotificationCenter defaultCenter] addObserver:self
@@ -141,9 +137,23 @@ - (void)controlTextDidEndEditing:(NSNotification *)aNotification {
141137
NSString* uuid=[[self selectedConfig] objectForKey:@"uuid"];
142138
[[RCFeedsPool sharedPool] restartFeedByUUID:uuid];
143139
}
144-
// NSLog(@"%@",[[aNotification userInfo] valueForKey:@"NSFieldEditor"] );
145140
}
146141

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+
147157
#pragma mark *** Buttons ***
148158
- (IBAction)addRemoveFeed:(id)sender {
149159
NSInteger button=[sender selectedSegment];
@@ -239,4 +249,5 @@ - (void)windowWillClose:(NSNotification *) notification{
239249
//[[RCFeedsPool sharedPool] launchAll];
240250
}
241251

252+
242253
@end

0 commit comments

Comments
 (0)