diff --git a/stepmania/PBProject/Installer/InstallerWindowController.h b/stepmania/PBProject/Installer/InstallerWindowController.h index 397abaad12..81f274a675 100644 --- a/stepmania/PBProject/Installer/InstallerWindowController.h +++ b/stepmania/PBProject/Installer/InstallerWindowController.h @@ -20,4 +20,5 @@ - (void)finishedInstalling:(BOOL)success; - (BOOL)askQuestion:(NSString *)question; - (IBAction)pushedQuestionButton:(id)sender; +- (void)windowWillClose:(NSNotification *)notification; @end diff --git a/stepmania/PBProject/Installer/InstallerWindowController.m b/stepmania/PBProject/Installer/InstallerWindowController.m index 037c50e751..6b39f3d4f8 100644 --- a/stepmania/PBProject/Installer/InstallerWindowController.m +++ b/stepmania/PBProject/Installer/InstallerWindowController.m @@ -21,6 +21,7 @@ if (finished) [NSApp terminate:self]; [sender setEnabled:NO]; + [[[self window] standardWindowButton:NSWindowCloseButton] setEnabled:NO]; [self postMessage:@"Starting installation."]; [NSThread detachNewThreadSelector:@selector(startHelper:) toTarget:helper withObject:self]; } @@ -36,6 +37,7 @@ - (void)finishedInstalling:(BOOL)success { + [[[self window] standardWindowButton:NSWindowCloseButton] setEnabled:YES]; if (success) { [button setTitle:@"Quit Installer"]; @@ -58,4 +60,8 @@ [NSApp stopModalWithCode:[sender tag]]; } +- (void)windowWillClose:(NSNotification *)notification +{ + [NSApp terminate:self]; +} @end