Skip to content

Commit

Permalink
no crytical
Browse files Browse the repository at this point in the history
  • Loading branch information
chamspan committed Oct 22, 2013
1 parent 8c96048 commit b23b93f
Showing 4 changed files with 66 additions and 184 deletions.
Original file line number Diff line number Diff line change
@@ -9,11 +9,11 @@
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "RSSCue/RCPreferencesController.m"
timestampString = "404155568.219929"
timestampString = "404159065.361124"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "64"
endingLineNumber = "64"
startingLineNumber = "66"
endingLineNumber = "66"
landmarkName = "-updateInfoText"
landmarkType = "5">
</FileBreakpoint>
5 changes: 5 additions & 0 deletions RSSCue/RCPreferencesController.h
Original file line number Diff line number Diff line change
@@ -30,5 +30,10 @@
@property (assign) IBOutlet NSTextField *fieldPassword;
@property (assign) IBOutlet NSStepper *stepperInterval;
@property (assign) IBOutlet NSStepper *stepperMax;
@property (assign) IBOutlet NSTextField *fieldInterval;
@property (assign) IBOutlet NSButton *checkboxEnabled;

- (IBAction)stepperChanged:(id)sender;
- (IBAction)enableFeed:(id)sender;

@end
27 changes: 19 additions & 8 deletions RSSCue/RCPreferencesController.m
Original file line number Diff line number Diff line change
@@ -16,6 +16,8 @@ @implementation RCPreferencesController
@synthesize fieldPassword;
@synthesize stepperInterval;
@synthesize stepperMax;
@synthesize fieldInterval;
@synthesize checkboxEnabled;
@synthesize progress;
@synthesize info;

@@ -112,13 +114,7 @@ - (void)windowDidLoad
}
- (void) awakeFromNib {
[feedsArrayController addObserver:self forKeyPath:@"selection" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld) context:nil];
/*
[feedsArrayController addObserver:self forKeyPath:@"selection.interval" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld) context:nil];
[feedsArrayController addObserver:self forKeyPath:@"selection.url" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld) context:nil];
[feedsArrayController addObserver:self forKeyPath:@"selection.enabled" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld) context:nil];*/
[feedsArrayController addObserver:self forKeyPath:@"login" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld) context:nil];
[feedsArrayController addObserver:self forKeyPath:@"password" options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld) context:nil];


[self setControlsEnabled];
[self updateInfoText];
[[NSNotificationCenter defaultCenter] addObserver:self
@@ -141,9 +137,23 @@ - (void)controlTextDidEndEditing:(NSNotification *)aNotification {
NSString* uuid=[[self selectedConfig] objectForKey:@"uuid"];
[[RCFeedsPool sharedPool] restartFeedByUUID:uuid];
}
// NSLog(@"%@",[[aNotification userInfo] valueForKey:@"NSFieldEditor"] );
}

- (IBAction)stepperChanged:(id)sender {
NSString* uuid=[[self selectedConfig] objectForKey:@"uuid"];
[[RCFeedsPool sharedPool] restartFeedByUUID:uuid];
}

- (IBAction)enableFeed:(id)sender {
NSString* uuid=[[self selectedConfig] objectForKey:@"uuid"];
if ([self.checkboxEnabled state]==NSOnState )
[[RCFeedsPool sharedPool] addFeedByUUID:uuid];
else
[[RCFeedsPool sharedPool] removeFeedByUUID:uuid];
[self setControlsEnabled];
}


#pragma mark *** Buttons ***
- (IBAction)addRemoveFeed:(id)sender {
NSInteger button=[sender selectedSegment];
@@ -239,4 +249,5 @@ - (void)windowWillClose:(NSNotification *) notification{
//[[RCFeedsPool sharedPool] launchAll];
}


@end
Loading
Oops, something went wrong.

0 comments on commit b23b93f

Please sign in to comment.