diff options
author | rowanbeentje <rowan@beent.je> | 2012-06-23 13:37:16 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-06-23 13:37:16 +0000 |
commit | efaf41faf367c778185545f0d47b02dee5424c4e (patch) | |
tree | d25da49d315382845e5318b4657e6f605100c6d7 /Source/SPDatabaseDocument.m | |
parent | 7d06e2efcc6874ac0a605920fdd62ec8cc433602 (diff) | |
download | sequelpro-efaf41faf367c778185545f0d47b02dee5424c4e.tar.gz sequelpro-efaf41faf367c778185545f0d47b02dee5424c4e.tar.bz2 sequelpro-efaf41faf367c778185545f0d47b02dee5424c4e.zip |
- Fix issues opening new windows when Sequel Pro is opened in the background, eg as a result of an application quarantine dialog. This addresses Issue #1375.
- Fix exceptions and multiple errors when opening locked or encrypted session files where opening is cancelled.
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r-- | Source/SPDatabaseDocument.m | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 7c7d2a39..a6d7bfd8 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -4509,8 +4509,9 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase"; /** * Initialise the document with the connection file at the supplied path. + * Returns whether the document was initialised successfully. */ -- (void)setStateFromConnectionFile:(NSString *)path +- (BOOL)setStateFromConnectionFile:(NSString *)path { NSError *readError = nil; NSString *convError = nil; @@ -4538,7 +4539,7 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase"; [alert runModal]; if (spf) [spf release]; [self closeAndDisconnect]; - return; + return NO; } // If the .spf format is unhandled, error. @@ -4553,7 +4554,7 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase"; [spf release]; [self closeAndDisconnect]; [alert runModal]; - return; + return NO; } // Error if the expected data source wasn't present in the file @@ -4568,7 +4569,7 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase"; [alert runModal]; [spf release]; [self closeAndDisconnect]; - return; + return NO; } // Ask for a password if SPF file passwords were encrypted, via a sheet @@ -4616,7 +4617,7 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase"; } else { [self closeAndDisconnect]; [spf release]; - return; + return NO; } } } @@ -4642,7 +4643,7 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase"; [alert runModal]; [self closeAndDisconnect]; [spf release]; - return; + return NO; } } @@ -4664,7 +4665,7 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase"; [alert runModal]; [self closeAndDisconnect]; [spf release]; - return; + return NO; } // Move favourites and history into the data dictionary to pass to setState: @@ -4702,6 +4703,8 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase"; [self setState:data]; [spf release]; + + return YES; } /** |