Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar3/graphics/icon.py
diff options
context:
space:
mode:
authorSascha Silbe <silbe@activitycentral.com>2011-11-15 20:32:03 (GMT)
committer Simon Schampijer <simon@schampijer.de>2011-12-13 20:19:53 (GMT)
commitc82a775267dc9fb1dd3c9078cc5251035ff844c7 (patch)
tree783d6726e3598beb4c8a601ee018ecd8f29af291 /src/sugar3/graphics/icon.py
parent4aacaaf56e209c193327bd88c991acf30cf295f5 (diff)
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>
Diffstat (limited to 'src/sugar3/graphics/icon.py')
-rw-r--r--src/sugar3/graphics/icon.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
index 6a3df85..2bd5106 100644
--- a/src/sugar3/graphics/icon.py
+++ b/src/sugar3/graphics/icon.py
@@ -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