gtk-app-devel-list people, check the start of this thread from the
gimp-developer archives at

Sven Neumann writes:
 > There got to be a way to change this behaviour of g_print(), no?

Well, one could redirect stdout and stderr to /dev/null (i.e. NUL: on
Windows), either in the command line that starts GIMP, or even in GIMP
itself with freopen(). If stdout or stderr are connected to NUL:, they
aren't invalid, and g_log() won't open any console window.

One could even go so far that if there is a consensus among GTK+ app
developers (whose apps run on Win32) that the opening of console
windows in GLib was a silly idea and has been of little use, that code
could just be removed. g_print() etc would then write to stdout or
stderr, like on Unix, regardless of whether they are connected to
anything or not. It would then be the end user's responsibility to
redirect stdout/stderr of a GUI application to a file if they want to
see whatever might be written to stdout/stderr.

Could we have a raise-of-hands here? Who thinks GLib shouldn't bother
doing that console window allocation stuff at all?

Personally I don't have any preference.


Gimp-developer mailing list

Reply via email to