summaryrefslogtreecommitdiffstats
path: root/macosx/HBJob+UIAdditions.m
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/HBJob+UIAdditions.m')
-rw-r--r--macosx/HBJob+UIAdditions.m38
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
+