diff --git a/Autoupdate/AppInstaller.m b/Autoupdate/AppInstaller.m index ef84f3f3..41d973ba 100644 --- a/Autoupdate/AppInstaller.m +++ b/Autoupdate/AppInstaller.m @@ -503,25 +503,25 @@ static const NSTimeInterval SUDisplayProgressTimeDelay = 0.7; }); }; - // Let the other end know we cancelled so they can fail gracefully without disturbing the user - BOOL installationCancelled = (!performedSecondStage && secondStageError.code == SUInstallationCancelledError); - if (performedSecondStage || installationCancelled) { + // Let the other end know we canceled so they can fail gracefully without disturbing the user + BOOL installationCanceled = (!performedSecondStage && secondStageError.code == SUInstallationCanceledError); + if (performedSecondStage || installationCanceled) { dispatch_async(dispatch_get_main_queue(), ^{ - uint8_t cancelled = (uint8_t)installationCancelled; + uint8_t canceled = (uint8_t)installationCanceled; uint8_t targetTerminated = (uint8_t)self.terminationListener.terminated; - uint8_t sendInfo[] = {cancelled, targetTerminated}; + uint8_t sendInfo[] = {canceled, targetTerminated}; NSData *sendData = [NSData dataWithBytes:sendInfo length:sizeof(sendInfo)]; [self.communicator handleMessageWithIdentifier:SUInstallationFinishedStage2 data:sendData]; - if (installationCancelled) { + if (installationCanceled) { cleanupAndExit(); } }); } - if (!performedSecondStage && !installationCancelled) { + if (!performedSecondStage && !installationCanceled) { cleanupAndExit(); } } diff --git a/InstallerLauncher/SUAuthorizationReply.h b/InstallerLauncher/SUAuthorizationReply.h index 941bd17a..cba296b2 100644 --- a/InstallerLauncher/SUAuthorizationReply.h +++ b/InstallerLauncher/SUAuthorizationReply.h @@ -11,7 +11,7 @@ typedef NS_ENUM(NSUInteger, SUAuthorizationReply) { SUAuthorizationReplySuccess = 0, - SUAuthorizationReplyCancelled = 1, + SUAuthorizationReplyCanceled = 1, SUAuthorizationReplyFailure = 2, SUAuthorizationReplyAuthorizeLater = 3 }; diff --git a/InstallerLauncher/SUInstallerLauncher.m b/InstallerLauncher/SUInstallerLauncher.m index ecd6cd99..d8cbfdb6 100644 --- a/InstallerLauncher/SUInstallerLauncher.m +++ b/InstallerLauncher/SUInstallerLauncher.m @@ -257,7 +257,7 @@ if (submittedJob == true) { reply = SUAuthorizationReplySuccess; } else if (canceledAuthorization) { - reply = SUAuthorizationReplyCancelled; + reply = SUAuthorizationReplyCanceled; } else { reply = SUAuthorizationReplyFailure; } @@ -291,7 +291,7 @@ } } - if (installerReply == SUAuthorizationReplyCancelled) { + if (installerReply == SUAuthorizationReplyCanceled) { completionHandler(installerReply); } else { completionHandler(submittedProgressTool ? SUAuthorizationReplySuccess : SUAuthorizationReplyFailure); diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index efa1ed51..5a667472 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -169,7 +169,7 @@ self.aborted = YES; if (error != nil) { - if (error.code != SUNoUpdateError && error.code != SUInstallationCancelledError && error.code != SUInstallationAuthorizeLaterError) { // Let's not bother logging this. + if (error.code != SUNoUpdateError && error.code != SUInstallationCanceledError && error.code != SUInstallationAuthorizeLaterError) { // Let's not bother logging this. NSError *errorToDisplay = error; int finiteRecursion=5; do { diff --git a/Sparkle/SUErrors.h b/Sparkle/SUErrors.h index ec68ebac..aae5ca7b 100644 --- a/Sparkle/SUErrors.h +++ b/Sparkle/SUErrors.h @@ -54,7 +54,7 @@ typedef NS_ENUM(OSStatus, SUError) { SURelaunchError = 4004, SUInstallationError = 4005, SUDowngradeError = 4006, - SUInstallationCancelledError = 4007, + SUInstallationCanceledError = 4007, SUInstallationAuthorizeLaterError = 4008 }; diff --git a/Sparkle/SUInstallerDriver.m b/Sparkle/SUInstallerDriver.m index f28985e0..f9cff8bd 100644 --- a/Sparkle/SUInstallerDriver.m +++ b/Sparkle/SUInstallerDriver.m @@ -262,12 +262,12 @@ } else if (identifier == SUInstallationFinishedStage2) { self.currentStage = identifier; - BOOL cancelledInstallation = NO; + BOOL canceledInstallation = NO; if (data.length >= sizeof(uint8_t)) { - cancelledInstallation = (*(const uint8_t *)data.bytes == 0x1); + canceledInstallation = (*(const uint8_t *)data.bytes == 0x1); } - if (cancelledInstallation) { + if (canceledInstallation) { [self.delegate installerIsRequestingAbortInstallWithError:nil]; } else { if (!self.startedInstalling) { @@ -450,8 +450,8 @@ case SUAuthorizationReplyFailure: completionHandler([NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{ NSLocalizedDescriptionKey:SULocalizedString(@"An error occurred while launching the installer. Please try again later.", nil) }]); break; - case SUAuthorizationReplyCancelled: - completionHandler([NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationCancelledError userInfo:nil]); + case SUAuthorizationReplyCanceled: + completionHandler([NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationCanceledError userInfo:nil]); break; case SUAuthorizationReplyAuthorizeLater: completionHandler([NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationAuthorizeLaterError userInfo:nil]); diff --git a/Sparkle/SUStatusCompletionResults.h b/Sparkle/SUStatusCompletionResults.h index c92a4d27..ee7a81fa 100644 --- a/Sparkle/SUStatusCompletionResults.h +++ b/Sparkle/SUStatusCompletionResults.h @@ -18,12 +18,12 @@ typedef NS_ENUM(NSUInteger, SUUpdateCheckTimerStatus) { typedef NS_ENUM(NSUInteger, SUUserInitiatedCheckStatus) { SUUserInitiatedCheckDone, - SUUserInitiatedCheckCancelled + SUUserInitiatedCheckCanceled }; typedef NS_ENUM(NSUInteger, SUDownloadUpdateStatus) { SUDownloadUpdateDone, - SUDownloadUpdateCancelled + SUDownloadUpdateCanceled }; typedef NS_ENUM(NSUInteger, SUInstallUpdateStatus) { diff --git a/Sparkle/SUUIBasedUpdateDriver.m b/Sparkle/SUUIBasedUpdateDriver.m index 3d3dc468..e124be4b 100644 --- a/Sparkle/SUUIBasedUpdateDriver.m +++ b/Sparkle/SUUIBasedUpdateDriver.m @@ -150,7 +150,7 @@ switch (downloadCompletionStatus) { case SUDownloadUpdateDone: break; - case SUDownloadUpdateCancelled: + case SUDownloadUpdateCanceled: dispatch_async(dispatch_get_main_queue(), ^{ if ([self.updaterDelegate respondsToSelector:@selector(userDidCancelDownload:)]) { [self.updaterDelegate userDidCancelDownload:self.updater]; @@ -236,7 +236,7 @@ abortUpdate(); }); }]; - } else if (error.code == SUInstallationCancelledError || error.code == SUInstallationAuthorizeLaterError) { + } else if (error.code == SUInstallationCanceledError || error.code == SUInstallationAuthorizeLaterError) { abortUpdate(); } else { [self.userDriver showUpdaterError:nonNullError acknowledgement:^{ diff --git a/Sparkle/SUUserDriver.h b/Sparkle/SUUserDriver.h index 5428bdcf..a1e10241 100644 --- a/Sparkle/SUUserDriver.h +++ b/Sparkle/SUUserDriver.h @@ -92,7 +92,7 @@ NS_ASSUME_NONNULL_BEGIN * * Respond to the user initiating an update check. Sparkle uses this to show the user a window with an indeterminate progress bar. * - * @param updateCheckStatusCompletion A reply indicating whether the initiated update check is done or cancelled. + * @param updateCheckStatusCompletion A reply indicating whether the initiated update check is done or canceled. * Attempts to canceling can be made before -dismissUserInitiatedUpdateCheck is invoked. Replying with SUUserInitiatedCheckDone * on the other hand should not be done until -dismissUserInitiatedUpdateCheck is invoked. * @@ -140,7 +140,7 @@ NS_ASSUME_NONNULL_BEGIN * Show the user an update that has started installing can be resumed and installed immediately * * Let the user know an update that has already been downloaded and started installing can be resumed. - * Note at this point the update cannot be cancelled. + * Note at this point the update cannot be canceled. * * @param appcastItem The Appcast Item containing information that reflects the new update * @@ -207,7 +207,7 @@ NS_ASSUME_NONNULL_BEGIN * * Let the user know that downloading the new update started. * - * @param downloadUpdateStatusCompletion A reply of SUDownloadUpdateCancelled can be used to cancel + * @param downloadUpdateStatusCompletion A reply of SUDownloadUpdateCanceled can be used to cancel * the download at any point before -showDownloadDidStartExtractingUpdate is invoked. * A reply of SUDownloadUpdateDone signifies that the download is done, which should not be invoked until * -showDownloadDidStartExtractingUpdate diff --git a/Sparkle/SUUserDriverCoreComponent.m b/Sparkle/SUUserDriverCoreComponent.m index 7ea17068..2711c379 100644 --- a/Sparkle/SUUserDriverCoreComponent.m +++ b/Sparkle/SUUserDriverCoreComponent.m @@ -155,7 +155,7 @@ - (void)cancelUpdateCheckStatus { if (self.updateCheckStatusCompletion != nil) { - self.updateCheckStatusCompletion(SUUserInitiatedCheckCancelled); + self.updateCheckStatusCompletion(SUUserInitiatedCheckCanceled); self.updateCheckStatusCompletion = nil; } } @@ -178,7 +178,7 @@ - (void)cancelDownloadStatus { if (self.downloadStatusCompletion != nil) { - self.downloadStatusCompletion(SUDownloadUpdateCancelled); + self.downloadStatusCompletion(SUDownloadUpdateCanceled); self.downloadStatusCompletion = nil; } } diff --git a/Sparkle/SUUserInitiatedUpdateDriver.m b/Sparkle/SUUserInitiatedUpdateDriver.m index 209624a2..4c2c3c12 100644 --- a/Sparkle/SUUserInitiatedUpdateDriver.m +++ b/Sparkle/SUUserInitiatedUpdateDriver.m @@ -46,7 +46,7 @@ switch (completionStatus) { case SUUserInitiatedCheckDone: break; - case SUUserInitiatedCheckCancelled: + case SUUserInitiatedCheckCanceled: dispatch_async(dispatch_get_main_queue(), ^{ if (self.showingUserInitiatedProgress) { [self abortUpdate];