}
- (void)mappingsListDidChange:(NSNotification *)note {
- NSArray *mappings = note.userInfo[@"mappings"];
- NJMapping *currentMapping = note.userInfo[@"mapping"];
+ NSArray *mappings = note.userInfo[NJMappingListKey];
+ NJMapping *currentMapping = note.userInfo[NJMappingKey];
NSMenuItem *toRemove;
while (self.menu.numberOfItems > self.firstMappingIndex
&& (toRemove = [self.menu itemAtIndex:self.firstMappingIndex])
}
- (void)mappingDidChange:(NSNotification *)note {
- NJMapping *mapping = note.userInfo[@"mapping"];
+ NJMapping *mapping = note.userInfo[NJMappingKey];
for (NSMenuItem *item in self.menu.itemArray)
if ([item.representedObject isKindOfClass:NJMapping.class])
item.state = mapping == item.representedObject;
[NSNotificationCenter.defaultCenter
postNotificationName:NJEventMappingListChanged
object:self
- userInfo:@{ @"mappings": _mappings,
- @"mapping": _currentMapping }];
+ userInfo:@{ NJMappingListKey: _mappings,
+ NJMappingKey: _currentMapping }];
}
- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>123</string>
+ <string>124</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>NSHumanReadableCopyright</key>
//
//
-#define NJEventMappingChanged @"NJEventMappingChanged"
-#define NJEventMappingListChanged @"NJEventMappingListChanged"
-#define NJEventTranslationActivated @"NJEventTranslationActivated"
-#define NJEventTranslationDeactivated @"NJEventTranslationDeactivated"
+#define NJEventMappingChanged @"com.yukkurigames.Enjoyable.MappingChanged"
+#define NJEventMappingListChanged @"com.yukkurigames.Enjoyable.MappingListChanged"
+#define NJEventTranslationActivated @"com.yukkurigames.Enjoyable.EventTranslationActivated"
+#define NJEventTranslationDeactivated @"com.yukkurigames.Enjoyable.EventTranslationDeactivated"
+
+#define NJMappingKey @"com.yukkurigames.Enjoyable.Mapping"
+#define NJMappingListKey @"com.yukkurigames.Enjoyable.MappingList"