version 0.4.9.1: 0.4.9.1
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Mon, 1 Oct 2007 21:32:33 +0000 (21:32 +0000)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Mon, 1 Oct 2007 21:32:33 +0000 (21:32 +0000)
show next version number on insert instead of current
add display of completed and total blocks to progress bar

src/de/todesbaum/jsite/gui/ProjectInsertPage.java
src/de/todesbaum/jsite/main/Version.java

index 1c7089d..2641fb0 100644 (file)
@@ -20,6 +20,7 @@
 package de.todesbaum.jsite.gui;
 
 import java.awt.BorderLayout;
+import java.awt.Font;
 import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
 import java.awt.Insets;
@@ -129,6 +130,7 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl
                wizard.setQuitEnabled(false);
                copyURIAction.setEnabled(false);
                progressBar.setValue(0);
+               progressBar.setFont(progressBar.getFont().deriveFont(Font.PLAIN));
                projectInserter.start();
        }
 
@@ -149,7 +151,7 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl
                SwingUtilities.invokeLater(new Runnable() {
 
                        public void run() {
-                               requestURITextField.setText(project.getFinalRequestURI(0));
+                               requestURITextField.setText(project.getFinalRequestURI(1));
                        }
                });
        }
@@ -196,6 +198,15 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl
                        public void run() {
                                progressBar.setMaximum(total);
                                progressBar.setValue(succeeded + failed + fatal);
+                               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(")");
+                               progressBar.setString(progressString.toString());
+                               if (finalized) {
+                                       progressBar.setFont(progressBar.getFont().deriveFont(Font.BOLD));
+                               }
                        }
                });
        }
@@ -217,6 +228,7 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl
 
                        public void run() {
                                progressBar.setValue(progressBar.getMaximum());
+                               progressBar.setString("Done");
                                wizard.setNextEnabled(true);
                                wizard.setQuitEnabled(true);
                        }
index f303c96..e44fafb 100644 (file)
@@ -25,7 +25,7 @@ package de.todesbaum.jsite.main;
  */
 public class Version {
 
-       private static final String VERSION = "0.4.9";
+       private static final String VERSION = "0.4.9.1";
 
        public static final String getVersion() {
                return VERSION;