--- Collins <[EMAIL PROTECTED]> wrote:
> On Sat, 6 Jul 2002 22:02:27 -0700 (PDT) icewind
> <[EMAIL PROTECTED]>
> wrote:
> > I have a couple of threads updating the gui
> (adding
> > lines to a CList, changing text in a textentry
> area,
> > etc.) The problem is, the widget that was changed
> > doesnt show its updates until some event occurs
> such
> > as me moving or clicking the mouse into the
> > applications window. I would like the gui updated
> > continuously as the threads actually manipulate
> the
> > widgets.
> > 
> > So, I assume this could be done by calling an
> > "invalidate" function that will tell gtk that some
> > widget needs to be redrawn. If this is how to do
> what
> > I want, what is the name of the function/method I
> have
> > to call, and is it something I have to apply to
> just
> > the widget that was changed or to the window the
> > widget is in or something else?
> ________________
>
> 
> I got this little nugget from someone on the list a
> month or two back.
> 
>  while events_pending():    # suggested by pygtk
> users
>         mainiteration(FALSE)
> 



Thanks. I tried that and it doesnt work. It may have
to  do with the fact that I am trying to insert that
code in a seperate thread. I have a thread that sits
waiting for network connections and when one is
detected, it updates the gui. I have the thread wait
in a while loop for something to read from the socket.
In that while loop I put the code you suggested. When
I run the application, I get the following message
output (many times):

GLib-WARNING **: g_main_iterate(): main loop already
active in another thread

What is the best way to update the gui from another
thread?



__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to