Re: g_message and g_warning under Windows



Hi,

* Tor Lillqvist <tml iki fi>:

Russell Shaw writes:
 > Richard Gipps wrote:
 > > I notice that under GTK+ 2.6 (in Windows), a call to g_error()
 > > brings up a dialogue box with the error message,

Yes, fatal errors do that (before calling abort()). It is somewhat
debatable, and might get removed in the future. Some application
developers feel that it's not GLib's business to do any kind of GUI,
even if just a Win32 MessageBox. 

The solution might be creating an API for a custom error output handler:

typedef void (* GLibErrorHandlerFunc) (GError *error,
                                       gpointer user_data);

gboolean g_error_set_handler_func (GlibErrorHandlerFunc func,
                                   gpointer user_data);

Then GTK+ could provide default error handler, e.g. using a MessageBox
on Win32.

Regards,
 Emmanuele.

-- 
Emmanuele Bassi (Zefram)                 [ http://www.emmanuelebassi.net ]
GnuPG Key fingerprint = 4DD0 C90D 4070 F071 5738  08BD 8ECC DB8F A432 0FF4



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