Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/graphics/icon.py
diff options
context:
space:
mode:
authorSimon Schampijer <erikos@beet.localdomain>2009-02-16 15:06:38 (GMT)
committer Simon Schampijer <erikos@beet.localdomain>2009-02-16 15:06:38 (GMT)
commit780efa55b07e165af6664a16d193d22860b22dd6 (patch)
treedf760ac1e94f0f0b31f7561a2e31c0fc63a0cdd6 /src/sugar/graphics/icon.py
parent997c384405095f943df6f658b636e4106a81159d (diff)
NamingAlert: Icon dependent on the entry type #353
Diffstat (limited to 'src/sugar/graphics/icon.py')
-rw-r--r--src/sugar/graphics/icon.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sugar/graphics/icon.py b/src/sugar/graphics/icon.py
index f901519..6057652 100644
--- a/src/sugar/graphics/icon.py
+++ b/src/sugar/graphics/icon.py
@@ -926,3 +926,13 @@ def get_icon_state(base_name, perc, step=5):
return icon_name
strength = strength + step
+
+def get_icon_file_name(icon_name):
+ icon_theme = gtk.icon_theme_get_default()
+ info = icon_theme.lookup_icon(icon_name, gtk.ICON_SIZE_LARGE_TOOLBAR, 0)
+ if not info:
+ return None
+ filename = info.get_filename()
+ del info
+ return filename
+