Re: progressbar updates



"Brian J. Tarricone" <bjt23 cornell edu> writes:

the progress bar is only updated when the gtk main loop is run, which
only happens when any functions you are running give control back to the
main loop.

Ok, but isn't then the clean reason to start a subthread?

I get problems in the main thread when I access the progressbar
(set_fraction) and statusbar (push/pop) from the subthread (=> display
problems...). How can I synchronize this?

you can force the main loop to process events (and thus update the
progress bar, by doing something like this after each time you call
set_fraction():

while(gtk_event_pending())
    gtk_main_iteration();

i'm not sure what the gtkmm equivalent of that is, but it's probably
similar.

thanks, I'll try that too.

-- 
Felix Natter I love secs... for programming




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