Add more informative progress messages
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 6 Dec 2008 23:47:36 +0000 (18:47 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 6 Dec 2008 23:47:36 +0000 (18:47 -0500)
iPhoto2Ansel/AnselExportController.m

index 96dcfec..fe482c1 100644 (file)
         // 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];
                 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]];
         
                                 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];