void MakeChildrenUnselectable(Gtk.Widget w)
{
// Remove the registered signals, since those signals are bound
// to the custom widget class, not the widget container class.
Stetic.Wrapper.Widget ww = Stetic.Wrapper.Widget.Lookup (w);
if (ww == null)
return;
ww.Signals.Clear ();
foreach (Gtk.Widget child in (Gtk.Container)w) {
Stetic.Wrapper.Widget wrapper = Stetic.Wrapper.Widget.Lookup (child);
if (wrapper != null) {
wrapper.Signals.Clear ();
wrapper.Unselectable = true;
}
if (child is Gtk.Container)
MakeChildrenUnselectable (child);
}
}