From 169ad2425868939c32b35d97d20412de230e34d2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 7 Apr 2011 11:17:52 +0100 Subject: [PATCH] Implement pulse mode progress bar. --- window.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 1.8.3.1