wok-6.x annotate singularity/stuff/percents-0.30b.patch @ rev 8036
Replaced libxfce4menu to garcon in xfce4 depends.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu Jan 20 02:46:49 2011 +0000 (2011-01-20) |
parents | |
children |
rev | line source |
---|---|
gokhlayeh@6960 | 1 --- singularity-0.30b/code/g.py |
gokhlayeh@6960 | 2 +++ singularity-0.30b/code/g.py |
gokhlayeh@6960 | 3 @@ -265,9 +265,9 @@ |
gokhlayeh@6960 | 4 def to_percent(raw_percent, show_full = False): |
gokhlayeh@6960 | 5 locale_name, encoding = locale.getlocale() |
gokhlayeh@6960 | 6 if raw_percent % 100 != 0 or show_full: |
gokhlayeh@6960 | 7 - return locale.format("%.2f%%", raw_percent / 100.).decode(encoding) |
gokhlayeh@6960 | 8 + return locale.format("%.2f", raw_percent / 100.).decode(encoding) |
gokhlayeh@6960 | 9 else: |
gokhlayeh@6960 | 10 - return locale.format("%d%%", raw_percent // 100).decode(encoding) |
gokhlayeh@6960 | 11 + return locale.format("%d", raw_percent // 100).decode(encoding) |
gokhlayeh@6960 | 12 |
gokhlayeh@6960 | 13 # nearest_percent takes values in the internal representation and modifies |
gokhlayeh@6960 | 14 # them so that they only represent the nearest percentage. |