wok annotate singularity/stuff/percents-0.30b.patch @ rev 10822

Up: vlc to 1.1.10. Security Update.
author Christopher Rogers <slaxemulator@gmail.com>
date Mon Jun 06 13:17:39 2011 +0000 (2011-06-06)
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.