Hi all,

I added a "Firefox throbber" to my application as described in the FAQ (e.g. 
http://eccentric.cx/misc/pygtk/pygtkfaq.html#23.37 as www.pygtk.org seems to be 
down right now)

It didn't work for me, and I discovered that this was because of idle handlers, 
which cause gtk.events_pending() to always return True and hence the loop 
suggested there
to loop forever. The loop looks like this:

while gtk.events_pending():
    gtk.main_iteration()

So I can fix this by removing all the idle handlers individually with 
gobject.source_remove, running this loop and then putting them back again 
afterwards with gobject.idle_add.

It then works, but it feels like a hack, and is problematic because I've now 
got a situation where there exists an idle handler in a separate library that 
doesn't know about my throbber.

Is there some better way to do this? It would be great if there was a way to 
temporarily disable all idle handlers without having to know exactly which ones 
they are and
how to put them back afterwards.

Regards,
Geoff


_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to