Updated all apps and widgets with explicit safely marked strings

This commit is contained in:
Roberto Rosario
2011-07-01 20:53:37 -04:00
parent a0b2e5f864
commit f0f0f4fc2e
17 changed files with 119 additions and 86 deletions

View File

@@ -103,20 +103,6 @@ def pretty_size_10(size):
])
def exists_with_famfam(path):
try:
return two_state_template(os.path.exists(path))
except Exception, exc:
return exc
def two_state_template(state, famfam_ok_icon=u'tick', famfam_fail_icon=u'cross'):
if state:
return u'<span class="famfam active famfam-%s"></span>' % famfam_ok_icon
else:
return u'<span class="famfam active famfam-%s"></span>' % famfam_fail_icon
# The code here is based loosely on John Cardinal's notes found at:
# http://www.johncardinal.com/tmgutil/capitalizenames.htm