After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 163322 - GtkToolbars in old GTK+ 2.0 format no longer work
GtkToolbars in old GTK+ 2.0 format no longer work
Status: RESOLVED FIXED
Product: libglade
Classification: Deprecated
Component: gtk
unspecified
Other Linux
: Normal normal
: ---
Assigned To: James Henstridge
James Henstridge
Depends on:
Blocks:
 
 
Reported: 2005-01-08 11:40 UTC by Damon Chaplin
Modified: 2005-02-12 01:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtk_old.glade (1.63 KB, application/x-glade)
2005-01-19 23:08 UTC, Alex Roitman
Details
gtk_old.py (232 bytes, application/x-python)
2005-01-19 23:09 UTC, Alex Roitman
Details
gtk_new.glade (1.73 KB, application/x-glade)
2005-01-19 23:10 UTC, Alex Roitman
Details
gtk_new.py (232 bytes, application/x-python)
2005-01-19 23:10 UTC, Alex Roitman
Details
gnome_old.glade (2.13 KB, application/x-glade)
2005-01-19 23:12 UTC, Alex Roitman
Details
gnome_old.py (482 bytes, application/x-python)
2005-01-19 23:12 UTC, Alex Roitman
Details
gnome_new.glade (2.07 KB, application/x-glade)
2005-01-19 23:13 UTC, Alex Roitman
Details
gnome_new.py (482 bytes, application/x-python)
2005-01-19 23:14 UTC, Alex Roitman
Details

Description Damon Chaplin 2005-01-08 11:40:58 UTC
It looks like the old-style GTK+ 2.0 toolbars are not loaded correctly any more.

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=288445
(and also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=287167)

It seems to have happened between 2.4.0 and 2.4.1.

Is libglade supposed to be backwards compatable to 2.0?
I would think so, but I'm not sure.
Comment 1 Baiju M 2005-01-11 08:15:36 UTC
Fle chooser dialog also not working in 2.4.1

To reproduce:
1. Create a glade file with just one File Chooser Dialog
   http://baijum81.freezope.org/tmp/fcd.glade
2. I run this like :
   import gtk
   import gtk.glade
   gtk.glade.XML('fcd.glade')
   gtk.main()
3. Now Cancel and Open buttons are not visible.

>>> import gtk
>>> import gtk.glade
>>> t=gtk.glade.XML('fcd.glade')
>>> type(t.get_widget('fcd'))
<type 'gtk.FileChooserDialog'>
>>> type(t.get_widget('dialog-vbox1'))
<type 'NoneType'>
>>> type(t.get_widget('dialog-action_area1'))
<type 'NoneType'>
>>> type(t.get_widget('button1'))
<type 'NoneType'>
>>> 
Comment 2 Alex Roitman 2005-01-19 22:59:09 UTC
It seems that the bug actually relates the toolbar inside the bonobo dock. I
have composed a few testcases demonstrating that for a pure gtk both old way
('button') and new way ('GtkToolButton') work just fine. However, when the
window is a GnomeApp and the toolbar is inside the bonobo dock item, then the
old way no longer works.

Attaching testcases in a minute,
Alex
Comment 3 Alex Roitman 2005-01-19 23:08:38 UTC
Created attachment 36264 [details]
gtk_old.glade

old toolbar API, pure gtk, glade file
Comment 4 Alex Roitman 2005-01-19 23:09:25 UTC
Created attachment 36265 [details]
gtk_old.py

old toolbar API, pure gtk, python code (to use with gtk_old.glade)
Comment 5 Alex Roitman 2005-01-19 23:10:01 UTC
Created attachment 36266 [details]
gtk_new.glade

New toolbar API, pure gtk, glade file
Comment 6 Alex Roitman 2005-01-19 23:10:53 UTC
Created attachment 36267 [details]
gtk_new.py

New toolbar API, pure gtk, python code (to use with gtk_new.glade)
Comment 7 Alex Roitman 2005-01-19 23:12:15 UTC
Created attachment 36268 [details]
gnome_old.glade

Old toolbar API, gnome, glade file
Comment 8 Alex Roitman 2005-01-19 23:12:58 UTC
Created attachment 36269 [details]
gnome_old.py

Old toolbar API, gnome, python code (for use with gnome_old.glade)
Comment 9 Alex Roitman 2005-01-19 23:13:38 UTC
Created attachment 36270 [details]
gnome_new.glade

new toolbar API, gnome, glade file
Comment 10 Alex Roitman 2005-01-19 23:14:20 UTC
Created attachment 36271 [details]
gnome_new.py

new toolbar API, gnome python code (for use with gnome_new.glade)
Comment 11 Alex Roitman 2005-01-19 23:19:48 UTC
Summary of the testcases:

1. Both
   $ python gtk_new.py
and
   $ python gtk_old.py
display toolbar with the button.

2. Running
   $ python gnome_new.py
does display a proper toolbar with the button, while
   $ python gnome_old.py
display an empty toolbar, no button.

Seems that the bug needs to be moved from gtk to bonobo component, but I do not
have permissinos to change this.
Comment 12 Damon Chaplin 2005-01-19 23:47:58 UTC
With test-libglade the toolbar button is also invisible in gtk_old.py.
So I still think it is a libglade toolbar problem.
Comment 13 Alex Roitman 2005-01-19 23:50:38 UTC
What's the test-libglade?
Comment 14 Damon Chaplin 2005-01-19 23:58:28 UTC
It's a small test app included with libglade.
Comment 15 Andreas Rottmann 2005-01-29 19:18:01 UTC
I can reproduce the test results of Alex Roitman. This has resulted in a release
critical bug fo libglade2 in Debian, see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=290811. As I am the Debian
maintainer of libglade, I would really appreciate upstream to comment on this,
since I will most likely have to revert the changes, thus becoming incompatible
with upstream. As the change of the toolbar API used effectivly changes the ABI
of libglade2, this change should have never happened during a stable release series.
Comment 16 Damon Chaplin 2005-01-29 22:46:39 UTC
I agree that the recent changes to toolbar_build_children() should be reverted.
(I'd revert the entire function to the 2.4.0 code, except to use
gtk_container_add() instead of gtk_toolbar_append_widget() at the end.)

Is there any particular reason it was changed to use the new API?
Comment 17 Andreas Rottmann 2005-02-09 10:55:23 UTC
FWIW, note that there is a patch that is supposed to fix this (by reverting the
offending change) in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=290811.
Comment 18 James Henstridge 2005-02-12 01:22:15 UTC
Sorry about not handling this sooner.

I've put out a new release that corrects the problem with libglade-2.4.1 (not a
complete revert, since 2.4.1 also fixed a problem handling the "active" property
for radio toolbar items).  It should fix all programs that broke with 2.4.1 though.