aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-06-27 09:11:17 +0000
committerBibiko <bibiko@eva.mpg.de>2010-06-27 09:11:17 +0000
commitc92a1ef7ad770374b2c3912fd591ee39d3ef130e (patch)
tree843452032a3c9ff7aed3562d652607109ba00c09 /Source
parent0810ab9add13a0b3d08e720b09ec50018931dc42 (diff)
downloadsequelpro-c92a1ef7ad770374b2c3912fd591ee39d3ef130e.tar.gz
sequelpro-c92a1ef7ad770374b2c3912fd591ee39d3ef130e.tar.bz2
sequelpro-c92a1ef7ad770374b2c3912fd591ee39d3ef130e.zip
• added 'spfs' as allowed extension for open panel
• avoid adding of in bundle saved spf files to recent files
Diffstat (limited to 'Source')
-rw-r--r--Source/SPAppController.m4
-rw-r--r--Source/SPDatabaseDocument.m6
2 files changed, 6 insertions, 4 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m
index c0bc2818..aa2cf3b1 100644
--- a/Source/SPAppController.m
+++ b/Source/SPAppController.m
@@ -161,14 +161,14 @@
if ([self frontDocumentWindow]) {
[panel beginSheetForDirectory:nil
file:@""
- types:[NSArray arrayWithObjects:SPFileExtensionDefault, SPFileExtensionSQL, nil]
+ types:[NSArray arrayWithObjects:SPFileExtensionDefault, SPFileExtensionSQL, SPBundleFileExtension, nil]
modalForWindow:[self frontDocumentWindow]
modalDelegate:self
didEndSelector:@selector(openConnectionPanelDidEnd:returnCode:contextInfo:)
contextInfo:NULL];
}
else {
- NSInteger returnCode = [panel runModalForDirectory:nil file:nil types:[NSArray arrayWithObjects:SPFileExtensionDefault, SPFileExtensionSQL, nil]];
+ NSInteger returnCode = [panel runModalForDirectory:nil file:nil types:[NSArray arrayWithObjects:SPFileExtensionDefault, SPFileExtensionSQL, SPBundleFileExtension, nil]];
if (returnCode) [self application:nil openFiles:[panel filenames]];
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 820057ff..781df933 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -506,8 +506,10 @@
[spfDocData setObject:[NSNumber numberWithBool:YES] forKey:@"include_session"];
}
- [self setFileURL:[NSURL fileURLWithPath:path]];
- [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL fileURLWithPath:path]];
+ if(![self isSaveInBundle]) {
+ [self setFileURL:[NSURL fileURLWithPath:path]];
+ [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL fileURLWithPath:path]];
+ }
if([spf objectForKey:SPQueryFavorites])
[spfPreferences setObject:[spf objectForKey:SPQueryFavorites] forKey:SPQueryFavorites];