Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Dengler <martin@martindengler.com>2008-06-23 11:58:46 (GMT)
committer Martin Dengler <martin@martindengler.com>2008-06-23 13:34:51 (GMT)
commit1403f7d26d53c89457ee6cf3b0535247c7e163e6 (patch)
tree94ab42ae9b52ac3b6d5ae23eb81ee1ef47ad1aa3 /src
parentdcd212f168cfd3eb7bcfa14d073b87a9380d0e5e (diff)
get_icon_name() now takes step kwarg for #7248.1
Diffstat (limited to 'src')
-rw-r--r--src/sugar/graphics/icon.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sugar/graphics/icon.py b/src/sugar/graphics/icon.py
index d22b412..24b5ca5 100644
--- a/src/sugar/graphics/icon.py
+++ b/src/sugar/graphics/icon.py
@@ -580,8 +580,8 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
palette = property(get_palette, set_palette)
-def get_icon_state(base_name, perc):
- step = 5
+def get_icon_state(base_name, perc, step=5):
+ assert step > 0, 'get_icon_state(): step must be positive\n'
strength = round(perc / step) * step
icon_theme = gtk.icon_theme_get_default()