[Libguestfs] [PATCH 15/61] P2V: main - fake Gtk.timeout_add

Maros Zatko mzatko at redhat.com
Wed Feb 12 14:30:27 UTC 2014


---
 p2v/client/lib/virt-p2v/ui/main.rb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/p2v/client/lib/virt-p2v/ui/main.rb b/p2v/client/lib/virt-p2v/ui/main.rb
index 814533c..0544a8e 100644
--- a/p2v/client/lib/virt-p2v/ui/main.rb
+++ b/p2v/client/lib/virt-p2v/ui/main.rb
@@ -52,6 +52,12 @@ module Gtk
   SELECTION_SINGLE = 1
   TreeRowReference = VirtP2V::UI::NeverMind
 
+  def Gtk.timeout_add(timeout, &block)
+    while true
+      sleep(timeout/1000.0)
+      block.call
+    end
+  end
 end
 
 module Gdk
-- 
1.8.3.1




More information about the Libguestfs mailing list