A little GTK trick that may help
Posted: Tue Nov 03, 2009 12:22 pm
I came across this GTK trick whilst writing xHarbour code to compile and link am xHarbour application. I was (trying to) update a status bar as each module was compiled and linked, but all I ever saw was the final message. GTK event processing can get queued up behind other processes which consume lots of processor time and may have higher assigned priorites (or something like that). The trick is to execute the following after updating the status bar:
HB_FUNC( PROCESS_PENDING_GTKH_EVENTS )
{
while( gtk_events_pending() )
gtk_main_iteration();
}
If you ever run into this type of problem the above just might be the answer.
Regards
Doug
HB_FUNC( PROCESS_PENDING_GTKH_EVENTS )
{
while( gtk_events_pending() )
gtk_main_iteration();
}
If you ever run into this type of problem the above just might be the answer.
Regards
Doug