diff options
author | rowanbeentje <rowan@beent.je> | 2009-07-28 23:58:12 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-07-28 23:58:12 +0000 |
commit | 455c5326835d811b55d12b3ac8c0373608825b8d (patch) | |
tree | 80fea57e05c997e7dde93d913979324a33bb594f /Source/TableDump.m | |
parent | 87b88b489031f4860a231c24dc1e2bdfe776c2c8 (diff) | |
download | sequelpro-455c5326835d811b55d12b3ac8c0373608825b8d.tar.gz sequelpro-455c5326835d811b55d12b3ac8c0373608825b8d.tar.bz2 sequelpro-455c5326835d811b55d12b3ac8c0373608825b8d.zip |
- Fix "endSheet:returnCode: requires a non-nil sheet" log lines during imports
- Enable threaded animation for import/export progress bars as it has minimal overhead and looks nicer
- Fix exceptions caused by tablesList drawing during imports
Diffstat (limited to 'Source/TableDump.m')
-rw-r--r-- | Source/TableDump.m | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/Source/TableDump.m b/Source/TableDump.m index 34ffe262..b4ee6660 100644 --- a/Source/TableDump.m +++ b/Source/TableDump.m @@ -86,12 +86,11 @@ [exportMultipleXMLTableView reloadData]; } -- (IBAction)closeSheet:(id)sender /* - ends the modal session + * Common method for ending modal sessions */ +- (IBAction)closeSheet:(id)sender { - [NSApp endSheet:exportWindow]; [NSApp stopModalWithCode:[sender tag]]; } @@ -473,7 +472,6 @@ unsigned long queryCount = [queries count]; [singleProgressBar stopAnimation:self]; - [singleProgressBar setUsesThreadedAnimation:NO]; [singleProgressBar setIndeterminate:NO]; [singleProgressTitle setStringValue:NSLocalizedString(@"Importing SQL", @"text showing that the application is importing SQL")]; [singleProgressText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Executing %d statements...", @"text showing that app is executing x statements"), queryCount]]; @@ -524,7 +522,6 @@ contextInfo:nil]; [NSApp runModalForWindow:errorsSheet]; - [NSApp endSheet:errorsSheet]; [errorsSheet orderOut:nil]; } @@ -633,7 +630,6 @@ contextInfo:nil]; code = [NSApp runModalForWindow:fieldMappingSheet]; - [NSApp endSheet:fieldMappingSheet]; [fieldMappingSheet orderOut:nil]; @@ -652,6 +648,7 @@ didEndSelector:nil contextInfo:nil]; + [singleProgressBar setUsesThreadedAnimation:NO]; [singleProgressSheet makeKeyWindow]; [singleProgressText setStringValue:NSLocalizedString(@"Creating rows...", @"text showing that app is importing rows from CSV")]; [singleProgressText displayIfNeeded]; @@ -724,8 +721,7 @@ didEndSelector:nil contextInfo:nil]; - [NSApp runModalForWindow:errorsSheet]; - + [NSApp runModalForWindow:errorsSheet]; [NSApp endSheet:errorsSheet]; [errorsSheet orderOut:nil]; } @@ -983,7 +979,6 @@ [singleProgressText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %i of %i (%@): Dumping...", @"text showing that app is writing data for table dump"), (i+1), [selectedTables count], tableName]]; [singleProgressText displayIfNeeded]; [singleProgressBar stopAnimation:self]; - [singleProgressBar setUsesThreadedAnimation:NO]; [singleProgressBar setIndeterminate:NO]; [singleProgressBar setDoubleValue:0]; [singleProgressBar displayIfNeeded]; @@ -1138,7 +1133,6 @@ modalForWindow:tableWindow modalDelegate:self didEndSelector:nil contextInfo:nil]; [NSApp runModalForWindow:errorsSheet]; - [NSApp endSheet:errorsSheet]; [errorsSheet orderOut:nil]; } @@ -1347,6 +1341,7 @@ progressBarWidth = (int)[singleProgressBar bounds].size.width; lastProgressValue = 0; [singleProgressBar setDoubleValue:0]; + [singleProgressBar setUsesThreadedAnimation:YES]; [singleProgressBar displayIfNeeded]; if ( !silently ) { @@ -1983,8 +1978,7 @@ [NSApp beginSheet:errorsSheet modalForWindow:tableWindow modalDelegate:self didEndSelector:nil contextInfo:nil]; - [NSApp runModalForWindow:errorsSheet]; - + [NSApp runModalForWindow:errorsSheet]; [NSApp endSheet:errorsSheet]; [errorsSheet orderOut:nil]; } |