summaryrefslogtreecommitdiff
path: root/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-09-01 04:18:25 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-09-01 04:18:25 +0000
commit3c4fabc58bebf15fd7acc1724599b8749e43213c (patch)
tree2eff68151a12b831824f189f3cc89bacac247454 /macosx/plugins/DFCdrom/macsrc/PluginConfigController.m
parent83a3894bf7925b9d5c0753b756d71b6eb2270a44 (diff)
downloadpcsxr-3c4fabc58bebf15fd7acc1724599b8749e43213c.tar.gz
Remove the Spanish localization because there isn't a spanish .po file.
Translate some localizable.strings files to French, as well as some of the app's preference xib and InfoPlist.strings. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@87048 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFCdrom/macsrc/PluginConfigController.m')
-rwxr-xr-xmacosx/plugins/DFCdrom/macsrc/PluginConfigController.m26
1 files changed, 19 insertions, 7 deletions
diff --git a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m
index 855d6df0..e33f182d 100755
--- a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m
+++ b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m
@@ -106,13 +106,15 @@ void ReadConfig()
ReadMode = ([[keyValues objectForKey:@"Threaded"] boolValue] ? THREADED : NORMAL);
CacheSize = [[keyValues objectForKey:@"Cache Size"] intValue];
- CdrSpeed = [[keyValues objectForKey:@"Speed"] intValue];
+ CdrSpeed = [[keyValues objectForKey:@"Speed"] integerValue];
}
@implementation PluginConfigController
+@synthesize keyValues;
- (IBAction)cancel:(id)sender
{
+ self.keyValues = nil;
[self close];
}
@@ -120,10 +122,10 @@ void ReadConfig()
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
- NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:keyValues];
+ NSMutableDictionary *writeDic = [keyValues mutableCopy];
[writeDic setObject:([Cached intValue] ? @YES : @NO) forKey:@"Threaded"];
- [writeDic setObject:@([CacheSize intValue]) forKey:@"Cache Size"];
+ [writeDic setObject:@([CacheSize integerValue]) forKey:@"Cache Size"];
switch ([CdSpeed indexOfSelectedItem]) {
case 1: [writeDic setObject:@1 forKey:@"Speed"]; break;
@@ -141,7 +143,9 @@ void ReadConfig()
// and set global values accordingly
ReadConfig();
-
+
+ RELEASEOBJ(writeDic);
+ self.keyValues = nil;
[self close];
}
@@ -152,11 +156,10 @@ void ReadConfig()
ReadConfig();
// load from preferences
- RELEASEOBJ(keyValues);
- keyValues = [[defaults dictionaryForKey:PrefsKey] mutableCopy];
+ self.keyValues = [NSMutableDictionary dictionaryWithDictionary:[defaults dictionaryForKey:PrefsKey]];
[Cached setIntValue:[[keyValues objectForKey:@"Threaded"] intValue]];
- [CacheSize setIntValue:[[keyValues objectForKey:@"Cache Size"] intValue]];
+ [CacheSize setIntegerValue:[[keyValues objectForKey:@"Cache Size"] integerValue]];
switch ([[keyValues objectForKey:@"Speed"] intValue]) {
case 1: [CdSpeed selectItemAtIndex:1]; break;
@@ -169,6 +172,15 @@ void ReadConfig()
}
}
+#if !__has_feature(objc_arc)
+- (void)dealloc
+{
+ self.keyValues = nil;
+
+ [super dealloc];
+}
+#endif
+
- (void)awakeFromNib
{
}