Enable throbber animation.
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 28 Jul 2011 21:54:00 +0000 (22:54 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 28 Jul 2011 21:54:00 +0000 (22:54 +0100)
window.ml

index 6ede415..aa33b79 100644 (file)
--- a/window.ml
+++ b/window.ml
@@ -73,13 +73,13 @@ and make_toolbar ~packing () =
 
   (* Throbber. *)
   let static = Throbber.static () in
-  (*let animation = Throbber.animation () in*)
+  let animation = Throbber.animation () in
   let throbber =
     (* Workaround for http://caml.inria.fr/mantis/view.php?id=4732 *)
     let from = Obj.magic 3448763 (* `END *) in
     GMisc.image ~pixbuf:static ~packing:(hbox#pack ~from) () in
 
-  vmcombo, refresh_button, throbber, static
+  vmcombo, refresh_button, throbber, static, animation
 
 and make_filetree ~packing () =
   (* Create the filetree inside a scrolled window. *)
@@ -126,7 +126,7 @@ class window =
     make_menubar window vbox ~packing:vbox#pack () in
 
   (* Top toolbar. *)
-  let vmcombo, refresh_button, throbber, throbber_static =
+  let vmcombo, refresh_button, throbber, throbber_static, throbber_animation =
     make_toolbar ~packing:vbox#pack () in
 
   (* Main part of display is the file tree. *)
@@ -250,10 +250,7 @@ object (self)
 
   (* Public callbacks. *)
   method throbber_busy () =
-    (*throbber#set_pixbuf animation*)
-    (* XXX Workaround because no binding for GdkPixbufAnimation: *)
-    let file = Filename.dirname Sys.argv.(0) // "Throbber.gif" in
-    throbber#set_file file
+    throbber#set_pixbuf throbber_animation
 
   method throbber_idle () =
     throbber#set_pixbuf throbber_static