Bug 712924 - Glade creates GtkBox instead of GtkHBox or GtkVBox
Glade creates GtkBox instead of GtkHBox or GtkVBox
Product: Fedora
Classification: Fedora
Component: glade3 (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Huzaifa S. Sidhpurwala
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2011-06-13 11:47 EDT by Nathanael Noblet
Modified: 2013-07-26 18:49 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-07 12:21:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nathanael Noblet 2011-06-13 11:47:14 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):

How reproducible:

Steps to Reproduce:
1. Create a horizontal or vertical box
2. Load via builder
Actual results:
Warning: cannot create instance of abstract (non-instantiatable) type `GtkBox'

Expected results:
Normal operation

Additional info:
If I go in and edit the glade file and change the GtkBox to GtkHBox or GtkVBox it then works.
Comment 1 Eduardo Villagrán Morales 2011-09-07 13:57:47 EDT
I have same problem with glade3-3.10.0-2.fc15.i686.
Comment 2 Martin Preisler 2011-09-29 07:48:48 EDT
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.
Comment 3 Gilboa Davara 2011-10-02 08:57:56 EDT
I can confirm Martin's solution.
Comment 4 Mo Morsi 2011-10-26 14:18:59 EDT
I have also confirmed this issue and Martin's solution.
Comment 5 anish 2011-11-18 06:30:58 EST
I was also facing the same issue and i am confirming the Martin's solution.
Comment 6 Elliott Forney 2012-03-31 23:55:12 EDT
Still a problem in Fedora 16.
Comment 7 Elliott Forney 2012-04-01 00:08:17 EDT
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.
Comment 8 Elliott Forney 2012-04-01 00:33:03 EDT
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.
Comment 9 Kalev Lember 2012-05-06 18:46:09 EDT
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
Comment 10 David Parkin 2012-05-10 06:52:42 EDT
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?
Comment 11 Kalev Lember 2012-05-10 07:12:27 EDT
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.

Comment 12 Nathanael Noblet 2012-05-10 11:04:47 EDT
@david parkin
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.
Comment 13 Kalev Lember 2012-06-14 06:06:07 EDT
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.
Comment 14 Fedora End Of Life 2012-08-07 12:21:56 EDT
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:
Comment 15 Elliott Forney 2013-07-26 18:49:21 EDT
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!

Note You need to log in before you can comment on or make changes to this bug.