Permalink
Browse files

Fix setting highlight/exclude words

  • Loading branch information...
1 parent 1b49b9f commit e836e2f889fe1e902825b503d49d0fe03ec65ac7 @emsquared emsquared committed Jul 12, 2014
@@ -322,6 +322,42 @@ - (id)userDefaultsValues
return RZUserDefaultsValueProxy();
}
+- (NSArray *)keywordsArrayControllerDataSource
+{
+ NSArray *values = [RZUserDefaultsValueProxy() valueForKey:@"Highlight List -> Primary Matches"];
+
+ NSMutableArray *returnedValues = [NSMutableArray array];
+
+ for (id object in values) {
+ [returnedValues addObject:[object mutableCopy]];
+ }
+
+ return returnedValues;
+}
+
+- (NSArray *)excludeWordsArrayControllerDataSource
+{
+ NSArray *values = [RZUserDefaultsValueProxy() valueForKey:@"Highlight List -> Excluded Matches"];
+
+ NSMutableArray *returnedValues = [NSMutableArray array];
+
+ for (id object in values) {
+ [returnedValues addObject:[object mutableCopy]];
+ }
+
+ return returnedValues;
+}
+
+- (void)setKeywordsArrayControllerDataSource:(id)value
+{
+ [RZUserDefaultsValueProxy() setValue:value forKey:@"Highlight List -> Primary Matches"];
+}
+
+- (void)setExcludeWordsArrayControllerDataSource:(id)value
+{
+ [RZUserDefaultsValueProxy() setValue:value forKey:@"Highlight List -> Excluded Matches"];
+}
+
- (NSInteger)maxLogLines
{
return [TPCPreferences maxLogLines];
@@ -1978,8 +1978,8 @@ + (void)initPreferences
[RZUserDefaults() registerDefaults:d];
- [RZUserDefaults() addObserver:(id)self forKeyPath:@"Highlight List -> Primary Matches" options:NSKeyValueObservingOptionNew context:NULL];
- [RZUserDefaults() addObserver:(id)self forKeyPath:@"Highlight List -> Excluded Matches" options:NSKeyValueObservingOptionNew context:NULL];
+ [RZUserDefaultsValueProxy() addObserver:(id)self forKeyPath:@"Highlight List -> Primary Matches" options:NSKeyValueObservingOptionNew context:NULL];
+ [RZUserDefaultsValueProxy() addObserver:(id)self forKeyPath:@"Highlight List -> Excluded Matches" options:NSKeyValueObservingOptionNew context:NULL];
[TPCPreferences loadMatchKeywords];
[TPCPreferences loadExcludeKeywords];
Oops, something went wrong.

0 comments on commit e836e2f

Please sign in to comment.