mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-29 05:24:26 +00:00
Close windows before termination, not after
This commit is contained in:
1 parent
cf7711fb83
commit
7a1f627c79
3 files changed
+11
-3
No files matched your search
Vendored
+1
@@ -48,6 +48,7 @@
|
||||
|
||||
- (void)abortUpdate;
|
||||
- (void)abortUpdateWithError:(NSError *)error;
|
||||
- (void)terminateApp;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
Vendored
+4
@@ -378,7 +378,11 @@
|
||||
self.tempDir,
|
||||
relaunch ? @"1" : @"0",
|
||||
showUI ? @"1" : @"0"]];
|
||||
[self terminateApp];
|
||||
}
|
||||
|
||||
- (void)terminateApp
|
||||
{
|
||||
[NSApp terminate:self];
|
||||
}
|
||||
|
||||
|
||||
Vendored
+6
-3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user