Automatically download update and wait until restart to install

This commit is contained in:
Marcus Osobase committed 2016-05-05 16:07:51 -04:00
1 parent 2095b97ae3
commit b3ce4141d1
3 files changed
+10 -2

No files matched your search

+8
View File
@@ -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];
+1 -1
View File
@@ -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];
+1 -1
View File
@@ -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.