Page 1 of 1

A little GTK trick that may help

Posted: Tue Nov 03, 2009 12:22 pm
by xProgrammer
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

Re: A little GTK trick that may help

Posted: Tue Nov 03, 2009 6:40 pm
by Antonio Linares
Doug,

You can use FiveLinux function SysRefresh(), as it does the same :-)

We use the same name SysRefresh() as in FiveWin, to keep coherence between different versions :-)

Anyhow, many thanks for your kind and interesting sharings as usual