aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2013-03-10 23:38:13 +0000
committerrowanbeentje <rowan@beent.je>2013-03-10 23:38:13 +0000
commit44d72e95870de18e00e270f496971e4c968c3834 (patch)
tree9174a48be34b51f0d413b4a68b81f814fc3b4250
parentecac18dbf7e49a849dd7089902c6b762cb7f1189 (diff)
downloadsequelpro-44d72e95870de18e00e270f496971e4c968c3834.tar.gz
sequelpro-44d72e95870de18e00e270f496971e4c968c3834.tar.bz2
sequelpro-44d72e95870de18e00e270f496971e4c968c3834.zip
- Alter the preferences favourite minimum version to avoid issues with previous runs of nightlies, which may partially address Issue #1588
- Remove the old favourites key from the preferences now imports have succeeded
-rw-r--r--Source/SPPreferencesUpgrade.m20
1 files changed, 13 insertions, 7 deletions
diff --git a/Source/SPPreferencesUpgrade.m b/Source/SPPreferencesUpgrade.m
index 77af6b0a..af639191 100644
--- a/Source/SPPreferencesUpgrade.m
+++ b/Source/SPPreferencesUpgrade.m
@@ -314,19 +314,20 @@ void SPApplyRevisionChanges(void)
[prefs setObject:newMappedValue forKey:@"DefaultEncodingTag"];
}
- // For versions prior to 3695 (<1.0), migrate the favourites across if appropriate
- if (recordedVersionNumber < 3695) {
- SPMigrateConnectionFavoritesData();
- }
-
// For versions prior to 3922 (<1.0), show notes for swapping the custom query buttons and signing changes
if (recordedVersionNumber < 3922) {
[importantUpdateNotes addObject:NSLocalizedString(@"The Custom Query \"Run\" and \"Run All\" button positions and their shortcuts have been swapped.", @"Short important release note for swap of custom query buttons")];
[importantUpdateNotes addObject:NSLocalizedString(@"We've changed Sequel Pro's digital signature for GateKeeper compatibility; you'll have to allow access to your passwords again.", @"Short important release note for why password prompts may occur")];
}
- // For versions prior to 3970 (~1.0), move the old plist to the trash
- if (recordedVersionNumber < 3970) {
+ // For versions prior to 4011 (~1.0), migrate the favourites across if appropriate. This will only
+ // occur once - if the target file already exists, it won't be re-created
+ if (recordedVersionNumber < 4011) {
+ SPMigrateConnectionFavoritesData();
+ }
+
+ // For versions prior to 4011 (~1.0), move the old plist to the trash
+ if (recordedVersionNumber < 4011) {
NSString *oldPrefPath = @"~/Library/Preferences/com.google.code.sequel-pro.plist";
oldPrefPath = [oldPrefPath stringByExpandingTildeInPath];
if ([[NSFileManager defaultManager] fileExistsAtPath:oldPrefPath]) {
@@ -337,6 +338,11 @@ void SPApplyRevisionChanges(void)
}
}
+ // For versions prior to r4049 (~1.0.2), delete the old favourites entry in the plist now it's been migrated
+ if (recordedVersionNumber < 4049) {
+ [prefs removeObjectForKey:SPOldFavoritesKey];
+ }
+
// Display any important release notes, if any. Call this after a slight delay to prevent double help
// menus - see http://www.cocoabuilder.com/archive/cocoa/6200-two-help-menus-why.html .
[SPPreferencesUpgrade performSelector:@selector(showPostMigrationReleaseNotes:) withObject:importantUpdateNotes afterDelay:0.1];