From f557fb4d2b84e5948f54a5fbb0a645a5f97b83dd Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Wed, 3 Jul 2013 06:57:46 +0000 Subject: Get rid of the messy preprocessor hack for named sliders on the audio plug-ins for OS X: Consolidate files that are the same. Whatever class loads a nib, will be that owner, no matter what the nib says. Have shared code be in a dylib that loads, so there isn't warnings about conflicting classes. Other changes git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85757 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/plugins/DFSound/macsrc/NamedSlider.m | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'macosx/plugins/DFSound/macsrc/NamedSlider.m') diff --git a/macosx/plugins/DFSound/macsrc/NamedSlider.m b/macosx/plugins/DFSound/macsrc/NamedSlider.m index 2db2f25e..750d0376 100755 --- a/macosx/plugins/DFSound/macsrc/NamedSlider.m +++ b/macosx/plugins/DFSound/macsrc/NamedSlider.m @@ -1,19 +1,16 @@ #import "NamedSlider.h" @implementation NamedSlider +@synthesize pluginClass; - (void)dealloc { - [strings release]; + self.strings = nil; + [super dealloc]; } -- (void)setStrings:(NSArray *)theStrings -{ - [theStrings retain]; - [strings release]; - strings = theStrings; -} +@synthesize strings; - (NSString *)stringValue { @@ -22,7 +19,11 @@ if (index >= 0 && index < [strings count]) return [strings objectAtIndex:index]; - return @"(Unknown)"; + if (!pluginClass) { + return @"(Unknown)"; + } else { + return [[NSBundle bundleForClass:pluginClass] localizedStringForKey:@"(Unknown)" value:@"" table:nil]; + } } - (void)setIntValue:(int)value -- cgit v1.2.3