diff options
author | rowanbeentje <rowan@beent.je> | 2011-03-31 23:07:48 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2011-03-31 23:07:48 +0000 |
commit | 9cb3057259b02c8d691112a36168117d7acac6bb (patch) | |
tree | bb6871cd2057ea12501c777957a6c37874c700dc /Source | |
parent | f93628daffb454b81cdc5de7e9780f3e6b4c79a7 (diff) | |
download | sequelpro-9cb3057259b02c8d691112a36168117d7acac6bb.tar.gz sequelpro-9cb3057259b02c8d691112a36168117d7acac6bb.tar.bz2 sequelpro-9cb3057259b02c8d691112a36168117d7acac6bb.zip |
- Fix .spfs files not being added to the Recent Documents menu, addressing Issue #1011
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPAppController.m | 2 | ||||
-rw-r--r-- | Source/SPDatabaseDocument.m | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 7ab59084..2a784f86 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -350,6 +350,7 @@ YY_BUFFER_STATE yy_scan_string (const char *); } [[self frontDocument] setStateFromConnectionFile:filename]; + [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL fileURLWithPath:filename]]; } else if([[[filename pathExtension] lowercaseString] isEqualToString:[SPBundleFileExtension lowercaseString]]) { @@ -471,6 +472,7 @@ YY_BUFFER_STATE yy_scan_string (const char *); } [spfs release]; + [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL fileURLWithPath:filename]]; } else if([[[filename pathExtension] lowercaseString] isEqualToString:[SPColorThemeFileExtension lowercaseString]]) { diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index dfc6223e..376d7d3f 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -2173,8 +2173,7 @@ SPBeginAlertSheet(NSLocalizedString(@"Flushed Privileges", @"title of panel when successfully flushed privs"), NSLocalizedString(@"OK", @"OK button"), nil, nil, parentWindow, self, nil, nil, NSLocalizedString(@"Successfully flushed privileges.", @"message of panel when successfully flushed privs")); } else { //error while flushing privileges - SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, parentWindow, self, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"Couldn't flush privileges.\nMySQL said: %@", @"message of panel when flushing privs failed"), - [mySQLConnection getLastErrorMessage]]); + SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, parentWindow, self, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"Couldn't flush privileges.\nMySQL said: %@", @"message of panel when flushing privs failed"), [mySQLConnection getLastErrorMessage]]); } } @@ -4439,7 +4438,6 @@ if (![self isSaveInBundle]) { [self setFileURL:[NSURL fileURLWithPath:path]]; - [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL fileURLWithPath:path]]; } [spfDocData setObject:[NSNumber numberWithBool:([[data objectForKey:@"connection"] objectForKey:@"password"]) ? YES : NO] forKey:@"save_password"]; |