Refreshing GUI



I have a GUI that is used to drive the running of various tasks, some run locally by the GUI, others run remotely via LSF and I am wondering what the best method for keeping the GUI window contents refreshed would be.
 
The problem is that should the GUI be waiting on a job and is temporarily obscured by another window, when it is revealed again it sits there looking blank and obviously waiting for a refresh. I have tried something like this:
 
open (TMP, "$external_job_script 2>&1 |");
while (<TMP>) {
     Gtk->main_iteration while Gtk->events_pending;
}
close TMP;
 
but the problem is that the external jobs that use LSF just sit there waiting to run and so don't really kick the while (<TMP>) loop into life.
 
Can someone tell me what the best way of keeping the GUI window regularly refreshed would be?
 
Cheers,
 
Bill.


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