Hi,

--- Kim Jongha <[EMAIL PROTECTED]> wrote:

> /* and the for loop */
>  double val;
>  for(i = 0; i< SOME_NUMBER; i++)
>  {
>    val = (100.0 /SOME_NUMBER)* i /100.0;
>    g_idle_add(show_bar_idle_cb, INT_TO_POINT(val));
>  **SOMEWORK**
>  }
> 
> The problem is that timeout events don't occured
> before finishing
> SOMEWORK(read file with fscanf) 

How about adding SOMEWORK inside the g_idle_callback
function?

Cheers,
TranVan Hoang
> 
> --------------
>  double val = 0;
>    g_idle_add(show_bar_idle_cb, INT_TO_POINT(val));
>  for(i = 0; i< SOME_NUMBER; i++)
>  {
>    val = (100.0 /SOME_NUMBER)* i /100.0;
>  **SOMEWORK**
>  }
> --------------
> upper codes don't work too.
> 
> 2006/11/5, Kim Jongha <[EMAIL PROTECTED]>:
> > Greeting,
> >
> > progress bar is updated "only" using timeouts ?
> >
> > I read some big file and want to show up the
> progress how much App.
> > read file. so I use progress bar like below
> >
> >
> > double val;
> > for(i = 0; i< SOME_NUMBER; i++)
> > {
> >    val = (100.0 /SOME_NUMBER)* i /100.0;
> >  
>
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(pbar),
> val);
> >    gtk_widget_show(pbar);
> > }
> >
> > No error, 'val' value is greater than 0.0 less
> than 1.0. but it
> > doesn't work while app. read file. when app read
> file completly, then
> > progress bar filled fully is shown up.
> > I try to use timeouts, and that how can I read
> file.. ?
> >
> > give me a advise, thank you.
> >
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
>
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
> 

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to