Use renameMapping in the input controller rather than setting the name directly when...
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Sat, 17 Aug 2013 12:03:51 +0000 (14:03 +0200)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Sat, 17 Aug 2013 12:03:51 +0000 (14:03 +0200)
Fix some formatting issues.

Classes/EnjoyableApplicationDelegate.m
Classes/NJInputController.m
Info.plist

index 449f6ef4bab5808164322c42635a91099ea13034..25b9937216283f5820ea401ede9f6496690c6846 100644 (file)
 - (void)mappingsViewController:(NJMappingsViewController *)mvc
           renameMappingAtIndex:(NSInteger)index
                         toName:(NSString *)name {
-    [self.ic renameMapping:self.ic.mappings[index]
-                                        to:name];
+    [self.ic renameMapping:self.ic.mappings[index] to:name];
 }
 
 - (BOOL)mappingsViewController:(NJMappingsViewController *)mvc
index 5ba9828e29b77cc8b0f16da682e3dfecc4692f94..3ee088455f2d282b6a227662a03b75d2bc9872b3 100644 (file)
@@ -295,8 +295,7 @@ static CVReturn displayLink_update_cb(CVDisplayLinkRef displayLink,
         if ([oldMapping.name.lowercaseString isEqualToString:@"@application"]
             || [oldMapping.name.lowercaseString isEqualToString:
                 NSLocalizedString(@"@Application", nil).lowercaseString]) {
-                oldMapping.name = app.bestMappingName;
-                [self mappingsChanged];
+                [self renameMapping:oldMapping to:app.bestMappingName];
             }
     }
     _manualMapping = oldMapping;
@@ -307,10 +306,10 @@ static CVReturn displayLink_update_cb(CVDisplayLinkRef displayLink,
     _currentMapping = mapping;
     NSUInteger idx = [self indexOfMapping:_currentMapping];
     [NSNotificationCenter.defaultCenter
-     postNotificationName:NJEventMappingChanged
-     object:self
-     userInfo:@{ NJMappingKey : _currentMapping,
-     NJMappingIndexKey: @(idx) }];
+        postNotificationName:NJEventMappingChanged
+        object:self
+        userInfo:@{ NJMappingKey : _currentMapping,
+                    NJMappingIndexKey: @(idx) }];
 }
 
 - (void)activateMapping:(NJMapping *)mapping {
index 1e6b7d947703ca53701717c290957477180adbfb..24e09512629562c385d52340fb10898bbe44624b 100644 (file)
@@ -46,7 +46,7 @@
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>605</string>
+       <string>607</string>
        <key>LSApplicationCategoryType</key>
        <string>public.app-category.utilities</string>
        <key>NSHumanReadableCopyright</key>