diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-09-10 18:43:18 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-09-10 18:43:18 +0000 |
| commit | 4b4f074b6659f33b4f9e1c9784861409d8debd97 (patch) | |
| tree | 0fbd7f1ea28c9431cd8bafbaaac5d689d55d5dd6 /macosx/HotkeyController.m | |
| parent | a3ac4842bd5c7058b1363f7d3307f61724fc7178 (diff) | |
| download | pcsxr-4b4f074b6659f33b4f9e1c9784861409d8debd97.tar.gz | |
Convert Objective-C code to modern syntax, mainly for the NSDictionaries.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@87115 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/HotkeyController.m')
| -rwxr-xr-x | macosx/HotkeyController.m | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/macosx/HotkeyController.m b/macosx/HotkeyController.m index c084d549..d705762f 100755 --- a/macosx/HotkeyController.m +++ b/macosx/HotkeyController.m @@ -38,14 +38,14 @@ - (void)mapOutletToIdentifier:(id)outlet forIdentifier:(NSString*)identifier { - [hotkeyOutlets setObject:outlet forKey:identifier]; + hotkeyOutlets[identifier] = outlet; [self setHotkeyDisplay:identifier]; } - (void)setHotkeyDisplay:(NSString*)keyIdent { NSString *label = [self parseMappingDisplayString:keyIdent]; - NSTextField *displayField = [hotkeyOutlets objectForKey:keyIdent]; + NSTextField *displayField = hotkeyOutlets[keyIdent]; if(displayField) { [[displayField cell] setStringValue:label]; @@ -123,12 +123,10 @@ { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults] ; NSMutableDictionary *tempUserMappings = [NSMutableDictionary dictionaryWithDictionary:[defaults dictionaryForKey:@"HotkeyBindings"]]; - [tempUserMappings setValue:[NSDictionary dictionaryWithObjectsAndKeys: - device, @"device", - deviceLabel, @"deviceName", - keyCode, @"keyCode", - keyLabel, @"keyLabel", - nil] forKey:keyIdent]; + [tempUserMappings setValue:@{@"device": device, + @"deviceName": deviceLabel, + @"keyCode": keyCode, + @"keyLabel": keyLabel} forKey:keyIdent]; [defaults setValue:tempUserMappings forKey:@"HotkeyBindings"]; } |
