mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-26 04:57:54 +00:00
Disable determinate progress for guided pkg install properly
This commit is contained in:
1 parent
acd22dda12
commit
7980c4dfdc
5 files changed
+23
-2
No files matched your search
Vendored
+4
-2
@@ -136,7 +136,7 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.5;
|
||||
self.statusController = [[SUStatusController alloc] initWithHost:host];
|
||||
[self.statusController setButtonTitle:SULocalizedString(@"Cancel Update", @"") target:nil action:Nil isDefault:NO];
|
||||
[self.statusController beginActionWithTitle:SULocalizedString(@"Installing update...", @"")
|
||||
maxProgressValue:100 statusText: @""];
|
||||
maxProgressValue:installer.supportsDeterminateProgress ? 100 : 0 statusText: @""];
|
||||
[self.statusController showWindow:self];
|
||||
}
|
||||
|
||||
@@ -153,7 +153,9 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.5;
|
||||
|
||||
void(^progressBlock)(double) = ^(double progress){
|
||||
dispatch_async(dispatch_get_main_queue(), ^(){
|
||||
self.statusController.progressValue = progress * 100.0;
|
||||
if (installer.supportsDeterminateProgress) {
|
||||
self.statusController.progressValue = progress * 100.0;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Vendored
+7
@@ -54,4 +54,11 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
// We used to, but it broke due to fragile text processing
|
||||
// Maybe one day someone will fix it, but until then.
|
||||
- (BOOL)supportsDeterminateProgress
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
Vendored
+2
@@ -31,6 +31,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
// Should be thread safe
|
||||
- (NSString *)installationPath;
|
||||
|
||||
- (BOOL)supportsDeterminateProgress;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Vendored
+5
@@ -78,4 +78,9 @@ static NSString *SUOpenUtilityPath = @"/usr/bin/open";
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)supportsDeterminateProgress
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
Vendored
+5
@@ -265,4 +265,9 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)supportsDeterminateProgress
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user