diff options
author | Max <post@wickenrode.com> | 2015-01-02 16:08:19 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-01-02 16:08:19 +0100 |
commit | ee588049b5a7f755d788b983dc8cabce24453641 (patch) | |
tree | cf161f2f5ed202c92988456e77c9735c48e15188 /Source/SPDataImport.m | |
parent | 918324e27b6b4753307fa6a8166b3d7227f97b35 (diff) | |
download | sequelpro-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/SPDataImport.m')
-rw-r--r-- | Source/SPDataImport.m | 7 |
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 |