From: Kontra G. <kge...@mc...> - 2006-01-11 16:21:52
|
Joe Van Dyk wrote: > lock_button.signal_connect("clicked") do > # Window gets locked while doing stuff > @window.lock do > start_time = Time.now > # computationally heavy thing there > loop do > Gtk::process_gui_events # Any way I can get rid of this? > rand 100000000 > break if Time.now - start_time >= 3 > end > end > end See http://rubygarden.org/ruby?GtkWidgetProgressBarEx1 Use Gtk::timeout_add And please improve the example. And possible add others :) Gergo |