Close app on window close
This commit is contained in:
parent
d26233998c
commit
83da5ad0f1
|
@ -19,6 +19,12 @@
|
|||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
|
||||
task = [NSTask new];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(mainWindowClosed:)
|
||||
name: NSWindowWillCloseNotification
|
||||
object: window];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(taskStatusChanged:)
|
||||
|
@ -83,4 +89,8 @@
|
|||
[NSApp terminate: self];
|
||||
}
|
||||
|
||||
- (void) mainWindowClosed: (NSNotification *) aNotification {
|
||||
[NSApp terminate: self];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue