Re: GtkProgressBar && RE: updating a progress bar in a loop
- From: Owen Taylor <owt1 cornell edu>
- To: gtk-list redhat com
- Subject: Re: GtkProgressBar && RE: updating a progress bar in a loop
- Date: 05 Mar 1998 12:25:20 -0500
Chris Black <cblack@www.fred.ifas.ufl.edu> writes:
> > On 05-Mar-98 Chris Black wrote:
> > > I run gtk_init, create the progress bar, add a timeout that starts
> > > my
> > > loop, within the loop I call gtk_progress_bar_update but the
> > > display doesn't
> > > seem to change.
> >
> > Drawing updates usually only happen when you are in gtk_main. You can
> > force them, however using something like:
> >
> > while (gtk_events_pending())
> > gtk_main_iteration();
> >
> > inside you're respective functions that change the progress bar.
> Hmm, but since I call the loop from inside the timeout, shouldn't that
> be in gtk_main? I thought the timeouts only start happening after gtk_main is
Just being inside a call to gtk_main isn't enough - the main loop
actually has to be running. What the above snippet does is run
all pending events and high priority idle functions, then return
immediately. (The drawing is done in a high priority idle)
[ Maybe gtk_progress_bar_update should redraw itself instantly instead
of queuing a draw? ]
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]