diff --git a/Sparkle/SPUStatusCompletionResults.h b/Sparkle/SPUStatusCompletionResults.h index 31fd4ae0..e6c6ea47 100644 --- a/Sparkle/SPUStatusCompletionResults.h +++ b/Sparkle/SPUStatusCompletionResults.h @@ -26,7 +26,7 @@ typedef NS_ENUM(NSInteger, SPUUserUpdateChoice) { }; typedef NS_ENUM(NSInteger, SPUUserUpdateState) { - SPUUserUpdateStateNotDownloaded, + SPUUserUpdateStateNew, SPUUserUpdateStateDownloaded, SPUUserUpdateStateInstalling, SPUUserUpdateStateInformational diff --git a/Sparkle/SPUUIBasedUpdateDriver.m b/Sparkle/SPUUIBasedUpdateDriver.m index a80c3286..209d5650 100644 --- a/Sparkle/SPUUIBasedUpdateDriver.m +++ b/Sparkle/SPUUIBasedUpdateDriver.m @@ -117,7 +117,7 @@ } else if (self.resumingInstallingUpdate) { state = SPUUserUpdateStateInstalling; } else { - state = SPUUserUpdateStateNotDownloaded; + state = SPUUserUpdateStateNew; } [self.userDriver showUpdateFoundWithAppcastItem:updateItem userInitiated:self.userInitiated state:state reply:^(SPUUserUpdateChoice userChoice) { @@ -142,7 +142,7 @@ case SPUUserUpdateStateInstalling: [self.coreDriver finishInstallationWithResponse:validatedChoice displayingUserInterface:!self.preventsInstallerInteraction]; break; - case SPUUserUpdateStateNotDownloaded: + case SPUUserUpdateStateNew: [self.coreDriver downloadUpdateFromAppcastItem:updateItem inBackground:NO]; break; case SPUUserUpdateStateInformational: @@ -163,7 +163,7 @@ case SPUUserUpdateChoiceDismiss: switch (state) { case SPUUserUpdateStateDownloaded: - case SPUUserUpdateStateNotDownloaded: + case SPUUserUpdateStateNew: case SPUUserUpdateStateInformational: [self.host setObject:nil forUserDefaultsKey:SUSkippedVersionKey]; [self.delegate uiDriverIsRequestingAbortUpdateWithError:nil]; diff --git a/Sparkle/SPUUserDriver.h b/Sparkle/SPUUserDriver.h index d85c072b..0c23e4f1 100644 --- a/Sparkle/SPUUserDriver.h +++ b/Sparkle/SPUUserDriver.h @@ -77,7 +77,7 @@ SU_EXPORT @protocol SPUUserDriver * @param userInitiated A flag indicating whether or not a user initiated this update check * * @param state The current state of the update. - * SPUUserUpdateStateNotDownloaded - Update has not been downloaded yet. + * SPUUserUpdateStateNew - Update has not been downloaded yet. * SPUUserUpdateStateDownloaded - Update has already been downloaded but not started installing yet. * SPUUserUpdateStateInstalling - Update has been downloaded and already started installing. * SPUUserUpdateStateInformational - Update is only informational and has no download. You can direct the user to the the infoURL property of the appcastItem in their web browser. The informationOnlyUpdate property of the appcastItem will be YES. @@ -89,8 +89,8 @@ SU_EXPORT @protocol SPUUserDriver * If the state is SPUUserUpdateStateInstalling, this may send a quit event to the application and relaunch it immediately (in this state, this behaves as a fast "install and Relaunch"). * * A reply of SPUUserUpdateChoiceDismiss dismisses the update for the time being. The user may be reminded of the update at a later point. - * If the state is SPUUserUpdateStateDownloaded, the downloaded update is kept upon dismissing until the next time an update is shown to the user. - * If the state is SPUUserUpdateStateInstalling, the installing update is also preserved upon dismissing. In this state however, the update will still be installed after the application is terminated. + * If the state is SPUUserUpdateStateDownloaded, the downloaded update is kept after dismissing until the next time an update is shown to the user. + * If the state is SPUUserUpdateStateInstalling, the installing update is also preserved after dismissing. In this state however, the update will also still be installed after the application is terminated. * * A reply of SPUUserUpdateChoiceSkip skips this particular version and won't notify the user again, unless they initiate an update check themselves. * If the state is SPUUserUpdateStateInstalling, the update cannot be skipped, only dismissed or installed. diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index f4ceefc0..927609b4 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -420,13 +420,13 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE if (self.updateItem.isInformationOnlyUpdate) { finalString = [NSString stringWithFormat:SULocalizedString(@"%@ %@ is now available--you have %@. Would you like to learn more about this update on the web?", @"Description text for SUUpdateAlert when the update informational with no download."), self.host.name, updateItemVersion, hostVersion]; } else if ([self.updateItem isCriticalUpdate]) { - if (self.state == SPUUserUpdateStateNotDownloaded) { + if (self.state == SPUUserUpdateStateNew) { finalString = [NSString stringWithFormat:SULocalizedString(@"%@ %@ is now available--you have %@. This is an important update; would you like to download it now?", @"Description text for SUUpdateAlert when the critical update is downloadable."), self.host.name, updateItemVersion, hostVersion]; } else { finalString = [NSString stringWithFormat:SULocalizedString(@"%1$@ %2$@ has been downloaded and is ready to use! This is an important update; would you like to install it and relaunch %1$@ now?", @"Description text for SUUpdateAlert when the critical update has already been downloaded and ready to install."), self.host.name, updateItemVersion]; } } else { - if (self.state == SPUUserUpdateStateNotDownloaded) { + if (self.state == SPUUserUpdateStateNew) { finalString = [NSString stringWithFormat:SULocalizedString(@"%@ %@ is now available--you have %@. Would you like to download it now?", @"Description text for SUUpdateAlert when the update is downloadable."), self.host.name, updateItemVersion, hostVersion]; } else { finalString = [NSString stringWithFormat:SULocalizedString(@"%1$@ %2$@ has been downloaded and is ready to use! Would you like to install it and relaunch %1$@ now?", @"Description text for SUUpdateAlert when the update has already been downloaded and ready to install."), self.host.name, updateItemVersion]; diff --git a/TestApplication/SUPopUpTitlebarUserDriver.m b/TestApplication/SUPopUpTitlebarUserDriver.m index 0c6ab0f4..e3eb2177 100644 --- a/TestApplication/SUPopUpTitlebarUserDriver.m +++ b/TestApplication/SUPopUpTitlebarUserDriver.m @@ -149,12 +149,12 @@ reply(SPUUserUpdateChoiceDismiss); break; - case SPUUserUpdateStateNotDownloaded: + case SPUUserUpdateStateNew: case SPUUserUpdateStateDownloaded: [self showUpdateWithAppcastItem:appcastItem skippable:YES reply:reply]; break; case SPUUserUpdateStateInstalling: - [self showUpdateWithAppcastItem:appcastItem skippable:YES reply:reply]; + [self showUpdateWithAppcastItem:appcastItem skippable:NO reply:reply]; break; } } diff --git a/sparkle-cli/SPUCommandLineUserDriver.m b/sparkle-cli/SPUCommandLineUserDriver.m index e1dbe215..780cf5c2 100644 --- a/sparkle-cli/SPUCommandLineUserDriver.m +++ b/sparkle-cli/SPUCommandLineUserDriver.m @@ -108,7 +108,7 @@ - (void)showUpdateFoundWithAppcastItem:(SUAppcastItem *)appcastItem userInitiated:(BOOL)userInitiated state:(SPUUserUpdateState)state reply:(void (^)(SPUUserUpdateChoice))reply { switch (state) { - case SPUUserUpdateStateNotDownloaded: + case SPUUserUpdateStateNew: [self showUpdateWithAppcastItem:appcastItem updateAdjective:@"new"]; reply(SPUUserUpdateChoiceInstall); break;