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)
<?xml version="1.0" encoding="UTF-8"?><interface> <!--
interface-requires gtk+ 3.0 --> <object class="GtkWindow"
id="window1"> <property name="can_focus">False</property>
<child> <object class="GtkBox" id="box1"> <property
name="visible">True</property> <property
name="can_focus">False</property> <property
name="orientation">vertical</property> <child>
<placeholder/> </child> <child>
<placeholder/> </child> <child>
<placeholder/> </child> </object> </child>
</object></interface>
(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
on 2012-03-17 20:17
on 2012-03-21 17:59
Le Sat, 17 Mar 2012 20:17:02 +0100, "andrea" <andrea@andreadallera.com> a écrit : > 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. Yes. This has been discussed a few months ago : http://www.ruby-forum.com/topic/2385140 conclusion : use glade 3.8 regards Simon
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.