Rework functions in util.py

This commit is contained in:
DarkPhoenix
2010-09-05 17:41:09 +04:00
parent a31ea5f712
commit e6f24eaae5
4 changed files with 39 additions and 25 deletions

View File

@@ -21,7 +21,7 @@ from gui import builtinViewColumns
from gui.viewColumn import ViewColumn
from gui import bitmapLoader
import controller
from util import shorten
from util import formatAmount
class MaxRange(ViewColumn):
name = "Max range"
@@ -55,10 +55,10 @@ class MaxRange(ViewColumn):
if falloff is None:
falloff = ""
else:
falloff = "+%sm" % shorten(falloff, 3, 0, 3)
falloff = "+%sm" % formatAmount(falloff, 3, 0, 3)
if maxRange:
return "%sm%s" % (shorten(maxRange, 3, 0, 3), falloff)
return "%sm%s" % (formatAmount(maxRange, 3, 0, 3), falloff)
else:
return "" + falloff