Generalize and share mapping menu (main, status, dock) behavior.
[enjoyable.git] / Classes / NJMappingsController.m
index 5d86186..ad257cf 100644 (file)
@@ -51,7 +51,9 @@
     [self updateInterfaceForCurrentMapping];
     [NSNotificationCenter.defaultCenter
         postNotificationName:NJEventMappingListChanged
     [self updateInterfaceForCurrentMapping];
     [NSNotificationCenter.defaultCenter
         postNotificationName:NJEventMappingListChanged
-        object:_mappings];
+                      object:self
+                    userInfo:@{ @"mappings": _mappings,
+                                @"mapping": _currentMapping }];
 }
 
 - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state
 }
 
 - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state
     _manualMapping = mapping;
     _currentMapping = mapping;
     [self updateInterfaceForCurrentMapping];
     _manualMapping = mapping;
     _currentMapping = mapping;
     [self updateInterfaceForCurrentMapping];
-    [NSNotificationCenter.defaultCenter postNotificationName:NJEventMappingChanged
-                                                      object:_currentMapping];
+    [NSNotificationCenter.defaultCenter
+         postNotificationName:NJEventMappingChanged
+         object:self
+         userInfo:@{ @"mapping": _currentMapping }];
 }
 
 - (IBAction)addPressed:(id)sender {
 }
 
 - (IBAction)addPressed:(id)sender {