summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'macosx')
-rw-r--r--macosx/HBJob+UIAdditions.m10
-rw-r--r--macosx/HBJob.m20
-rw-r--r--macosx/HBRange+UIAdditions.m15
-rw-r--r--macosx/HBRange.m25
4 files changed, 29 insertions, 41 deletions
diff --git a/macosx/HBJob+UIAdditions.m b/macosx/HBJob+UIAdditions.m
index 65ec4ced2..829f47300 100644
--- a/macosx/HBJob+UIAdditions.m
+++ b/macosx/HBJob+UIAdditions.m
@@ -34,11 +34,21 @@ static NSDictionary *shortHeightAttr;
return ((self.container & HB_MUX_MASK_MP4) != 0);
}
++ (NSSet<NSString *> *)keyPathsForValuesAffectingMp4OptionsEnabled
+{
+ return [NSSet setWithObjects:@"container", nil];
+}
+
- (BOOL)mp4iPodCompatibleEnabled
{
return ((self.container & HB_MUX_MASK_MP4) != 0) && (self.video.encoder & HB_VCODEC_H264_MASK);
}
++ (NSSet<NSString *> *)keyPathsForValuesAffectingMp4iPodCompatibleEnabled
+{
+ return [NSSet setWithObjects:@"container", @"video.encoder", nil];
+}
+
- (NSArray *)angles
{
NSMutableArray *angles = [NSMutableArray array];
diff --git a/macosx/HBJob.m b/macosx/HBJob.m
index e97c46cb6..7fa3b58f5 100644
--- a/macosx/HBJob.m
+++ b/macosx/HBJob.m
@@ -179,26 +179,6 @@ NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification";
[[NSNotificationCenter defaultCenter] postNotificationName:HBChaptersChangedNotification object:self];
}
-+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key
-{
- NSSet *retval = [NSSet set];
-
- if ([key isEqualToString:@"mp4OptionsEnabled"])
- {
- retval = [NSSet setWithObjects:@"container", nil];
- }
- else if ([key isEqualToString:@"mp4iPodCompatibleEnabled"])
- {
- retval = [NSSet setWithObjects:@"container", @"video.encoder", nil];
- }
- else
- {
- retval = [NSSet set];
- }
-
- return retval;
-}
-
- (NSString *)description
{
return self.name;
diff --git a/macosx/HBRange+UIAdditions.m b/macosx/HBRange+UIAdditions.m
index f7061acf7..18710a159 100644
--- a/macosx/HBRange+UIAdditions.m
+++ b/macosx/HBRange+UIAdditions.m
@@ -30,14 +30,29 @@
return self.type == HBRangeTypeChapters;
}
++ (NSSet<NSString *> *)keyPathsForValuesAffectingChaptersSelected
+{
+ return [NSSet setWithObjects:@"type", nil];
+}
+
- (BOOL)secondsSelected
{
return self.type == HBRangeTypeSeconds;
}
++ (NSSet<NSString *> *)keyPathsForValuesAffectingSecondsSelected
+{
+ return [NSSet setWithObjects:@"type", nil];
+}
+
- (BOOL)framesSelected
{
return self.type == HBRangeTypeFrames;
}
++ (NSSet<NSString *> *)keyPathsForValuesAffectingFramesSelected
+{
+ return [NSSet setWithObjects:@"type", nil];
+}
+
@end
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