From 4b4f074b6659f33b4f9e1c9784861409d8debd97 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Tue, 10 Sep 2013 18:43:18 +0000 Subject: 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 --- macosx/HotkeyController.m | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'macosx/HotkeyController.m') 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"]; } -- cgit v1.2.3