Red Hat Bugzilla – Bug 712924
Glade creates GtkBox instead of GtkHBox or GtkVBox
Last modified: 2013-07-26 18:49:21 EDT
Description of problem:
When creating vertical or horizontal boxes, glade3 creates a GtkBox which when loaded via python or c errors out.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a horizontal or vertical box
2. Load via builder
Warning: cannot create instance of abstract (non-instantiatable) type `GtkBox'
If I go in and edit the glade file and change the GtkBox to GtkHBox or GtkVBox it then works.
I have same problem with glade3-3.10.0-2.fc15.i686.
The same problem happens with glade3-3.10.0-2.fc15.x86_64 and pygtk2-2.24.0-3.fc15.x86_64
It is reproducible with GtkButtonBox as well (GtkHButtonBox and GtkVButtonBox). Changing GtkBox to GtkV/HBox and GtkButtonBox to GtkV/HButtonBox works for me.
I can confirm Martin's solution.
I have also confirmed this issue and Martin's solution.
I was also facing the same issue and i am confirming the Martin's solution.
Still a problem in Fedora 16.
Looks like pygtk only supports gtk 2? http://www.pygtk.org/
I presume this is why some features don't work. Try using glade2 until pygtk supports 3.0.
Looks like you can set the GTK version in glade3 with file->properties but the problem still occurs. I suppose that would be the bug to consider.
Looks like the issue here is editing gtk2 projects with a Glade version that only supports gtk3.
I've done some packaging work on Glade in F17 and there's going to be separate Glade packages with gtk2 and gtk3 support, so it should be possible to properly edit gtk2 projects again. The packages are parallel installable and named according to upstream naming:
glade3 3.8: the gtk2 version
glade 3.12: the gtk3 version
I have the same problem but it is not editing gtk2 projects that is the problem, I don't think, my project is new. Glade id producing xml that refers to GtkBox. The 'c' program does not understand GtkBox - library problem. Am I right in assuming that GtkBox will replace vbox and hbox?
Yes, GtkVBox and GtkHBox are deprecated starting with GTK+ 3.2.
In GTK+ 2, GtkHBox only had one public method, gtk_hbox_new(). In GTK+ 3, this is deprecated and the replacement is gtk_box_new(GTK_ORIENTATION_HORIZONTAL, ...). Likewise with GtkVBox.
you also need to make sure you are linking to the right gtk. If you use the latest glade to create the xml file, it will create a gtk v3 file. If you try building an app with that and link to gtk2, you get depreciation and other errors.
David, have you had a chance to test the glade3 package in Fedora 17? Does it fix the issue for you?
There are now two parallel installable Glade packages: glade and glade3. The former is for gtk3 projects, and the latter is for gtk2 projects. And if you are having issues with GtkBox, give a try to the glade3 package, which should now work properly with gtk2 projects in Fedora 17.
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.
(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
By the way, adding both glade 2 and 3 appears to be an adequate fix to me. This bug probably should have been closed as NEXTRELEASE. Thank you!