Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Sparkle now migrates SUCheckAtStartup preferences from pre-startup-re…

…factoring. Thanks to Jonas Witt for the patch.
  • Loading branch information...
commit 62946680b4a6c8f97b0d7151989082a88aeb707c 1 parent 95ec893
@andymatuschak andymatuschak authored
Showing with 5 additions and 1 deletion.
  1. +1 −0  SUConstants.h
  2. +1 −0  SUConstants.m
  3. +3 −1 SUUpdater.m
View
1  SUConstants.h
@@ -25,6 +25,7 @@ extern NSString *SUPublicDSAKeyKey;
extern NSString *SUAutomaticallyUpdateKey;
extern NSString *SUAllowsAutomaticUpdatesKey;
extern NSString *SUEnableAutomaticChecksKey;
+extern NSString *SUEnableAutomaticChecksKeyOld;
extern NSString *SUEnableSystemProfilingKey;
extern NSString *SUSendProfileInfoKey;
View
1  SUConstants.m
@@ -24,6 +24,7 @@
NSString *SUAllowsAutomaticUpdatesKey = @"SUAllowsAutomaticUpdates";
NSString *SUEnableSystemProfilingKey = @"SUEnableSystemProfiling";
NSString *SUEnableAutomaticChecksKey = @"SUEnableAutomaticChecks";
+NSString *SUEnableAutomaticChecksKeyOld = @"SUCheckAtStartup";
NSString *SUSendProfileInfoKey = @"SUSendProfileInfo";
NSString *SUSparkleErrorDomain = @"SUSparkleErrorDomain";
View
4 SUUpdater.m
@@ -56,9 +56,11 @@ - (void)applicationDidFinishLaunching:(NSNotification *)note
// Has he been asked already?
if ([[SUUserDefaults standardUserDefaults] objectForKey:SUEnableAutomaticChecksKey] == nil)
{
+ if ([[SUUserDefaults standardUserDefaults] objectForKey:SUEnableAutomaticChecksKeyOld])
+ [[SUUserDefaults standardUserDefaults] setBool:[[SUUserDefaults standardUserDefaults] boolForKey:SUEnableAutomaticChecksKeyOld] forKey:SUEnableAutomaticChecksKey];
// Now, we don't want to ask the user for permission to do a weird thing on the first launch.
// We wait until the second launch.
- if ([[SUUserDefaults standardUserDefaults] boolForKey:SUHasLaunchedBeforeKey] == NO)
+ else if ([[SUUserDefaults standardUserDefaults] boolForKey:SUHasLaunchedBeforeKey] == NO)
[[SUUserDefaults standardUserDefaults] setBool:YES forKey:SUHasLaunchedBeforeKey];
else
[SUUpdatePermissionPrompt promptWithHostBundle:hostBundle delegate:self];
Please sign in to comment.
Something went wrong with that request. Please try again.