mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
s/cancelled/canceled/
This commit is contained in:
1 parent
da8065f67e
commit
d8196e1c5d
11 files changed
+27
-27
No files matched your search
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
typedef NS_ENUM(NSUInteger, SUAuthorizationReply)
|
||||
{
|
||||
SUAuthorizationReplySuccess = 0,
|
||||
SUAuthorizationReplyCancelled = 1,
|
||||
SUAuthorizationReplyCanceled = 1,
|
||||
SUAuthorizationReplyFailure = 2,
|
||||
SUAuthorizationReplyAuthorizeLater = 3
|
||||
};
|
||||
@@ -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);
|
||||
|
||||
Vendored
+1
-1
@@ -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 {
|
||||
|
||||
Vendored
+1
-1
@@ -54,7 +54,7 @@ typedef NS_ENUM(OSStatus, SUError) {
|
||||
SURelaunchError = 4004,
|
||||
SUInstallationError = 4005,
|
||||
SUDowngradeError = 4006,
|
||||
SUInstallationCancelledError = 4007,
|
||||
SUInstallationCanceledError = 4007,
|
||||
SUInstallationAuthorizeLaterError = 4008
|
||||
};
|
||||
|
||||
|
||||
Vendored
+5
-5
@@ -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]);
|
||||
|
||||
Vendored
+2
-2
@@ -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) {
|
||||
|
||||
Vendored
+2
-2
@@ -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:^{
|
||||
|
||||
Vendored
+3
-3
@@ -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
|
||||
|
||||
Vendored
+2
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@
|
||||
switch (completionStatus) {
|
||||
case SUUserInitiatedCheckDone:
|
||||
break;
|
||||
case SUUserInitiatedCheckCancelled:
|
||||
case SUUserInitiatedCheckCanceled:
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if (self.showingUserInitiatedProgress) {
|
||||
[self abortUpdate];
|
||||
|
||||
Reference in new issue
Block a user