[Glade-users] capturing libglade warnings

I'm building an application that calls glade_xml_new() to create a dialog.
I want to pop up a warning dialog in case the call fails, e.g. if the
.glade file isn't found.  I can build my own error message when this
happens, but at the same time I see on my console:

(evmsgtk2:9185): libglade-WARNING **: could not find glade file

That is the message I want to provide to the user.  How can I capture it?

One way that seems as though it might work would be to run
g_log_set_handler() to set up a log handler for domain 'libglade', log
level WARNING.  This might work, but it's a bit complicated, and raises the
question of how I can be sure that I capture the right warning.

Is there a more direct way of trapping the error/warning message when
glade_xml_new() fails?


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