diff options
author | Damiano Galassi <[email protected]> | 2016-03-14 09:46:39 +0100 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2016-03-14 09:46:39 +0100 |
commit | ee4ae6d3a0aa6d06b7a5aedec7e88570c868b8a8 (patch) | |
tree | c7e6e05fa5c9994766da01089170841327ec8be0 /macosx/HBRange.m | |
parent | 20b5485afa48a6210eb5503bade70166d06fc5a4 (diff) |
MacGui: move some kvo helpers to the UIAdditions category.
Diffstat (limited to 'macosx/HBRange.m')
-rw-r--r-- | macosx/HBRange.m | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/macosx/HBRange.m b/macosx/HBRange.m index b048b0e90..defc73efe 100644 --- a/macosx/HBRange.m +++ b/macosx/HBRange.m @@ -150,28 +150,11 @@ NSString *HBRangeChangedNotification = @"HBRangeChangedNotification"; return @"00:00:00"; } -+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key ++ (NSSet<NSString *> *)keyPathsForValuesAffectingDuration { - NSSet *retval = nil; - - if ([key isEqualToString:@"duration"]) - { - retval = [NSSet setWithObjects:@"type", @"chapterStart", @"chapterStop", @"frameStart", @"frameStop", - @"secondsStart", @"secondsStop",nil]; - } - else if ([key isEqualToString:@"chaptersSelected"] || - [key isEqualToString:@"secondsSelected"] || - [key isEqualToString:@"framesSelected"]) - { - retval = [NSSet setWithObjects:@"type",nil]; - - } - else - { - retval = [NSSet set]; - } - - return retval; + return [NSSet setWithObjects:@"type", @"chapterStart", @"chapterStop", + @"frameStart", @"frameStop", + @"secondsStart", @"secondsStop",nil]; } - (void)setNilValueForKey:(NSString *)key |