diff --git a/Sparkle/Base.lproj/Sparkle.strings b/Sparkle/Base.lproj/Sparkle.strings index 64cb9285..041b8946 100644 --- a/Sparkle/Base.lproj/Sparkle.strings +++ b/Sparkle/Base.lproj/Sparkle.strings @@ -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"; diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index 3f72971c..27050245 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -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;