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 364078 - Glade-3 misinterprets the position attribute in a VBox when using pack type END -- everything is in the wrong order
Glade-3 misinterprets the position attribute in a VBox when using pack type E...
Status: RESOLVED OBSOLETE
Product: glade
Classification: Applications
Component: general
3.0.x
Other All
: Normal normal
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
: 444011 517041 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-10-22 03:15 UTC by Laszlo Pandy
Modified: 2018-03-26 15:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glade screenshot (108.58 KB, image/jpeg)
2010-05-19 17:10 UTC, Robert Ramsdell
Details
App when running (63.45 KB, image/jpeg)
2010-05-19 17:12 UTC, Robert Ramsdell
Details
File saved by glade (24.10 KB, application/octet-stream)
2010-05-19 17:19 UTC, Robert Ramsdell
Details

Description Laszlo Pandy 2006-10-22 03:15:50 UTC
Please describe the problem:
I am using Glade-3 v3.0.2. For children in a VBox, Glade-3 puts an attribute "position" in the XML like so:
<packing>
    <property name="pack_type">GTK_PACK_END</property>
    <property name="position">0</property>
</packing>

However, Glade-2 did not put a "position" attribute, and libglade just ordered them in the same order they we're read from the XML. Glade-3 specifies the bottom most child as position=0 and the child above that position=1, etc. When GTK_PACK_START is used, this works fine. 

However when GTK_PACK_END is used, libglade thinks that the greater the postion, the farther down it should be. The result is that all your VBox children that use GTK_PACK_END are in the reverse order.

Recall that Glade-2 did not save the "position" attribute to XML. If you save the glade file using Glade-3 and then remove all <property name="position"> tags, and verify that all the children are listed in the order you would pack programmatically (bottom up with pack_end), libglade reads the file correctly and all the children will be in the right order.

Here are two possible solutions that I think will work:
Solution 1) don't save the <property name="position"> tags to XML like Glade-2 did.
Solution 2) reverse the position values so they are compatible with libglade.


Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Tristan Van Berkom 2008-03-10 03:48:22 UTC
*** Bug 517041 has been marked as a duplicate of this bug. ***
Comment 2 Robert Ramsdell 2010-05-19 17:10:51 UTC
Created attachment 161472 [details]
glade screenshot

Shows stautsbar position set to 0 in Glade and Packing 'End' and glade's version of what the app will look like.
Comment 3 Robert Ramsdell 2010-05-19 17:12:18 UTC
Created attachment 161473 [details]
App when running

Shows app running after saving in glade, with position of statusbar, menu and toolbar scrambled.
Comment 4 Robert Ramsdell 2010-05-19 17:19:22 UTC
Created attachment 161474 [details]
File saved by glade

The xml file saved by Glade 3.4.  The 'Position' attribute for the statusbar was not saved (but was saved for other widgets in the Vbox container).  If I manually insert the position attribute, things are still scrambled, but the staus bar ends up on the bottom...

Note that I am running Glade 3.4.2, GTK+ 2.12.9 (according to the Docs), pyGTK 2.12.1 on Windows XP with up-to-date service packs.
Comment 5 Tristan Van Berkom 2010-12-16 19:28:32 UTC
*** Bug 444011 has been marked as a duplicate of this bug. ***
Comment 6 GNOME Infrastructure Team 2018-03-26 15:00:59 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glade/issues/8.