Re: redirecting stdout to Gtk Text widget



ashish gupta escreveu:
hi,
I am developing a gui in windows and need to redirect stdout to text widget.
i came to know about  g_set_print_handler () function but it gives only
those strings that i pass to g_print and not all warnings that come in
stdout.
another problem i face is that when i give two g_print() the second string
overwrite the first and i only get the second string.My application require
g_print at different places so iterator need to be in end position of last
string written on text widget.
kindly help
thanks
ashish
Hi,

I report the solution on gtk-list gnome org, but warnings are stderr and not stdout, so you must swap stdout to stderr. If you want redirect the two ways, you can create more one pipe and more one callback.

--

[]'s

Claudio Polegato Junior

Um peregrino de Problemas; Um pergaminho de Soluções.




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