X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=Classes%2FEnjoyableApplicationDelegate.m;h=017926a807e0bf64d644bc3bf115e18f787a92f5;hp=76f99e041bc28eba558258578fa99306783b00f2;hb=0a8d6333a3ac4684b70ab7f3581a93bf96638d6f;hpb=794a6e8c99be447b2ebc2b5510f7bf8ddeb4d75d diff --git a/Classes/EnjoyableApplicationDelegate.m b/Classes/EnjoyableApplicationDelegate.m index 76f99e0..017926a 100644 --- a/Classes/EnjoyableApplicationDelegate.m +++ b/Classes/EnjoyableApplicationDelegate.m @@ -5,8 +5,6 @@ // Created by Sam McCall on 4/05/09. // -#import - #import "EnjoyableApplicationDelegate.h" #import "NJMapping.h" @@ -112,6 +110,8 @@ - (void)eventSimulationStarted:(NSNotification *)note { self.simulatingEventsButton.state = NSOnState; statusItem.image = [NSImage imageNamed:@"Status Menu Icon"]; + [NSProcessInfo.processInfo + disableAutomaticTermination:@"Event simulation running."]; [NSWorkspace.sharedWorkspace.notificationCenter addObserver:self selector:@selector(didSwitchApplication:) @@ -122,6 +122,8 @@ - (void)eventSimulationStopped:(NSNotification *)note { self.simulatingEventsButton.state = NSOffState; statusItem.image = [NSImage imageNamed:@"Status Menu Icon Disabled"]; + [NSProcessInfo.processInfo + enableAutomaticTermination:@"Event simulation running."]; [NSWorkspace.sharedWorkspace.notificationCenter removeObserver:self name:NSWorkspaceDidActivateApplicationNotification @@ -297,8 +299,7 @@ - (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