Use accessor functions for data fields
The following data fields that were provided by PyGTK are not accessible directly in GTK3+pygi and need to be replaced by accessor calls: Adjustment.lower Adjustment.page_size Adjustment.upper Adjustment.value Bin.child Widget.parent Widget.style Widget.window Based on patches by Daniel Drake <dsd@laptop.org>. Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
This commit is contained in:
committed by
Simon Schampijer
parent
4aacaaf56e
commit
c82a775267
@@ -228,7 +228,7 @@ class _IconBuffer(object):
|
||||
self.fill_color = None
|
||||
|
||||
def _get_insensitive_pixbuf(self, pixbuf, widget):
|
||||
if not (widget and widget.style):
|
||||
if not (widget and widget.get_style()):
|
||||
return pixbuf
|
||||
|
||||
icon_source = Gtk.IconSource()
|
||||
@@ -239,9 +239,10 @@ class _IconBuffer(object):
|
||||
icon_source.set_direction_wildcarded(False)
|
||||
icon_source.set_size_wildcarded(False)
|
||||
|
||||
pixbuf = widget.style.render_icon(icon_source, widget.get_direction(),
|
||||
Gtk.StateType.INSENSITIVE, -1, widget,
|
||||
'sugar-icon')
|
||||
style = widget.get_style()
|
||||
pixbuf = style.render_icon(icon_source, widget.get_direction(),
|
||||
Gtk.StateType.INSENSITIVE, -1, widget,
|
||||
'sugar-icon')
|
||||
|
||||
return pixbuf
|
||||
|
||||
|
||||
Reference in New Issue
Block a user