mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-29 05:24:26 +00:00
Automatically download update and wait until restart to install
This commit is contained in:
1 parent
2095b97ae3
commit
b3ce4141d1
3 files changed
+10
-2
No files matched your search
Vendored
+8
@@ -43,6 +43,14 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
|
||||
|
||||
- (void)showUpdateAlert
|
||||
{
|
||||
|
||||
id<SUUpdaterDelegate> updaterDelegate = [self.updater delegate];
|
||||
if ([updaterDelegate suppressSparkleUI])
|
||||
{
|
||||
[self automaticUpdateAlertFinishedWithChoice:SUInstallLaterChoice];
|
||||
return;
|
||||
}
|
||||
|
||||
self.interruptible = NO;
|
||||
self.alert = [[SUAutomaticUpdateAlert alloc] initWithAppcastItem:self.updateItem host:self.host completionBlock:^(SUAutomaticInstallationChoice choice) {
|
||||
[self automaticUpdateAlertFinishedWithChoice:choice];
|
||||
|
||||
Vendored
+1
-1
@@ -117,7 +117,7 @@
|
||||
switch (choice) {
|
||||
case SUInstallUpdateChoice:
|
||||
|
||||
if(![[self.updater delegate] suppressUI]) {
|
||||
if(![[self.updater delegate] suppressSparkleUI]) {
|
||||
self.statusController = [[SUStatusController alloc] initWithHost:self.host];
|
||||
[self.statusController beginActionWithTitle:SULocalizedString(@"Downloading update...", @"Take care not to overflow the status window.") maxProgressValue:0.0 statusText:nil];
|
||||
[self.statusController setButtonTitle:SULocalizedString(@"Cancel", nil) target:self action:@selector(cancelDownload:) isDefault:NO];
|
||||
|
||||
Vendored
+1
-1
@@ -154,7 +154,7 @@ SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey;
|
||||
@optional
|
||||
|
||||
|
||||
@property (nonatomic) BOOL suppressUI;
|
||||
-(BOOL)suppressSparkleUI;
|
||||
|
||||
/*!
|
||||
Returns whether to allow Sparkle to pop up.
|
||||
|
||||
Reference in new issue
Block a user