From: Richard W.M. Jones Date: Thu, 7 Apr 2011 10:17:52 +0000 (+0100) Subject: Implement pulse mode progress bar. X-Git-Tag: 0.1.6~3 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=169ad2425868939c32b35d97d20412de230e34d2;p=guestfs-browser.git Implement pulse mode progress bar. --- diff --git a/window.ml b/window.ml index dd4f5ad..47b9f80 100644 --- a/window.ml +++ b/window.ml @@ -116,8 +116,11 @@ let throbber_idle ws () = ws.throbber#set_pixbuf ws.throbber_static let progress ws (position, total) = - ws.progress_bar#set_fraction - (Int64.to_float position /. Int64.to_float total) + if position = 0L && total = 1L then + ws.progress_bar#pulse () + else + ws.progress_bar#set_fraction + (Int64.to_float position /. Int64.to_float total) (* This is called in the main thread whenever a command fails in the * slave thread. The command queue has been cleared before this is