mono / gtk-sharp

Gtk# is a Mono/.NET binding to the cross platform Gtk+ GUI toolkit and the foundation of most GUI apps built with Mono
http://www.mono-project.com/GtkSharp
Other
424 stars 140 forks source link

Debugging GTK-Warning #290

Open elmar69 opened 3 years ago

elmar69 commented 3 years ago

In Gtk3 I got into problem on debugging Gtk-Warning-messages as:

Gtk-WARNING **: 17:24:18.112: Attempting to add a widget with type GtkBox to a container of type GtkBox, but the widget is already inside a container of type GtkBox, please remove the widget from its existing container first.

I tried to setup an log-handler but it seems to be ignored for that kind ob messages.

GLib.Log.SetLogHandler (null, GLib.LogLevelFlags.All, GLibLog);
GLib.Log.SetLogHandler ("Gtk", GLib.LogLevelFlags.All, GLibLog);
GLib.Log.SetLogHandler ("GLib-GObject", GLib.LogLevelFlags.All, GLibLog);
GLib.Log.SetDefaultHandler (GLibLog);

"GLibLog" is my handler function for being able to place an break-point there.

What can help to resolve that Problem?