A little GTK trick that may help

A little GTK trick that may help

Postby xProgrammer » 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
User avatar
xProgrammer
 
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia

Re: A little GTK trick that may help

Postby Antonio Linares » Tue Nov 03, 2009 6:40 pm

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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41291
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveLinux / FiveDroid (Android)

Who is online

Users browsing this forum: No registered users and 3 guests