GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

button event release

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
bluezapper
Familiar Face


Joined: 14 Mar 2007
Posts: 9

PostPosted: Mon May 21, 2007 8:30 am    Post subject: button event release Reply with quote

Hi,

I have button pressing which a lot of events take place. My problem is until the event returns after pressing the button the complete application freezes. Is there way that the button gets released and these steps take place.

thanks for your replies in advance,

bluezapper
Back to top
Micah Carrick
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 480
Location: Portland, OR USA

PostPosted: Mon May 21, 2007 7:42 pm    Post subject: Reply with quote

What are these events doing? Maybe a simple:

Code: (Plaintext)
1
while (gtk_events_pending()) gtk_main_iteration();


in between events that take some time to process.
Back to top
bluezapper
Familiar Face


Joined: 14 Mar 2007
Posts: 9

PostPosted: Tue May 22, 2007 7:10 am    Post subject: Reply with quote

Actually, When I press the button I do some socket connections and get back the data. As it takes some time to open the sockets I want to show the status to the user in a text view. The text_view gets only updated after the button release.

I want to do multi threading. While one event opens the socket, other should update the text_view and show it to the user.

Is it possible to do this on GTK. I have done a lot of Java programs where its easy.

thanks

bluezapper :D
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP