Refreshing the GUI in a CPU intensive application



Hi everyone.

I'm working on an application which is CPU intensive. The GUI has
scrollable window where I print detailed information about
intermediate results while the application is running. The application
takes about 2 minutes to end.

I don't know why the scrollable window doesn't update while it's running.

Here is how I designed it:

1) When the user press 'return', the associated callback adds the so
called CPU intensive function to the idle queue with low priority (I
also tried to call it directly).

2) This CPU intensive function prints data into the scrollable window,
but I cannot see this information until the application ends. This CPU
intensive function consists basically of a huge loop and I tried
calling:
   - gdk_window_process_all_updates ();
   - gdk_window_process_updates();  and
   - gtk_widget_queue_draw()
from time to time during the loop. Nothing of this solves my problem.


What should I do?

Thanks in advance.


--
AV



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