Bug#636620: gir1.2-gtk-3.0: No way to get a style property in python
Daniel Trebbien
dtrebbien at gmail.com
Thu Jan 26 19:47:56 UTC 2012
To get a style property, you now need to pass in a Value object (which
wraps a GValue). Here, for example, is PyGObject code to access the
"shadow-type" style property of `widget`:
shadow_type_val = GObject.Value()
shadow_type_val.init(Gtk.ShadowType)
widget.style_get_property("shadow-type", shadow_type_val)
self.frame.set_shadow_type(shadow_type_val.get_enum())
There are more examples of accessing Gtk.Widget style properties at:
http://consciouslyusing.blogspot.com/2012/01/coding-aligning-widgets-with.html
Daniel Trebbien
More information about the pkg-gnome-maintainers
mailing list