GNOME Bugzilla – Bug 364078
Glade-3 misinterprets the position attribute in a VBox when using pack type END -- everything is in the wrong order
Last modified: 2018-03-26 15:00:59 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:
*** Bug 517041 has been marked as a duplicate of this bug. ***
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.
Created attachment 161473 [details] App when running Shows app running after saving in glade, with position of statusbar, menu and toolbar scrambled.
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.
*** Bug 444011 has been marked as a duplicate of this bug. ***
-- 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.