diff options
author | ritsuka <[email protected]> | 2014-12-27 10:46:04 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2014-12-27 10:46:04 +0000 |
commit | df8b2ff3e109699e3dadd88404911f8dfc7b210a (patch) | |
tree | 8489fee4edaf57adf55f69d0c0d28f61a5757057 /macosx/HBJob+UIAdditions.m | |
parent | 8df584534c0c39f5c2f298d8ba480cc906743bbf (diff) |
MacGui: change the queue to work with serialized HBJob objects, remove the NSDictionary job representation and the duplicate prepareJob method. Implement NSCopying protocol in HBJob.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6655 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBJob+UIAdditions.m')
-rw-r--r-- | macosx/HBJob+UIAdditions.m | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/macosx/HBJob+UIAdditions.m b/macosx/HBJob+UIAdditions.m index 29836553a..6e5bf030a 100644 --- a/macosx/HBJob+UIAdditions.m +++ b/macosx/HBJob+UIAdditions.m @@ -21,4 +21,42 @@ } } +- (NSArray *)angles +{ + NSMutableArray *angles = [NSMutableArray array]; + for (int i = 0; i < self.title.angles; i++) + { + [angles addObject:[NSString stringWithFormat: @"%d", i + 1]]; + } + return angles; +} + +@end + +@implementation HBURLTransformer + ++ (Class)transformedValueClass +{ + return [NSString class]; +} + +- (id)transformedValue:(id)value +{ + if (value) + return [value path]; + else + return nil; +} + ++ (BOOL)allowsReverseTransformation +{ + return YES; +} + +- (id)reverseTransformedValue:(id)value +{ + return [NSURL fileURLWithPath:value]; +} + @end + |