aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPSQLExporterDelegate.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-05-27 00:47:02 +0000
committerrowanbeentje <rowan@beent.je>2010-05-27 00:47:02 +0000
commitdedb2635efe436b51b6917404ad205b4491d3d01 (patch)
tree3b0f0cd0fa352a04f0a1d2c4ab0f83dd2364d2eb /Source/SPSQLExporterDelegate.m
parentf36df95c5c983e255f9c4ab79b76c3e4a132a974 (diff)
downloadsequelpro-dedb2635efe436b51b6917404ad205b4491d3d01.tar.gz
sequelpro-dedb2635efe436b51b6917404ad205b4491d3d01.tar.bz2
sequelpro-dedb2635efe436b51b6917404ad205b4491d3d01.zip
- Fix SQL export progress display
- When compression is enabled, use .sql.gz as file extension instead of .gz
Diffstat (limited to 'Source/SPSQLExporterDelegate.m')
-rw-r--r--Source/SPSQLExporterDelegate.m26
1 files changed, 11 insertions, 15 deletions
diff --git a/Source/SPSQLExporterDelegate.m b/Source/SPSQLExporterDelegate.m
index b9afe724..8be899f6 100644
--- a/Source/SPSQLExporterDelegate.m
+++ b/Source/SPSQLExporterDelegate.m
@@ -47,6 +47,7 @@
*/
- (void)sqlExportProcessComplete:(SPSQLExporter *)exporter
{
+ [exportProgressIndicator stopAnimation:self];
[NSApp endSheet:exportProgressWindow returnCode:0];
[exportProgressWindow orderOut:self];
@@ -69,8 +70,10 @@
*/
- (void)sqlExportProcessProgressUpdated:(SPSQLExporter *)exporter
{
- //NSLog(@"updating: %f", [exporter exportProgressValue]);
-
+ if ([exportProgressIndicator doubleValue] == 0) {
+ [exportProgressIndicator stopAnimation:self];
+ [exportProgressIndicator setIndeterminate:NO];
+ }
[exportProgressIndicator setDoubleValue:[exporter exportProgressValue]];
}
@@ -79,17 +82,12 @@
*/
- (void)sqlExportProcessWillBeginFetchingData:(SPSQLExporter *)exporter
{
- // Update the current table export index
- currentTableExportIndex = (exportTableCount - [exporters count]);
+ [exportProgressText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Fetching data...", @"export label showing that the app is fetching data for a specific table"), [exporter sqlCurrentTableExportIndex], exportTableCount, [exporter sqlExportCurrentTable]]];
- [[exportProgressText onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Fetching data...", @"export label showing that the app is fetching data for a specific table"), currentTableExportIndex, exportTableCount, [exporter sqlExportCurrentTable]]];
-
- [[exportProgressText onMainThread] displayIfNeeded];
-
- [[exportProgressIndicator onMainThread] stopAnimation:self];
- [[exportProgressIndicator onMainThread] setUsesThreadedAnimation:NO];
- [[exportProgressIndicator onMainThread] setIndeterminate:NO];
- [[exportProgressIndicator onMainThread] setDoubleValue:0];
+ [exportProgressIndicator startAnimation:self];
+ [exportProgressIndicator setUsesThreadedAnimation:YES];
+ [exportProgressIndicator setIndeterminate:YES];
+ [exportProgressIndicator setDoubleValue:0];
}
/**
@@ -97,9 +95,7 @@
*/
- (void)sqlExportProcessWillBeginWritingData:(SPSQLExporter *)exporter
{
- [[exportProgressText onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Writing data...", @"export label showing app if writing data for a specific table"), currentTableExportIndex, exportTableCount, [exporter sqlExportCurrentTable]]];
-
- [[exportProgressText onMainThread] displayIfNeeded];
+ [exportProgressText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Writing data...", @"export label showing app if writing data for a specific table"), [exporter sqlCurrentTableExportIndex], exportTableCount, [exporter sqlExportCurrentTable]]];
}
@end