aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-04-15 21:26:42 +0000
committerrowanbeentje <rowan@beent.je>2009-04-15 21:26:42 +0000
commit6c80b88f3c29b76fec560589e67920a99681723a (patch)
tree0bf65369bf2cddf4aa9ed60a31907c345b5f052a
parent6af5090cd13e3483cf26d0e1d830a80650e59f87 (diff)
downloadsequelpro-6c80b88f3c29b76fec560589e67920a99681723a.tar.gz
sequelpro-6c80b88f3c29b76fec560589e67920a99681723a.tar.bz2
sequelpro-6c80b88f3c29b76fec560589e67920a99681723a.zip
- Tweak favorites/keychain upgrade routine to only fire once, even if going back and testing older releases/revisions
-rw-r--r--Source/SPPreferenceController.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m
index d5c34db2..dc4b98c7 100644
--- a/Source/SPPreferenceController.m
+++ b/Source/SPPreferenceController.m
@@ -195,7 +195,8 @@
// Cycle through the favorites, generating a timestamp-derived ID for each and renaming associated keychain items.
for (i = 0; i < [favoritesArray count]; i++) {
- favorite = [favoritesArray objectAtIndex:i];
+ favorite = [favoritesArray objectAtIndex:i];
+ if ([favorite objectForKey:@"id"]) continue;
[favorite setObject:[NSNumber numberWithInt:[[NSString stringWithFormat:@"%f", [[NSDate date] timeIntervalSince1970]] hash]] forKey:@"id"];
keychainName = [NSString stringWithFormat:@"Sequel Pro : %@", [favorite objectForKey:@"name"]];
keychainAccount = [NSString stringWithFormat:@"%@@%@/%@",
@@ -524,7 +525,7 @@
// tableViewSelectionDidChange:
// -------------------------------------------------------------------------------
- (void)tableViewSelectionDidChange:(NSNotification *)notification
-{
+{
if ([[favoritesTableView selectedRowIndexes] count] > 0) {
[favoritesController setSelectionIndexes:[favoritesTableView selectedRowIndexes]];
}