Re: show the content of a dialog window



soudant cogenit fr wrote:

> I have made an application with Glade using GTK. The
> GUI application loads a text application in a child
> process. Both are communicating via pipes.
> The standard input and output of the text application
> are redirect in the pipes.

 > When this window appears, it is blank. They are no
 > label, no button, and the text entry is not usable.
 > What's happened ?

Hi Sandrine,

I've not read your code very carefully, but it sounds like you're
blocking the GUI process on read() on your pipe.

The best technique is to use gtk_input_add_full(). You make a pipe, use
gtk_input_add_full() to tell GTK about it, and then return to
gtk_main(). When data arrives on the pipe, GTK will automatically call
one of your functions with the new characters.

Look at these pages:

http://developer.gnome.org/doc/API/glib/glib-io-channels.html

This is the core functionally.

http://developer.gnome.org/doc/API/gtk/gtk-general.html#GTK-INPUT-ADD-FULL

This is an easy to use layer over g_io_channel.

Hope I've understood,

John

(you should not mail gtk-devel-list .. it's only for people working on
the inside of GTK)





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