diff options
author | rowanbeentje <rowan@beent.je> | 2010-05-27 00:47:02 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-05-27 00:47:02 +0000 |
commit | dedb2635efe436b51b6917404ad205b4491d3d01 (patch) | |
tree | 3b0f0cd0fa352a04f0a1d2c4ab0f83dd2364d2eb /Source/SPExportInitializer.m | |
parent | f36df95c5c983e255f9c4ab79b76c3e4a132a974 (diff) | |
download | sequelpro-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/SPExportInitializer.m')
-rw-r--r-- | Source/SPExportInitializer.m | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m index 20b38c5e..46eaf2b6 100644 --- a/Source/SPExportInitializer.m +++ b/Source/SPExportInitializer.m @@ -149,13 +149,10 @@ // Start the notification timer to allow notifications to be shown even if frontmost for long queries [[SPGrowlController sharedGrowlController] setVisibilityForNotificationName:@"Export Finished"]; - // Reset the interface - [[exportProgressTitle onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Exporting %@", @"text showing that the application is importing a supplied format"), exportTypeLabel]]; - [[exportProgressText onMainThread] setStringValue:NSLocalizedString(@"Writing...", @"text showing that app is writing text file")]; - - [[exportProgressText onMainThread] displayIfNeeded]; - [[exportProgressIndicator onMainThread] setDoubleValue:0]; - [[exportProgressIndicator onMainThread] displayIfNeeded]; + // Reset the progress interface + [exportProgressTitle setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Exporting %@", @"text showing that the application is importing a supplied format"), exportTypeLabel]]; + [exportProgressText setStringValue:NSLocalizedString(@"Writing...", @"text showing that app is writing text file")]; + [exportProgressIndicator setDoubleValue:0]; // Open the progress sheet [NSApp beginSheet:exportProgressWindow @@ -303,7 +300,7 @@ // Set the exporter's max progress [sqlExporter setExportMaxProgress:((NSInteger)[exportProgressIndicator bounds].size.width)]; - + // Set the progress bar's max value [exportProgressIndicator setMaxValue:[sqlExporter exportMaxProgress]]; @@ -315,7 +312,7 @@ // Create custom filename if required filename = (createCustomFilename) ? [self expandCustomFilenameFormatFromString:[exportCustomFilenameTokenField stringValue] usingTableName:nil] : [NSString stringWithFormat:@"%@_%@", [tableDocumentInstance database], [[NSDate date] descriptionWithCalendarFormat:@"%Y-%m-%d" timeZone:nil locale:nil]]; - SPFileHandle *fileHandle = [self getFileHandleForFilePath:[[exportPathField stringValue] stringByAppendingPathComponent:[filename stringByAppendingPathExtension:([exportCompressOutputFile state]) ? @"gz" : @"sql"]]]; + SPFileHandle *fileHandle = [self getFileHandleForFilePath:[[exportPathField stringValue] stringByAppendingPathComponent:[filename stringByAppendingPathExtension:([exportCompressOutputFile state]) ? @"sql.gz" : @"sql"]]]; [sqlExporter setExportOutputFileHandle:fileHandle]; |