aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-06-22 10:47:20 +0000
committerBibiko <bibiko@eva.mpg.de>2010-06-22 10:47:20 +0000
commit6377d15443a7de6b3fef941d6edb3649a103baaf (patch)
tree268da3597284e56373f4928550260217dc9ab4bb
parente9f34249920eea69ca0dc116d21c1403c49ec0f4 (diff)
downloadsequelpro-6377d15443a7de6b3fef941d6edb3649a103baaf.tar.gz
sequelpro-6377d15443a7de6b3fef941d6edb3649a103baaf.tar.bz2
sequelpro-6377d15443a7de6b3fef941d6edb3649a103baaf.zip
• if user opens a spf file which does not contain connection data display the spf file format (like 'query favorites' etc.) in a message window at least.
-rw-r--r--Source/SPDatabaseDocument.m9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index b463be93..538fa4e6 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -294,9 +294,16 @@
// For dispatching later
if(![[spf objectForKey:@"format"] isEqualToString:@"connection"]) {
- NSLog(@"SPF file format is not 'connection'.");
+ NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Warning", @"warning")]
+ defaultButton:NSLocalizedString(@"OK", @"OK button")
+ alternateButton:nil
+ otherButton:nil
+ informativeTextWithFormat:[NSString stringWithFormat:NSLocalizedString(@"The chosen file “%@” contains ‘%@’ data.", @"message while reading a spf file which matches non-supported formats."), path, [spf objectForKey:@"format"]]];
+
+ [alert setAlertStyle:NSWarningAlertStyle];
[spf release];
[self closeAndDisconnect];
+ [alert runModal];
return;
}