[Glade-users] how to update process_bar in real time between multi-processes?
Tristan Van Berkom
tristan.van.berkom at gmail.com
Wed Apr 23 00:24:14 EDT 2008
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
> >
> >
>
>
>
> ________________________________
> ×ÔÐÅÔ´×Ô³ÉÊì ȫл»´úÉÏÊÐ ¶«·çÑ©ÌúÁúа®ÀöÉá
More information about the Glade-users
mailing list