I am executing a long running procedure in the main line code and
therefore the UI doesn't get updated since I never get to the event
loop.  I created a thread that checks to see if the busy dialog I
display is still around:
=====
while 1:
        if dialog.progressTimerId is None:
                break
        gtk.threads_enter()
        if gtk.events_pending():
                gtk.mainiteration(gtk.FALSE)
        gtk.threads_leave()
=====

When the long running procedure is done it tells the dialog it is done
which does:
=====
gtk.timeout_remove(self.progressTimerId)
self.progressTimerId = None
=====

However, sometimes I get the message:
==
GLib-WARNING **: g_main_iterate(): main loop already active in another
thread
==
and the UI never gets updated again.  This leads me to believe that the
mainloop in the main process (not the thread created for the long
running procedure) is reporting the message and quiting.

I started out by doing the long running procedure in a thread and
keeping the GUI code as is.  However, I quickly ran into situations
where it is difficult to have a general function to handle the thread.

Any help appreciated,
Steve
-- 
Steve McClure                   430 10th St NW
Racemi                          Suite N-210
http://www.racemi.com           Atlanta, GA 30318
[EMAIL PROTECTED]             voice/fax: 404-892-5850

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to