Re: gtk_timeout_add / SIGALRM with gtk



have also seem references to 

 while(gtk_events_pending() )
 {
         gtk_main_iteration();
 }

Which I have tried along with gtk_main(), and again seems not to pick up
the timeout or allow for refreshing which the app is in full steam.

The code above should work fine (at least 
in Gtk1.2, I don't know much about Gtk2.0)

You must insert the code above in the middle of your compute 
intensive code, for example, if you have a inner loop, where 
your code stays for most of the 20min, you could add a counter
and everytime the counter reaches 1000 just run the code above.

Running the code all the time is not efficient, running
the code too less (say, only when the counter reaches 1000,000)
might be irritating for the user who might have to wait.
Just look for the best compromise.

If you put the refreshing code outside your compute 
intensive code, then is not going to work...
Carlos



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