Re: Updating GUI during long operation



On Thu, 2013-04-25 at 20:54 -0600, Michael Torrie wrote:
As both Chris and Colomban have state, triggering an event flush isn't
going to help.  If the events are already getting filed up, trying to
flush them isn't going to work.  You have to figure out why the events
are piling up.  Because they're going to keep piling up no matter how
often you try to pump the event loop.

Hey Michael. The GIF animation has a high a frame delay of 50 ms which I
believe is slowing the window repaint down when the system is already
bogged down with a CPU and I/O intensive secondary worker thread.
Flushing the message queue actually does seem to work, as the PyGtk FAQ
recommended I do.

Something I do for animations is have a timeout callback that updates
the GtkDrawingArea with the latest buffer, rather than updating the
drawing area whenever something is drawn.

I'm actually not explicitly updating the animation myself. I provide a
path to the animated GIF into a Gdk.PixbufAnimation, in turn fed into a
GtkImage widget.

Sounds like you're trying to re-invent the wheel here as well.  From
what you say (when you're not berating people for being unhelpful),
you've implemented your own throbber widget.  Perhaps you should either
use a Gtk throbber, or study the throbber widget code and implement
something along the same lines with your own graphic.

Thanks Michael, but as with Chris' post, yours was not particularly
constructive either.

Take care,

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]