From 6377d15443a7de6b3fef941d6edb3649a103baaf Mon Sep 17 00:00:00 2001 From: Bibiko Date: Tue, 22 Jun 2010 10:47:20 +0000 Subject: =?UTF-8?q?=E2=80=A2=20if=20user=20opens=20a=20spf=20file=20which?= =?UTF-8?q?=20does=20not=20contain=20connection=20data=20display=20the=20s?= =?UTF-8?q?pf=20file=20format=20(like=20'query=20favorites'=20etc.)=20in?= =?UTF-8?q?=20a=20message=20window=20at=20least.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPDatabaseDocument.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Source/SPDatabaseDocument.m') 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; } -- cgit v1.2.3