[Glade-users] how to update process_bar in real time between multi-processes?



Yes, but use a GIOChannel as gtk_input_add() is old and deprecated.

Cheers,
            -Tristan


2008/4/22 ???? <neubuffalo at 163.com>:
Thank you so much for your answer.
 yes,it is a result of fork().After searching on Internet,I think create a
pipe,then monnitor it with gtk_input_add() in main GUI,while  child process
 periodically write some info to the pipe. Is it right?



??2008-04-22??"Tristan Van Berkom" <tristan.van.berkom at gmail.com> ??????


By child process you mean a result of fork() correct ?

if its really a child process, then that process will have to write its
progress
to a file descriptor (probably a named pipe) and you'll read it in an
iochannel
and update the progress bars from there.

if they are threads then you can just use g_idle_add() to tell the main GUI
thread to update the progress bars.

Cheers,
 -Tristan


2008/4/22 ???? <neubuffalo at 163.com>:


the problem is as below:

I have a main window with an Gtk_tree_view embedded in,every row of the
gtk_tree_view has a process_bar,and now I want to update the process_bar
in
real time based on the data from a child process.How can I achieve this
goal?

________________________________
??????????????????????????????????????????
_______________________________________________
Glade-users maillist - Glade-users at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/glade-users





 ________________________________
 ???????????? ???????????? ??????????????????




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