From 9e2cbbe0a0f25f590f61193ba26a661ac0c5945a Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Tue, 18 Aug 2009 02:30:07 +0000 Subject: [PATCH] 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. --- macosx/Controller.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index 713f9b59d..3f479abd5 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -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];