From 46344761d22504556f7fdf6321f706e33f85804f Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Sun, 5 Sep 2010 20:02:00 +0000 Subject: Minor enhancements to the CSV import dialogs new table info sheet (i.e. table encoding and type): - Make the sheet non-resizable, thus removing the visible resize triangle. - Add a cancel button so the user can discard their selection. - Only save the user's selection when they select 'OK'. --- Source/SPFieldMapperController.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/SPFieldMapperController.m b/Source/SPFieldMapperController.m index c77435cc..2b262be6 100644 --- a/Source/SPFieldMapperController.m +++ b/Source/SPFieldMapperController.m @@ -367,8 +367,12 @@ - (IBAction)closeInfoSheet:(id)sender { - [prefs setObject:[newTableInfoEnginePopup titleOfSelectedItem] forKey:SPLastImportIntoNewTableType]; - [prefs setObject:[newTableInfoEncodingPopup titleOfSelectedItem] forKey:SPLastImportIntoNewTableEncoding]; + // Only save selection if the user selected 'OK' + if ([sender tag]) { + [prefs setObject:[newTableInfoEnginePopup titleOfSelectedItem] forKey:SPLastImportIntoNewTableType]; + [prefs setObject:[newTableInfoEncodingPopup titleOfSelectedItem] forKey:SPLastImportIntoNewTableEncoding]; + } + [NSApp endSheet:[sender window] returnCode:[sender tag]]; [[sender window] orderOut:self]; } -- cgit v1.2.3