Changes

1,317 bytes added ,  13:02, 10 November 2011
Line 146: Line 146:  
# You need to check your .add() calls, as previously they would behave as pack_start with expand=True, but now they will behave as expand=False (you need to change them to use pack_start with expand=True to retain the old behaviour)
 
# You need to check your .add() calls, as previously they would behave as pack_start with expand=True, but now they will behave as expand=False (you need to change them to use pack_start with expand=True to retain the old behaviour)
 
# Every single pack_start call that has expand=False and padding=0 (and any value of fill) can be converted to .add() for cleanliness
 
# Every single pack_start call that has expand=False and padding=0 (and any value of fill) can be converted to .add() for cleanliness
 +
 +
=== GtkAlignment considerations ===
 +
 +
In PyGTK, the gtk.Alignment constructor takes four optional parameters:
 +
# xalign: the fraction of horizontal free space to the left of the child widget. Ranges from 0.0 to 1.0. Default value 0.0.
 +
# yalign: the fraction of vertical free space above the child widget. Ranges from 0.0 to 1.0. Default value 0.0.
 +
# xscale: the fraction of horizontal free space that the child widget absorbs, from 0.0 to 1.0. Default value 0.0.
 +
# yscale: the fraction of vertical free space that the child widget absorbs, from 0.0 to 1.0. Default value 0.0
 +
 +
In PyGI/GTK3, these parameters are still optional when used in the Gtk.Alignment constructor (as keyword arguments, as explained above). However, the default values have changed. They are now:
 +
# xalign: default value 0.5
 +
# yalign: default value 0.5
 +
# xscale: default value 1
 +
# yscale: default value 1
 +
 +
If your code was relying on the default value of 0 for any of these parameters in PyGTK, you will now need to explicitly specify that in your constructor. Similarly, if you were previously using construction parameters to select the now-default values, those parameters can be dropped.
 +
 +
Additionally, PyGTK accepted these construction parameters as positional arguments. As explained above, they must now be converted to keyword arguments.
    
==Make a release==
 
==Make a release==
105

edits