Michael Gebhart
4/11/2005 2:14:00 AM
Hi,
I am programming an application with ruby-gnome. My application is
downloading some data and I wanna display a download-dialog, while the
downloading is running. So I created a GUI, the download-dialog. This
dialog should be displayed, when the download begins. A progressbar shows
the current download-state. Now my problem is, that the GUI is not really
refreshed. At my first try the download-dialog became displayed, when the
download was finished *g* Now I added a:
begin
Gtk.main_iteration
end while(Gtk.events_pending?)
every time a part of the gui changes. This let the download-dialog
display, when the download starts. But it does not really work as I wish.
The progressbar becomes not refreshed in the way I hope. Maybe I did
something wrong:
If I wanna download 50 elements I wanna go the progressbar one step
further, when one element is downloaded.
So: count = 50
Then I do:
progressbar_download.pulse_step = (1 / count)
And every time an element is downloaded I do a:
progressbar_download.pulse
Is this correct? Or did I understand something wrong?
The progressbar becomes displayed and the first steps work, then it does
not change, or maybe it only does not refresh. Maybe you have some hints
for me.
Greetings
Mike