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 Aug 24, 2016 1:31 am

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: GTK Dialog in thread and waiting for g_idle_add
PostPosted: Thu Jul 31, 2014 11:55 am 
Familiar Face

Joined: Wed Apr 20, 2011 10:00 am
Posts: 10
Hi, so I have a new thread for every file that client intend to download but before actual downloading I wanted to program a GTK Dialog which asks if user wants to download that file or not(because file is send from other computer and user should have a chance to accept it or not) and here I have a problem because in order to make it work I need to call g_idle_add with gtk_dialog in given function but how can I wait for it to end(end == pressing Yes or No in Dialog Window) and process then depending on clicked button?

EDIT: I have also tried putting all code related to downloading(send,recv etc) in function called via g_idle_add and that worked but that also limited downloading to only 1 file at time.

EDIT2: I am deeply sorry - I just reconstructed code and now I don't need to wait for g_idle_add due to blocking socket later on so everything works fine. Sorry again for making unnecessary thread, it can be deleted.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

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