On Thu, Jun 15, 2006 at 06:07:09PM +0000, DC A wrote: > What could be the reason for using gtk_events_pending() and > gtk_main_iteration() in the following code snippet: > > > for( gflt=0; gflt<=1; ){ > gtk_progress_bar_update( (GtkProgressBar*)pbar, gflt ); > //update > while (gtk_events_pending ()) > gtk_main_iteration (); > gflt += 0.1; > sleep(1); > if ( gflt > 1 ) break; > } > > why the code cannot update the progressbar without these two functions? I > saw the API but still it is not clear to me. Have yor read the FAQ too? http://www.gtk.org/faq/#AEN602 Also, are you aware gtk_progress_bar_update() is deprecated? gtk_progress_bar_set_fraction() -- which is the function to use -- only queues the drawing. The drawing then actually occurs in Gtk+ main loop, which does not have a chance to run without gtk_main_iteration(). Yeti -- Anonyms eat their boogers. _______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list