Skip to content

Draft: preGTK4: Add our own Bin & use that. GTK4 bins Bin

Daniel Boles requested to merge dboles/inkscape:dboles/BinGtkBin into master

@Tavmjong I think this will be handy during moving up to GTK4, agreed?

GtkBin was a handy way to say 'I just want a widget that will hold one
child, and will request and allocate size the obvious way'. Well, GTK4
removes it, so we need to plan ahead. We could e.g. change our classes
to inherit from whatever they add to their Binself right now, but that
will change widget and CSS hierarchies, so it's overly disruptive, and
it'd make the API of the new base class usable on our widget which may
lead to unwanted uses in future. The other 'solution' imagine would be
to make the Bin-ish widgets individually implement sizing and all that
which seems over-verbose. So, instead let's just implement our own Bin
and use that now in GTK3, then in GTK4 we only need to rewrite it, not
all widgets derived from it. It'll just become a Widget, not Container

Try as I might, I could not get Glib::Property to work here (it asserted
that the GObject class ->set_property was not null, which it was, and I
couldn't figure out why, as equivalent code worked fine when I tested it
independently of Inkscape, so presumably something larger was at play
there. Anyway, we don't really/currently need a prop, so let's skip it.

Merge request reports