mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Add alert confirmation for skipping major upgrades
This commit is contained in:
1 parent
a630614dc4
commit
7d3c7ae78a
2 files changed
+29
-8
No files matched your search
Vendored
+12
-3
@@ -91,6 +91,18 @@
|
||||
/* Take care not to overflow the status window. */
|
||||
"Installing update..." = "Installing update…";
|
||||
|
||||
/* Title confirmation for skipping major upgrade and future updates */
|
||||
"Do you want to Skip this Upgrade?" = "Do you want to Skip this Upgrade?";
|
||||
|
||||
/* Confirmation message for skipping major upgrade and future updates */
|
||||
"Skipping this major upgrade will opt out of notifications for future updates." = "Skipping this major upgrade will opt out of notifications for future updates.";
|
||||
|
||||
/* Skipping major upgrade */
|
||||
"Skip Upgrade" = "Skip Upgrade";
|
||||
|
||||
/* Not skipping a major upgrade */
|
||||
"Don't Skip" = "Don't Skip";
|
||||
|
||||
/* the unit for kilobytes */
|
||||
"KB" = "KB";
|
||||
|
||||
@@ -98,9 +110,6 @@
|
||||
without a download but with a URL. */
|
||||
"Learn More..." = "Learn More…";
|
||||
|
||||
/* When the update to download or install is a major (usually paid) one */
|
||||
"Skip Major Update" = "Skip Major Update";
|
||||
|
||||
/* the unit for megabytes */
|
||||
"MB" = "MB";
|
||||
|
||||
|
||||
Vendored
+17
-5
@@ -138,7 +138,23 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE
|
||||
|
||||
- (IBAction)skipThisVersion:(id)__unused sender
|
||||
{
|
||||
[self endWithSelection:SPUUserUpdateChoiceSkip];
|
||||
if (self.state.majorUpgrade) {
|
||||
NSAlert *alert = [[NSAlert alloc] init];
|
||||
alert.alertStyle = NSAlertStyleInformational;
|
||||
alert.informativeText = SULocalizedString(@"Skipping this major upgrade will opt out of notifications for future updates.", nil);
|
||||
alert.messageText = SULocalizedString(@"Do you want to Skip this Upgrade?", nil);
|
||||
|
||||
[alert addButtonWithTitle:SULocalizedString(@"Skip Upgrade", nil)];
|
||||
[alert addButtonWithTitle:SULocalizedString(@"Don't Skip", nil)];
|
||||
|
||||
[alert beginSheetModalForWindow:(NSWindow * _Nonnull)self.window completionHandler:^(NSModalResponse response) {
|
||||
if (response == NSAlertFirstButtonReturn) {
|
||||
[self endWithSelection:SPUUserUpdateChoiceSkip];
|
||||
}
|
||||
}];
|
||||
} else {
|
||||
[self endWithSelection:SPUUserUpdateChoiceSkip];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)remindMeLater:(id)__unused sender
|
||||
@@ -369,10 +385,6 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE
|
||||
// We should be explicit that the update will be installed on quit
|
||||
self.laterButton.title = SULocalizedString(@"Install on Quit", @"Alternate title for 'Remind Me Later' button when downloaded updates can be resumed");
|
||||
}
|
||||
|
||||
if (self.state.majorUpgrade) {
|
||||
self.skipButton.title = SULocalizedString(@"Skip Major Update", nil);
|
||||
}
|
||||
|
||||
if ([self.updateItem isCriticalUpdate]) {
|
||||
self.skipButton.hidden = YES;
|
||||
|
||||
Reference in new issue
Block a user