#import "NJOutputController.h"
#import "NJEvents.h"
-@implementation EnjoyableApplicationDelegate
+@implementation EnjoyableApplicationDelegate {
+ NSStatusItem *statusItem;
+}
- (void)didSwitchApplication:(NSNotification *)note {
NSRunningApplication *activeApp = note.userInfo[NSWorkspaceApplicationKey];
[self.mappingsController activateMappingForProcess:activeApp];
}
-- (void)applicationDidFinishLaunching:(NSNotification *)notification {
+- (void)applicationWillFinishLaunching:(NSNotification *)notification {
[NSNotificationCenter.defaultCenter
addObserver:self
selector:@selector(mappingDidChange:)
name:NJEventTranslationDeactivated
object:nil];
- [self.inputController setup];
[self.mappingsController load];
+
+ statusItem = [NSStatusBar.systemStatusBar statusItemWithLength:36];
+ statusItem.image = [NSImage imageNamed:@"Status Menu Icon Disabled"];
+ statusItem.highlightMode = YES;
+ statusItem.menu = statusItemMenu;
+ statusItem.target = self;
}
-- (void)applicationDidBecomeActive:(NSNotification *)notification {
+- (void)applicationDidFinishLaunching:(NSNotification *)notification {
+ [self.inputController setup];
[window makeKeyAndOrderFront:nil];
}
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication
hasVisibleWindows:(BOOL)flag {
- [window makeKeyAndOrderFront:nil];
+ [self restoreToForeground:theApplication];
+ return NO;
+}
+
+- (void)restoreToForeground:(id)sender {
+ ProcessSerialNumber psn = { 0, kCurrentProcess };
+ TransformProcessType(&psn, kProcessTransformToForegroundApplication);
+ [NSApplication.sharedApplication activateIgnoringOtherApps:YES];
+ [window makeKeyAndOrderFront:sender];
+ [NSObject cancelPreviousPerformRequestsWithTarget:self
+ selector:@selector(transformIntoElement:)
+ object:self];
+}
+
+- (void)transformIntoElement:(id)sender {
+ ProcessSerialNumber psn = { 0, kCurrentProcess };
+ TransformProcessType(&psn, kProcessTransformToUIElementApplication);
+}
+
+- (void)flashStatusItem {
+ if ([statusItem.image.name isEqualToString:@"Status Menu Icon"]) {
+ statusItem.image = [NSImage imageNamed:@"Status Menu Icon Disabled"];
+ } else {
+ statusItem.image = [NSImage imageNamed:@"Status Menu Icon"];
+ }
+
+}
+
+- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication {
+ [theApplication hide:theApplication];
+ // If we turn into a UIElement right away, the application cancels
+ // the deactivation events. The dock icon disappears, but an
+ // unresponsive menu bar remains until the user clicks somewhere.
+ // So delay just long enough to be past the end handling that.
+ [self performSelector:@selector(transformIntoElement:) withObject:self afterDelay:0.001];
return NO;
}
- (void)eventTranslationActivated:(NSNotification *)note {
- [NSProcessInfo.processInfo disableAutomaticTermination:@"Input translation is active."];
+ [dockMenu itemAtIndex:0].state = NSOnState;
+ [statusItemMenu itemAtIndex:0].state = NSOnState;
+ statusItem.image = [NSImage imageNamed:@"Status Menu Icon"];
[NSWorkspace.sharedWorkspace.notificationCenter
addObserver:self
selector:@selector(didSwitchApplication:)
name:NSWorkspaceDidActivateApplicationNotification
object:nil];
- NSLog(@"Listening for application changes.");
}
- (void)eventTranslationDeactivated:(NSNotification *)note {
- [NSProcessInfo.processInfo enableAutomaticTermination:@"Input translation is active."];
+ [dockMenu itemAtIndex:0].state = NSOffState;
+ [statusItemMenu itemAtIndex:0].state = NSOffState;
+ statusItem.image = [NSImage imageNamed:@"Status Menu Icon Disabled"];
[NSWorkspace.sharedWorkspace.notificationCenter
removeObserver:self
name:NSWorkspaceDidActivateApplicationNotification
object:nil];
- NSLog(@"Ignoring application changes.");
}
-- (void)mappingListDidChange:(NSNotification *)note {
- NSArray *mappings = note.object;
- while (dockMenuBase.lastItem.representedObject)
- [dockMenuBase removeLastItem];
+- (void)restoreWindowAndShowMappings:(id)sender {
+ [self restoreToForeground:sender];
+ [self.mappingsController mappingPressed:sender];
+}
+
+- (void)addMappingsToMenu:(NSMenu *)menu withKeys:(BOOL)withKeys atIndex:(NSInteger)index {
+ static const NSUInteger MAXIMUM_ITEMS = 5;
int added = 0;
- for (NJMapping *mapping in mappings) {
- NSString *keyEquiv = ++added < 10 ? @(added).stringValue : @"";
+ for (NJMapping *mapping in self.mappingsController) {
+ NSString *keyEquiv = (++added < 10 && withKeys) ? @(added).stringValue : @"";
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:mapping.name
action:@selector(chooseMapping:)
keyEquivalent:keyEquiv];
item.representedObject = mapping;
item.state = mapping == self.mappingsController.currentMapping;
- [dockMenuBase addItem:item];
- }
+ [menu insertItem:item atIndex:index++];
+ if (added == MAXIMUM_ITEMS && self.mappingsController.mappings.count > MAXIMUM_ITEMS + 1) {
+ NSMenuItem *end = [[NSMenuItem alloc] initWithTitle:@"…"
+ action:@selector(restoreWindowAndShowMappings:)
+ keyEquivalent:@""];
+ end.target = self;
+ [menu insertItem:end atIndex:index++];
+ break;
+ }
+ }
+}
+
+- (void)mappingListDidChange:(NSNotification *)note {
+ while (mappingsMenu.lastItem.representedObject)
+ [mappingsMenu removeLastItem];
+ [self addMappingsToMenu:mappingsMenu withKeys:YES atIndex:mappingsMenu.numberOfItems];
+ while ([statusItemMenu itemAtIndex:2].representedObject)
+ [statusItemMenu removeItemAtIndex:2];
+ [self addMappingsToMenu:statusItemMenu withKeys:NO atIndex:2];
}
- (void)mappingDidChange:(NSNotification *)note {
NJMapping *current = note.object;
- for (NSMenuItem *item in dockMenuBase.itemArray)
+ for (NSMenuItem *item in mappingsMenu.itemArray)
+ if (item.representedObject)
+ item.state = item.representedObject == current;
+ for (NSMenuItem *item in statusItemMenu.itemArray)
if (item.representedObject)
item.state = item.representedObject == current;
+
+ if (!window.isVisible)
+ for (int i = 0; i < 4; ++i)
+ [self performSelector:@selector(flashStatusItem)
+ withObject:self
+ afterDelay:0.2 * i];
}
- (void)chooseMapping:(NSMenuItem *)sender {
}
- (NSMenu *)applicationDockMenu:(NSApplication *)sender {
- NSMenu *menu = [[NSMenu alloc] init];
- int added = 0;
- for (NJMapping *mapping in self.mappingsController) {
- NSString *keyEquiv = ++added < 10 ? @(added).stringValue : @"";
- NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:mapping.name
- action:@selector(chooseMapping:)
- keyEquivalent:keyEquiv];
- item.representedObject = mapping;
- item.state = mapping == self.mappingsController.currentMapping;
- [menu addItem:item];
- }
- return menu;
+ while (dockMenu.lastItem.representedObject)
+ [dockMenu removeLastItem];
+ [self addMappingsToMenu:dockMenu withKeys:NO atIndex:dockMenu.numberOfItems];
+ return dockMenu;
}
- (BOOL)application:(NSApplication *)sender openFile:(NSString *)filename {
+ [self restoreToForeground:sender];
NSURL *url = [NSURL fileURLWithPath:filename];
[self.mappingsController addMappingWithContentsOfURL:url];
return YES;
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
- <object class="NSMenuItem" id="342932134">
+ <object class="NSMenuItem" id="466839429">
<reference key="NSMenu" ref="110575045"/>
- <string key="NSTitle">Hide Others</string>
- <string key="NSKeyEquiv">h</string>
- <int key="NSKeyEquivModMask">1572864</int>
+ <string key="NSTitle">Hide From Dock</string>
+ <string key="NSKeyEquiv">w</string>
+ <int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
- <object class="NSMenuItem" id="908899353">
+ <object class="NSMenuItem" id="342932134">
<reference key="NSMenu" ref="110575045"/>
- <string key="NSTitle">Show All</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
+ <string key="NSTitle">Hide Others</string>
+ <string key="NSKeyEquiv">h</string>
+ <int key="NSKeyEquivModMask">1572864</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
- <object class="NSMenuItem" id="625202149">
- <reference key="NSMenu" ref="835318025"/>
- <string key="NSTitle">Bring All to Front</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="35465992"/>
- <reference key="NSMixedImage" ref="502551668"/>
- </object>
</array>
<string key="NSName">_NSWindowsMenu</string>
</object>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
<object class="NSCustomView" id="671181514">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="NSScrollView" id="443618264">
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{198, 198}</string>
<reference key="NSSuperview" ref="947403733"/>
- <reference key="NSNextKeyView" ref="553414014"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="968378655"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<bool key="NSControlAllowsExpansionToolTips">YES</bool>
</array>
<string key="NSFrame">{{1, 1}, {198, 198}}</string>
<reference key="NSSuperview" ref="443618264"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="762432499"/>
<reference key="NSDocView" ref="762432499"/>
<reference key="NSBGColor" ref="834857663"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{306, 1}, {15, 403}}</string>
<reference key="NSSuperview" ref="443618264"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="861276216"/>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<reference key="NSTarget" ref="443618264"/>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-100, -100}, {366, 16}}</string>
<reference key="NSSuperview" ref="443618264"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="947403733"/>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<int key="NSsFlags">1</int>
</array>
<string key="NSFrame">{{0, 20}, {200, 200}}</string>
<reference key="NSSuperview" ref="671181514"/>
- <reference key="NSNextKeyView" ref="947403733"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="553414014"/>
<int key="NSsFlags">150034</int>
<reference key="NSVScroller" ref="968378655"/>
<reference key="NSHScroller" ref="553414014"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{66, -1}, {68, 23}}</string>
<reference key="NSSuperview" ref="671181514"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1023366520"/>
<string key="NSReuseIdentifierKey">_NS:22</string>
<bool key="NSEnabled">YES</bool>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{0, -1}, {34, 23}}</string>
<reference key="NSSuperview" ref="671181514"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="456935010"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="867532725">
<int key="NSvFlags">292</int>
<string key="NSFrame">{{166, -1}, {34, 23}}</string>
<reference key="NSSuperview" ref="671181514"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="828611353">
<int key="NSCellFlags">67108864</int>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{133, -1}, {34, 23}}</string>
<reference key="NSSuperview" ref="671181514"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1043784903"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="57592747">
<int key="NSvFlags">292</int>
<string key="NSFrame">{{33, -1}, {34, 23}}</string>
<reference key="NSSuperview" ref="671181514"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="149148392"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="1008023024">
</object>
</array>
<string key="NSFrameSize">{200, 220}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="443618264"/>
<string key="NSClassName">NSView</string>
</object>
<double key="NSContentHeight">0.0</double>
<bool key="NSAnimates">YES</bool>
</object>
+ <object class="NSMenu" id="388664617">
+ <string key="NSTitle"/>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="679462300">
+ <reference key="NSMenu" ref="388664617"/>
+ <string key="NSTitle">Enable</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="462014786">
+ <reference key="NSMenu" ref="388664617"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="937740972">
+ <reference key="NSMenu" ref="388664617"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="548842355">
+ <reference key="NSMenu" ref="388664617"/>
+ <string key="NSTitle">Show Enjoyable</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="567028745">
+ <reference key="NSMenu" ref="388664617"/>
+ <string key="NSTitle">Quit Enjoyable</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ </array>
+ </object>
+ <object class="NSMenu" id="330397624">
+ <string key="NSTitle"/>
+ <array class="NSMutableArray" key="NSMenuItems">
+ <object class="NSMenuItem" id="803553950">
+ <reference key="NSMenu" ref="330397624"/>
+ <string key="NSTitle">Enable</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="598206649">
+ <reference key="NSMenu" ref="330397624"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ </array>
+ </object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
</object>
<int key="connectionID">870</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">terminate:</string>
+ <reference key="source" ref="1050"/>
+ <reference key="destination" ref="567028745"/>
+ </object>
+ <int key="connectionID">937</int>
+ </object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">orderFrontStandardAboutPanel:</string>
</object>
<int key="connectionID">37</int>
</object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">arrangeInFront:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="625202149"/>
- </object>
- <int key="connectionID">39</int>
- </object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">performZoom:</string>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
- <string key="label">unhideAllApplications:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="908899353"/>
+ <string key="label">performClose:</string>
+ <reference key="source" ref="808667431"/>
+ <reference key="destination" ref="466839429"/>
</object>
- <int key="connectionID">370</int>
+ <int key="connectionID">941</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
</object>
<int key="connectionID">915</int>
</object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">dockMenuBase</string>
- <reference key="source" ref="207406104"/>
- <reference key="destination" ref="720053764"/>
- </object>
- <int key="connectionID">726</int>
- </object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">inputController</string>
</object>
<int key="connectionID">865</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">statusItemMenu</string>
+ <reference key="source" ref="207406104"/>
+ <reference key="destination" ref="388664617"/>
+ </object>
+ <int key="connectionID">928</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dockMenu</string>
+ <reference key="source" ref="207406104"/>
+ <reference key="destination" ref="330397624"/>
+ </object>
+ <int key="connectionID">930</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">mappingsMenu</string>
+ <reference key="source" ref="207406104"/>
+ <reference key="destination" ref="720053764"/>
+ </object>
+ <int key="connectionID">931</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">restoreToForeground:</string>
+ <reference key="source" ref="207406104"/>
+ <reference key="destination" ref="548842355"/>
+ </object>
+ <int key="connectionID">939</int>
+ </object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">removePressed:</string>
</object>
<int key="connectionID">880</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">performClick:</string>
+ <reference key="source" ref="385218002"/>
+ <reference key="destination" ref="803553950"/>
+ </object>
+ <int key="connectionID">932</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">performClick:</string>
+ <reference key="source" ref="385218002"/>
+ <reference key="destination" ref="679462300"/>
+ </object>
+ <int key="connectionID">933</int>
+ </object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<array class="NSMutableArray" key="children">
<reference ref="238522557"/>
<reference ref="755159360"/>
- <reference ref="908899353"/>
<reference ref="632727374"/>
<reference ref="646227648"/>
<reference ref="304266470"/>
<reference ref="1046388886"/>
<reference ref="1056857174"/>
<reference ref="342932134"/>
+ <reference ref="466839429"/>
</array>
<reference key="parent" ref="694149608"/>
</object>
<reference key="object" ref="755159360"/>
<reference key="parent" ref="110575045"/>
</object>
- <object class="IBObjectRecord">
- <int key="objectID">150</int>
- <reference key="object" ref="908899353"/>
- <reference key="parent" ref="110575045"/>
- </object>
<object class="IBObjectRecord">
<int key="objectID">136</int>
<reference key="object" ref="632727374"/>
<reference key="parent" ref="110575045"/>
- <string key="objectName">Quit Enjoy</string>
+ <string key="objectName">Quit Enjoyable</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">144</int>
<reference key="object" ref="835318025"/>
<array class="NSMutableArray" key="children">
<reference ref="299356726"/>
- <reference ref="625202149"/>
<reference ref="575023229"/>
<reference ref="1011231497"/>
</array>
<reference key="object" ref="299356726"/>
<reference key="parent" ref="835318025"/>
</object>
- <object class="IBObjectRecord">
- <int key="objectID">5</int>
- <reference key="object" ref="625202149"/>
- <reference key="parent" ref="835318025"/>
- </object>
<object class="IBObjectRecord">
<int key="objectID">239</int>
<reference key="object" ref="575023229"/>
<reference key="object" ref="158646067"/>
<reference key="parent" ref="290995057"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">918</int>
+ <reference key="object" ref="388664617"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="679462300"/>
+ <reference ref="462014786"/>
+ <reference ref="548842355"/>
+ <reference ref="567028745"/>
+ <reference ref="937740972"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Status Item Menu</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">919</int>
+ <reference key="object" ref="679462300"/>
+ <reference key="parent" ref="388664617"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">922</int>
+ <reference key="object" ref="462014786"/>
+ <reference key="parent" ref="388664617"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">923</int>
+ <reference key="object" ref="330397624"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="598206649"/>
+ <reference ref="803553950"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Dock Menu</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">926</int>
+ <reference key="object" ref="548842355"/>
+ <reference key="parent" ref="388664617"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">924</int>
+ <reference key="object" ref="598206649"/>
+ <reference key="parent" ref="330397624"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">925</int>
+ <reference key="object" ref="803553950"/>
+ <reference key="parent" ref="330397624"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">936</int>
+ <reference key="object" ref="567028745"/>
+ <reference key="parent" ref="388664617"/>
+ <string key="objectName">Quit Enjoyable</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">938</int>
+ <reference key="object" ref="937740972"/>
+ <reference key="parent" ref="388664617"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">940</int>
+ <reference key="object" ref="466839429"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="144.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="145.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="149.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="150.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="19.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="23.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="236.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="479.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="482.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="487.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableDictionary" key="507.IBAttributePlaceholdersKey">
<string key="NS.key.0">ToolTip</string>
<object class="IBToolTipAttribute" key="NS.object.0">
<string key="914.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="916.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="917.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="918.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="919.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="92.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="922.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="923.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="924.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="925.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="926.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="936.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="938.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="940.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
- <int key="maxID">917</int>
+ <int key="maxID">941</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">EnjoyableApplicationDelegate</string>
<string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">restoreToForeground:</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <string key="NS.key.0">restoreToForeground:</string>
+ <object class="IBActionInfo" key="NS.object.0">
+ <string key="name">restoreToForeground:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
<dictionary class="NSMutableDictionary" key="outlets">
- <string key="dockMenuBase">NSMenu</string>
+ <string key="dockMenu">NSMenu</string>
<string key="inputController">NJDeviceController</string>
<string key="mappingsController">NJMappingsController</string>
+ <string key="mappingsMenu">NSMenu</string>
+ <string key="statusItemMenu">NSMenu</string>
<string key="window">NSWindow</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
- <object class="IBToOneOutletInfo" key="dockMenuBase">
- <string key="name">dockMenuBase</string>
+ <object class="IBToOneOutletInfo" key="dockMenu">
+ <string key="name">dockMenu</string>
<string key="candidateClassName">NSMenu</string>
</object>
<object class="IBToOneOutletInfo" key="inputController">
<string key="name">mappingsController</string>
<string key="candidateClassName">NJMappingsController</string>
</object>
+ <object class="IBToOneOutletInfo" key="mappingsMenu">
+ <string key="name">mappingsMenu</string>
+ <string key="candidateClassName">NSMenu</string>
+ </object>
+ <object class="IBToOneOutletInfo" key="statusItemMenu">
+ <string key="name">statusItemMenu</string>
+ <string key="candidateClassName">NSMenu</string>
+ </object>
<object class="IBToOneOutletInfo" key="window">
<string key="name">window</string>
<string key="candidateClassName">NSWindow</string>