Re: no instant update of gtk_progress_bar


try using:

while (gtk_events_pending())

after each progress bar update, this will exhaust the main loop events,
one being for your progress bar update.

beware: if you're doing work that will result in any other kind of event,
it will also get processed.



> Hi,
> I'm using GTK+2.6.8 on an embedded platform. My application is working
> fine, but I do have one problem with updating
> progress_bars. They only get updated when I move the cursor over the vbox.
> Let me explain the sequence:
> 1) I've created a VBOX widget (gtk_vbox_new)
> 2) Then I created 3 progress bars (gtk_progress_bar_new) and added them
> into the VBOX container (gtk_container_add) and used the gtk_widget_show
>         to make them visible.
> .... up till now, all fine and visible on the screen
> 3) I've a thread that fires every 1 second
> 4) The thread updates the progress bar widgets with fraction and text
> (gtk_progress_bar_set_fraction & gtk_progress_bar_set_text)
> 5) To make the update visible on the screen, I use gtk_widget_queue_draw
> (pProgressBar[x]).
> I do not see the update immediately on the screen, unless I move my
> pointer in/out VBox area or some other Widget area's.
> I've already tried to gtk_widget_queue_draw (pVBox) and tried to add some
> other calls like gtk_widget_show_all, etc. but nothing helps.
> Any idea what can be wrong ? Should I use another call to immediately
> update the screen ?
> thnx,
> Bruno_______________________________________________
> gtk-list mailing list
> gtk-list gnome org

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