For the first time shown, don't show the "never show again" on the donation dialog. The reasoning for this is that new users will get that dialog without a chance to thoroughly use the app, so they can have a week before having the option to hide forever.

This commit is contained in:
Mitchell Livingston 2009-08-18 02:30:07 +00:00
parent 76065155e4
commit 9e2cbbe0a0
1 changed files with 6 additions and 3 deletions

View File

@ -561,14 +561,17 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
NSButton * noDonateButton = [alert addButtonWithTitle: NSLocalizedString(@"Nope", "Donation beg -> button")];
[noDonateButton setKeyEquivalent: @"\e"]; //escape key
[alert setShowsSuppressionButton: YES];
[[alert suppressionButton] setTitle: NSLocalizedString(@"Don't bug me about this ever again.", "Donation beg -> button")];
const BOOL allowNeverAgain = lastDonateDate != nil; //hide the "don't show again" check the first time - give them a little time to try the app
[alert setShowsSuppressionButton: allowNeverAgain];
if (allowNeverAgain)
[[alert suppressionButton] setTitle: NSLocalizedString(@"Don't bug me about this ever again.", "Donation beg -> button")];
const NSInteger donateResult = [alert runModal];
if (donateResult == NSAlertFirstButtonReturn)
[self linkDonate: self];
[fDefaults setBool: ([[alert suppressionButton] state] != NSOnState) forKey: @"WarningDonate"];
if (allowNeverAgain)
[fDefaults setBool: ([[alert suppressionButton] state] != NSOnState) forKey: @"WarningDonate"];
[alert release];