diff options
Diffstat (limited to 'macosx/plugins/DFSound/macsrc/NamedSlider.m')
| -rw-r--r-- | macosx/plugins/DFSound/macsrc/NamedSlider.m | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/macosx/plugins/DFSound/macsrc/NamedSlider.m b/macosx/plugins/DFSound/macsrc/NamedSlider.m new file mode 100644 index 00000000..fd07780a --- /dev/null +++ b/macosx/plugins/DFSound/macsrc/NamedSlider.m @@ -0,0 +1,33 @@ +#import "NamedSlider.h" + +@implementation NamedSlider + +- (void)dealloc +{ + [strings release]; + [super dealloc]; +} + +- (void)setStrings:(NSArray *)theStrings +{ + [strings release]; + strings = [theStrings retain]; +} + +- (NSString *)stringValue +{ + int index = [self intValue]; + + if (index >= 0 && index < [strings count]) + return [strings objectAtIndex:index]; + + return @"(Unknown)"; +} + +- (void)setIntValue:(int)value +{ + [super setIntValue:value]; + [self sendAction:[self action] to:[self target]]; +} + +@end |
