[ease] [editor] Display image count when downloading



commit 44550720b2d6e8bf9e01c0e7808fd544aa5ff460
Author: Nate Stedman <natesm gmail com>
Date:   Mon Aug 23 06:14:06 2010 -0400

    [editor] Display image count when downloading

 ease/ease-import-dialog.vala |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/ease/ease-import-dialog.vala b/ease/ease-import-dialog.vala
index b7d5400..e1420ae 100644
--- a/ease/ease-import-dialog.vala
+++ b/ease/ease-import-dialog.vala
@@ -17,8 +17,12 @@
 
 internal class Ease.ImportDialog : Gtk.Window
 {
+	private const string PROGRESS_FORMAT = _("Downloading image %i of %i");
+
 	public signal void add_image(string filename);
 	
+	int total_images;
+	
 	internal ImportDialog()
 	{
 		title = _("Import Media");
@@ -57,6 +61,7 @@ internal class Ease.ImportDialog : Gtk.Window
 			var progress = new Dialog.Progress(_("Downloading Media Files"),
 			                                   false, media_list.size, this); 
 			progress.show();
+			total_images = media_list.size;
 			add_media_recursive(progress, media_list, Temp.request(), 0);
 		});
 		
@@ -77,6 +82,9 @@ internal class Ease.ImportDialog : Gtk.Window
 			return;
 		}
 		
+		// set progress text
+		progress.set_label(PROGRESS_FORMAT.printf(i + 1, total_images));
+		
 		var file = File.new_for_uri(media_list.poll().file_link);
 		var copy = File.new_for_path(Path.build_filename(temp,
 		                                                 "media" +



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]