aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-01-02 16:08:19 +0100
committerMax <post@wickenrode.com>2015-01-02 16:08:19 +0100
commitee588049b5a7f755d788b983dc8cabce24453641 (patch)
treecf161f2f5ed202c92988456e77c9735c48e15188 /Source
parent918324e27b6b4753307fa6a8166b3d7227f97b35 (diff)
downloadsequelpro-ee588049b5a7f755d788b983dc8cabce24453641.tar.gz
sequelpro-ee588049b5a7f755d788b983dc8cabce24453641.tar.bz2
sequelpro-ee588049b5a7f755d788b983dc8cabce24453641.zip
* Fix broken import on 10.6…
(Import would not work on a new installation where a certain preference key has not yet been set) * Also attached the gear menu in table structure view to the table header view, so the columns to show can now be selected by right-clicking on the table header (like in Activity Monitor)
Diffstat (limited to 'Source')
-rw-r--r--Source/SPDataImport.m7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/SPDataImport.m b/Source/SPDataImport.m
index 5859b75d..f1208a54 100644
--- a/Source/SPDataImport.m
+++ b/Source/SPDataImport.m
@@ -288,7 +288,12 @@
[openPanel setNameFieldStringValue:[lastFilename lastPathComponent]];
}
- [openPanel setDirectoryURL:[NSURL URLWithString:[prefs objectForKey:@"openPath"]]];
+ NSString *openPath;
+ if((openPath = [prefs objectForKey:@"openPath"])) {
+ // Doc says calling +[NSURL URLWithString:] with nil is fine,
+ // but at least on 10.6 this will cause an exception
+ [openPanel setDirectoryURL:[NSURL URLWithString:openPath]];
+ }
[openPanel beginSheetModalForWindow:[tableDocumentInstance parentWindow] completionHandler:^(NSInteger returnCode) {
// Ensure text inputs are completed, preventing dead character entry