Skip to content

Commit

Permalink
Move shutdown outside of class implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
cehoffman committed May 14, 2012
1 parent ad78411 commit 84b4a15
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions os/mac/iTerm2HotKey.m
Expand Up @@ -18,13 +18,6 @@ +(AppListener *)sharedListener {
return _shared;
}

void shutdown(int signum) {
UnregisterEventHotKey(hotKeyRef);
[[[NSWorkspace sharedWorkspace] notificationCenter]
removeObserver:[AppListener sharedListener]];
[[NSApplication sharedApplication] terminate:nil];
}

-(void)notified:(NSNotification *)aNotification {
NSRunningApplication *sender;
NSString *ident;
Expand All @@ -38,6 +31,13 @@ -(void)notified:(NSNotification *)aNotification {
}
@end

void shutdown(int signum) {
UnregisterEventHotKey(hotKeyRef);
[[[NSWorkspace sharedWorkspace] notificationCenter]
removeObserver:[AppListener sharedListener]];
[[NSApplication sharedApplication] terminate:nil];
}

OSStatus hotkey_handler(EventHandlerCallRef next, EventRef event, void *data) {
NSRunningApplication *iTerm2;
NSArray *apps = [NSRunningApplication
Expand Down

0 comments on commit 84b4a15

Please sign in to comment.