From: Michael J. Rubinsky Date: Sat, 6 Dec 2008 23:47:36 +0000 (-0500) Subject: Add more informative progress messages X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=163fd09a9556bf93aa623f445249e236984c7cfe;p=horde.git Add more informative progress messages --- diff --git a/iPhoto2Ansel/AnselExportController.m b/iPhoto2Ansel/AnselExportController.m index 96dcfec46..fe482c181 100644 --- a/iPhoto2Ansel/AnselExportController.m +++ b/iPhoto2Ansel/AnselExportController.m @@ -286,7 +286,7 @@ // use 99% max so the last photo upload doesn't make the progress bar look finished // (Thanks to Facebook exporter for this tip and code) double progressPercent = (double) 99. * (i+1) / count; - [self postProgressStatus: [NSString stringWithFormat: @"Uploading photo %d out of %d", (i+1), count]]; + [progressController performSelectorOnMainThread: @selector(setPercent:) withObject: [NSNumber numberWithDouble: progressPercent] waitUntilDone: NO]; @@ -314,10 +314,12 @@ break; } + + [self postProgressStatus: [NSString stringWithFormat: @"Resizing image %d out of %d", (i+1), count]]; NSData *scaledData = [ImageResizer getScaledImageFromData: theImage toSize: NSMakeSize(imageSize, imageSize)]; - + [self postProgressStatus: [NSString stringWithFormat: @"Encoding image %d out of %d", (i+1), count]]; NSString *base64ImageData = [NSString base64StringFromData: scaledData length: [scaledData length]]; @@ -347,6 +349,7 @@ nil]; //Start upload with current gallery. + [self postProgressStatus: [NSString stringWithFormat: @"Uploading photo %d out of %d", (i+1), count]]; [currentGallery uploadImageObject: params]; [keys release]; [values release];