Re: questionfor progress bar

2006-11-05 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, Nov 05, 2006 at 02:59:30PM +0900, Kim Jongha wrote: > 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 > > >

Re: questionfor progress bar

2006-11-05 Thread Samuel Cormier-Iijima
Adding the work inside the idle function would work, but would be hard to implement (state is spread out between function calls, so hard to debug) and not cross-platform, since I think Linux has only recently added support for AIO (asynchronous input/output). If you'd rather use threads, here's a s

Re: questionfor progress bar

2006-11-05 Thread Van H Tran
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 occure

Re: questionfor progress bar

2006-11-05 Thread Tony Newman
Kim Jongha wrote: > 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

Re: questionfor progress bar

2006-11-05 Thread Kim Jongha
Ooch, It doesn't work .. 2006/11/5, Van H Tran <[EMAIL PROTECTED]>: > > I would do it like this, but sorry i haven't got time > to confirm it would work. > > > /* pseudo code*/ > > gboolean * show_bar_idle_cb(pointer val) > { >gtk_progress_bar_set_fraction(POINT_TO_INT(val)); >return FALS

Re: questionfor progress bar

2006-11-04 Thread Kim Jongha
Oops, It doesn't work, What's the problem.. ? I describe in detail. /* pseudo code*/ gboolean * show_bar_idle_cb(pointer val) { gtk_progress_bar_set_fraction(POINT_TO_INT(val)); return FALSE to exit the idle } /* and the for loop */ double val; for(i = 0; i< SOME_NUMBER; i++) { val =

Re: questionfor progress bar

2006-11-04 Thread Van H Tran
I would do it like this, but sorry i haven't got time to confirm it would work. /* pseudo code*/ gboolean * show_bar_idle_cb(pointer val) { gtk_progress_bar_set_fraction(POINT_TO_INT(val)); return FALSE to exit the idle } /* and the for loop */ double val; for(i = 0; i< SOME_NUMBE

questionfor progress bar

2006-11-04 Thread Kim Jongha
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_PR