On Fri, Jul 01, 2005 at 10:29:13 +0200, The Saltydog wrote:
On 7/1/05, Jan Hudec <bulb ucw cz> wrote:Wow, that's complex! Simply running Gtk2->main_iteration while Gtk2->events_pending; between reading the lines is easier and does the job just as well.Yes, but I needed the user to be free to start using all program features, even while the treeview is growing. So he can open trees, doubleclick, use menu items and even stop the scan. I don't kow if I could do this simply running Gtk2->main_iteration..
Sure you can! You see, the Gtk2->main function does almost exactly Gtk2->main_iteration_do(1) while !quit_requested The quit_requested is not called like it and it is a member of the mainlooo and main_iteration_do is inlined there, but otherwise it's the same. The main_iteration_do(1) waits for events if none are pending, while with 0, or without the do it exits immendiately. So running code that invokes main_iteration periodically is just like running in main directly. ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bulb ucw cz>
Attachment:
signature.asc
Description: Digital signature