summaryrefslogtreecommitdiff
path: root/macosx/HotkeyController.m
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/HotkeyController.m')
-rwxr-xr-xmacosx/HotkeyController.m14
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"];
}