threading problem



I have two problems with a gui i have created.
1.  I have a 2 buttons on it, a Start and a Stop button.  My stop button doesn't execute until the start button has completed it's task, which basically defeats the purpose of it.  I have tried using forks and pthreads to fix this problem but have had any sucess.  I've tried to look into using the glib thread g_thread but I'm very new to using gtk and am not very familiar with many of these things the examples and references include in there explaination.  I am either looking for very introductory example or explaination of how to use g_threads or an example of how to just use them on these buttons.  The call for the start button is :
button1->signal_clicked().connect(SigC::slot(*this, &window1_glade::on_button1_clicked));
for the stop button it's:
button2->signal_clicked().connect(SigC::slot(*this, &window1_glade::on_button2_clicked));
 
2. This problem is very similar, while my start button is running, I have a treeview that displays text.  however it won't display the rows till it's completed the start process.  I need it to display the rows as the start button process is running.  Because of how it runs, I don't think threading would be a good idea.  I think the best way to solve this is by using an idle connection.  However my problem here is again, I haven't found any introductory explanations and examples of how i can do this using gtk.
 
-Any and all help with either of these problems is greatly appreciated...
Thanks,
John T
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]