Re: EuGTK - Q: how to show a picture before main()

new topic     » goto parent     » topic index » view thread      » older message » newer message
Jerry_Story said...
jimcbrown said...

Without your full code, it's hard for me to say, but I'd guess where and how you call gtk_main() is an issue here.

The full relevant code is

include GtkEngine.e 
 
-- some code here 
 
global constant Win = create(GtkWindow) 
 
-- some code here 
 
constant splash = create(GtkWindow) 
 
-- some code here 
 
  show_all(splash)  -- This is supposed to show -before- the data is loaded. 
  getUSDAdata() 
  hide(splash) 
 
-- some code here 
 
show_all(Win) 
main() -- But this is where both splash and Win show, if I comment out hide. 

Yep, after you call show_all(splash) (and before you call getUSDAdata() or hide(splash) ) you need to call the EuGTK version of this:

while (gtk_events_pending()) 
{ 
	gtk_main_iteration(); 
} 

The GTK code in http://faq.pygtk.org/index.py?req=show&file=faq20.005.htp should show you exactly what you need to do.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu