Re: Problem in updating progress bar

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

 



On Thu, 2006-06-15 at 18:07 +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.

google for "event based programming main loop"

programming GUIs is very different in its basic control flow model than
writing simple non-user-driven procedural software.


_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux