From: Michael B. <be...@ju...> - 2014-08-16 22:14:01
|
Hi, I am working on the web display issue again. Now I would like to refresh the images. I.e.: - get a set of 50 images - display the first set, meanwhile get another set of 50 images - as soon as the second set is downloaded, and the first set has been shown at least once, switch from displaying first set to displaying second set - repeat infinitely Thanks to your help, I have got the code to display the first set of pictures in a loop like this: def auto_show(pixbufs) # auto mode GLib::Timeout.add(600) do @pixbufs.push(pixbufs.shift) update_image(pixbufs.first) true # continue end end I guess I could add a second Timeout that switches the picture sets every 5 minutes or so. But is there a way to change the picture sets after successfully loading the next one? I successfully moved the download process into a separate thread, but I can't get the download to run again and again while displaying images and updating the buffer. Cheers Michael Am Montag, den 26.05.2014, 08:46 +0200 schrieb Michael Below: > Hi, > > Am Montag, den 26.05.2014, 12:30 +0900 schrieb Masafumi Yokoyama: > > > A GTK window is just shown when `Gtk.main` is called. > > `show_all` sets flag to be displayed to all widgets, but doesn't > > actually display until `Gtk.main` is called. > > Ah, I understand... I even tried to move Gtk.main into my #each loop, > but this way it makes sense. > > > It seems that need to design such as the following: > > Thanks, works fine. > > Cheers > > Michael |