Hi everyone,
it seems that the new version of Glade generates files in which
Gtk::VBox and Gtk::HBox are replaced by a standard Gtk::Box with an
orientation (vertical or horizontal) property.
This seemingly breaks Gtk::Builder. An example follows:(interface
definition, testib.glade)
interface-requires gtk+ 3.0 --> False
True False vertical
(test program)–require ‘gtk2’
builder = Gtk::Builder.newbuilder.add_from_file(“testib.glade”)
objects = builder.objectsobjects.first.toplevel.show
Gtk.main
–This results in a segfault. If “GtkBox” in the glade file is replaced
with “GtkVBox” everything works as expected.
The error message is GLib-GObject-WARNING **:cannot create instance of
abstract (non-instantiatable) type `GtkBox’My guess is that builder
tries to instantiate Gtk::Box (which is abstract) instead of the correct
VBox or HBox. How can I fix this? I’ve tried to take a look at the
source but I can’t find anything of use…
Andrea