Close windows before termination, not after

This commit is contained in:
Kornel Lesiński committed 2014-07-26 02:16:58 +01:00
1 parent cf7711fb83
commit 7a1f627c79
3 files changed
+11 -3

No files matched your search

+1
View File
@@ -48,6 +48,7 @@
- (void)abortUpdate;
- (void)abortUpdateWithError:(NSError *)error;
- (void)terminateApp;
@end
+4
View File
@@ -378,7 +378,11 @@
self.tempDir,
relaunch ? @"1" : @"0",
showUI ? @"1" : @"0"]];
[self terminateApp];
}
- (void)terminateApp
{
[NSApp terminate:self];
}
+6 -3
View File
@@ -186,18 +186,21 @@
[self.statusController beginActionWithTitle:SULocalizedString(@"Installing update...", @"Take care not to overflow the status window.") maxProgressValue:0.0 statusText:nil];
[self.statusController setButtonEnabled:NO];
[super installWithToolAndRelaunch:relaunch];
}
- (void)terminateApp
{
// if a user chooses to NOT relaunch the app (as is the case with WebKit
// when it asks you if you are sure you want to close the app with multiple
// tabs open), the status window still stays on the screen and obscures
// other windows; with this fix, it doesn't
if (self.statusController)
{
if (self.statusController) {
[self.statusController close];
self.statusController = nil;
}
[super terminateApp];
}
- (void)abortUpdateWithError:(NSError *)error