Re: [Gimp-developer] Console window on Win32



On Sun, 12 Sep 2004 13:15:37 +0000, Tor Lillqvist <tml iki fi> wrote:
gtk-app-devel-list people, check the start of this thread from the
gimp-developer archives at
http://www.mail-archive.com/gimp-developer%40lists.xcf.berkeley.edu/msg07988.html

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?

I too think it's more trouble than it's worth.  If nothing else, it's
different from how stdout is treated on X (and I assume other ports as
well).  Since a lot of Windows GTK stuff is just ported over from X,
it's likely that the developers don't even know that they are spamming
the Windows users.

Rockwalrus



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