Skip to content
Snippets Groups Projects
Commit 8c99b9bd authored by George Nachman's avatar George Nachman
Browse files

Default to release versions of iTerm2. For the next month, ask...

Default to release versions of iTerm2. For the next month, ask non-early-adopter, non-nightly, beta-receiving, auto-updating users if they'd like to continue getting beta versions
parent 749b162e
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -173,6 +173,9 @@ static BOOL hasBecomeActive = NO;
 
[iTermToolbeltView populateMenu:toolbeltMenu];
 
// Users used to be opted into the beta by default. Make sure the user is cool with that.
[self promptAboutRemainingInBetaIfNeeded];
// Set the Appcast URL and when it changes update it.
[[iTermController sharedInstance] refreshSoftwareUpdateUserDefaults];
[iTermPreferences addObserverForKey:kPreferenceKeyCheckForTestReleases
Loading
Loading
@@ -181,6 +184,51 @@ static BOOL hasBecomeActive = NO;
}];
}
 
- (void)promptAboutRemainingInBetaIfNeeded {
// For a long time—too long—users were opted into the beta program. There are too many of them
// and they don't know it and some of them feel bad feelings. So we'll help them get out. I
// don't like spamming you with crap so let's just do this for a few weeks and that'll fix
// almost all of the problem.
if ([NSDate timeIntervalSinceReferenceDate] > 489542400) { // Midnight GMT July 7 2016
return;
}
static NSString *kHaveAskedAboutBetaKey = @"NoSyncConfirmBeta";
const BOOL haveAsked = [[NSUserDefaults standardUserDefaults] boolForKey:kHaveAskedAboutBetaKey];
if (haveAsked) {
return;
}
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:kHaveAskedAboutBetaKey];
NSString *testingFeed = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"SUFeedURLForTesting"];
const BOOL nightlyChannel = [testingFeed containsString:@"nightly"];
if (nightlyChannel) {
return;
}
const BOOL inBeta = [iTermPreferences boolForKey:kPreferenceKeyCheckForTestReleases];
if (!inBeta) {
return;
}
const BOOL isEarlyAdopter = [testingFeed containsString:@"testing3.xml"];
if (isEarlyAdopter) {
// Early adopters who are already beta testers won't get prompted.
// They are the new "real" beta testers.
return;
}
NSAlert *alert = [[[NSAlert alloc] init] autorelease];
alert.messageText = @"Beta Test Program";
alert.informativeText = @"Would you like to beta test versions of iTerm2 when it updates?";
[alert addButtonWithTitle:@"Yes, I Want Beta Test Versions"];
[alert addButtonWithTitle:@"No, Release Versions Only"];
const NSModalResponse response = [alert runModal];
const BOOL wantBeta = (response == NSAlertFirstButtonReturn);
[[NSUserDefaults standardUserDefaults] setBool:wantBeta
forKey:kPreferenceKeyCheckForTestReleases];
}
// This performs startup activities as long as they haven't been run before.
- (void)performStartupActivities {
if (gStartupActivitiesPerformed) {
Loading
Loading
Loading
Loading
@@ -190,7 +190,7 @@ static NSMutableDictionary *gObservers;
kPreferenceKeySavePasteAndCommandHistory: @NO,
kPreferenceKeyAddBonjourHostsToProfiles: @NO,
kPreferenceKeyCheckForUpdatesAutomatically: @YES,
kPreferenceKeyCheckForTestReleases: @YES,
kPreferenceKeyCheckForTestReleases: @NO,
kPreferenceKeyLoadPrefsFromCustomFolder: @NO,
kPreferenceKeyNeverRemindPrefsChangesLostForFileHaveSelection: @NO,
kPreferenceKeyNeverRemindPrefsChangesLostForFileSelection: @0,
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment