Add approximated insert speed to progress bar text.
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Thu, 9 Oct 2008 00:05:53 +0000 (02:05 +0200)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Thu, 9 Oct 2008 00:05:53 +0000 (02:05 +0200)
src/de/todesbaum/jsite/gui/ProjectInsertPage.java

index 7a3ccac..4024e7e 100644 (file)
@@ -291,8 +291,10 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl
                                int progress = (succeeded + failed + fatal) * 100 / total;
                                StringBuilder progressString = new StringBuilder();
                                progressString.append(progress).append("% (");
-                               progressString.append(succeeded + failed + fatal).append("/").append(total);
-                               progressString.append(")");
+                               progressString.append(succeeded + failed + fatal).append('/').append(total);
+                               progressString.append(") (");
+                               progressString.append(formatNumber(total * 32.0 / ((System.currentTimeMillis() - startTime) / 1000), 1));
+                               progressString.append(' ').append(I18n.getMessage("jsite.insert.k-per-s")).append(')');
                                progressBar.setString(progressString.toString());
                                if (finalized) {
                                        progressBar.setFont(progressBar.getFont().deriveFont(Font.BOLD));