Author: bombe
Date: 2006-08-09 21:12:25 +0000 (Wed, 09 Aug 2006)
New Revision: 10008
Modified:
trunk/freenet/src/freenet/clients/http/QueueToadlet.java
Log:
fix missing decimal digit in progress percentage
Modified: trunk/freenet/src/freenet/clients/http/QueueToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/QueueToadlet.java 2006-08-09
19:05:51 UTC (rev 10007)
+++ trunk/freenet/src/freenet/clients/http/QueueToadlet.java 2006-08-09
21:12:25 UTC (rev 10008)
@@ -479,9 +479,9 @@
NumberFormat nf = NumberFormat.getInstance();
nf.setMaximumFractionDigits(1);
if (finalized) {
- progressBar.addChild("div", new String[] {
"class", "title" }, new String[] { "progress_fraction_finalized", "finalized"
}, (int) ((fetched / (double) min) * 100) + "%");
+ progressBar.addChild("div", new String[] {
"class", "title" }, new String[] { "progress_fraction_finalized", "finalized"
}, nf.format((int) ((fetched / (double) min) * 1000) / 10.0) + "%");
} else {
- progressBar.addChild("div", new String[] {
"class", "title" }, new String[] { "progress_fraction_not_finalized", "not
finalized" }, (int) ((fetched / (double) min) * 100) + "%");
+ progressBar.addChild("div", new String[] {
"class", "title" }, new String[] { "progress_fraction_not_finalized", "not
finalized" }, nf.format((int) ((fetched / (double) min) * 1000) / 10.0)+ "%");
}
}
return progressCell;