Re: [Gimp-developer] Console window on Win32

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

 



Hi Tor,

I've played around with the g_set_print_handler and the
g_log_set_handler functions and they certainly stop the console window
from coming up when I use my custom handler to redirect the message to
somewhere else. So it may well be a good way to give the user an
option of redirecting these stdout and/or stderr messages to somewhere
totally invisible.

Regards,

Alif.


On Sat, 11 Sep 2004 06:48:28 +0000, Tor Lillqvist <tml@xxxxxx> wrote:
> Sven Neumann writes:
>  > Almost all of the messages that cause this problem don't come from the
>  > GIMP application. They are created by libraries that we are using and
>  > these libaries aren't necessarily using g_print() and g_printerr().
> 
> Nope, you have it backwards. 3rd-party libraries who write to stdout
> directly don't cause them.
> 
>  > Also I don't see why we should be redirecting stdout and stderr.
>  > Everything that shows up there is strictly just for the eyes of
>  > developers.
> 
> Some clarification here: The GIMP executable is linked as a "GUI"
> application. This means that it doesn't have any console window when
> it starts. stdout and stderr are not connected to anything. Writing to
> them doesn't go anywhere, and certainly doesn't open a console window
> for the application.
> 
> It's the g_print() etc functions that explicitly open a new console
> window if stdout (or stderr) isn't connected to a valid file handle.
> 
> It would be possible to make it impossible to close the console window
> that GLib opens, by removing the close button from it. Then users
> would know just to minimize it if they aren't interested in the
> messages. See my last comment in bug #141102.
> 
>  > We use g_message() for all messages that are meant to be
>  > seen by users. Such messages then are processed by the following logic:
>  >
>  >   If GIMP was started with the --console-messages command-line
>  >   option, the messages go the console (stdout iirc).
> 
> Hmm, if most GIMP users on X11 start GIMP through some window manager
> whose stdout isn't visible, is that option then really supposed to
> mean "don't show messages"?
> 
> I guess there is a mismatch in the ways of thinking here: GIMP thinks
> that writing to stdout means the output will mostly go somewhere where
> the user doens't see it, unless he explicitly does something unusual
> (starts GIMP from the command line).
> 
> The Win32 code in GLib again thinks that g_print() etc messages are
> *important*, and supposed to be shown to the user in some way, even
> opening a new console window if there isn't one already. If the user
> wants to redirect stdout and stderr (to NUL: or a file), he can do it
> from the command line.
> 
> --tml
> 
> 



-- 
"Heaven is the peaceful place on earth...New Zealand."
     -- Alif Wahid.

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux