GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Jul 30, 2014 9:16 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: gtk_widget_now*?
PostPosted: Mon Dec 31, 2007 2:28 am 
Offline

Joined: Mon Dec 31, 2007 2:11 am
Posts: 3
Hi to all.

I have some dudes, I'm writing a program where I need to sleep my application some time, but before I need show one image in a button; the problem is that the chance (the showed image in the button) is showed after the sleep return, something like this:

gtk_button_set_image(GTK_BUTTON(button), image);
sleep(1);
/*the image is showed at this time*/

I tested all gtk_widget_show*, and all this functions show the chance before the sleep.

Can anybody help me? Other solutions? Thanks in advanced.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 31, 2007 3:41 am 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 12:07 am
Posts: 563
Location: Portland, OR USA
Try this right after changing the image:
Code:
while( gtk_events_pending() )  gtk_main_iteration();

_________________
Micah Carrick - Forum Administrator
http://www.micahcarrick.com


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 31, 2007 6:10 pm 
Offline

Joined: Mon Dec 31, 2007 2:11 am
Posts: 3
Micah Carrick, thanks your reply save my live :-)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 31, 2007 6:43 pm 
Offline

Joined: Mon Dec 31, 2007 2:11 am
Posts: 3
I fortgot, Happy Happy New Year


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group