Index: release-kits/shared/uninstaller/Uninstaller.java
===================================================================
--- release-kits/shared/uninstaller/Uninstaller.java	(revision 17794)
+++ release-kits/shared/uninstaller/Uninstaller.java	(revision 17805)
@@ -1,3 +1,3 @@
-	import java.util.ResourceBundle;
+import java.util.ResourceBundle;
 import java.awt.*;
 import java.awt.event.*;
@@ -14,22 +14,20 @@
 import javax.swing.Box;
 import javax.swing.JDialog;
+import javax.swing.JMenuItem;
+import javax.swing.JPopupMenu;
+
 import java.io.File;
 import java.io.BufferedReader;
 import java.io.FileReader;
-import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+
 import java.util.regex.Pattern;
 import java.util.regex.Matcher;
 import java.util.ArrayList;
 
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.io.FileNotFoundException;
-import java.io.FileWriter;
-import java.io.IOException;
-import javax.swing.JMenuItem;
-import javax.swing.JPopupMenu;
-import javax.swing.JTextArea;
+import javax.swing.SwingUtilities;
+
 
 public class Uninstaller {
@@ -61,8 +59,10 @@
 
 	JScrollPane logPane;
-	JTextArea log;
+	FollowingJTextArea log;
 	JButton uninstallButton;
+
+	boolean confirmationGiven = false;
+	Thread mainThread = null;
 	
-
 	public static void main( String[] args ) {
 		(new Uninstaller()).go();
@@ -70,4 +70,6 @@
 
 	public void go() {
+
+		mainThread = Thread.currentThread();
 
 		frame =  new JFrame();
@@ -91,5 +93,5 @@
 		logPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
 		progressPanel.add( BorderLayout.NORTH, new JLabel("Progress") );
-		progressPanel.add( BorderLayout.CENTER, log );
+		progressPanel.add( BorderLayout.CENTER, logPane );
 
 		//initial toolbar
@@ -148,4 +150,14 @@
 			System.exit(0);
 		}
+
+		//block and wait for signal to do the uninstall
+		do {
+			try {
+				Thread.sleep( Long.MAX_VALUE );
+			} catch ( InterruptedException ie ) {
+			}
+		} while ( !confirmationGiven );
+
+		doUninstall();
 
 	}
@@ -208,8 +220,11 @@
 			frame.getContentPane().remove(introPanel);
 			frame.getContentPane().add( BorderLayout.CENTER, progressPanel );
-			progressPanel.setVisible( true );
-
-			//start the unstinall
-			doUninstall();
+
+			initialToolbar.setVisible( false );
+			frame.getContentPane().remove( initialToolbar );
+			frame.getContentPane().add( BorderLayout.SOUTH, finishToolbar);
+
+			confirmationGiven = true;
+			mainThread.interrupt();
 		}
 	}
@@ -221,5 +236,5 @@
 
 		if ( !gs2InstallProps.exists() && !gs3InstallProps.exists() ) {
-			log.append( bundle.getString("uninstaller.error.couldnt.find.install.props") + "\n" );
+			log( bundle.getString("uninstaller.error.couldnt.find.install.props") + "\n" );
 			JOptionPane.showMessageDialog(frame, bundle.getString("uninstaller.error.couldnt.find.install.props"), bundle.getString("uninstaller.error"), 0);
 			return false;
@@ -227,4 +242,10 @@
 		return true;
 				
+	}
+
+	public void log( String s ) {
+		SwingUtilities.invokeLater( new LogAppender( s ) );
+		//log.append( s );
+		
 	}
 
@@ -257,13 +278,14 @@
 
 		if ( startMenuPath == null ) {
-			log.append( bundle.getString("uninstaller.info.no.startmenu") + "\n" );
-			log.repaint();
+
+			log( bundle.getString("uninstaller.info.no.startmenu") + "\n" );
+
 		} else {
-			log.append( "StartMenu Path: " + startMenuPath.getAbsolutePath() + "\n" );
-			log.repaint();
+			log( "StartMenu Path: " + startMenuPath.getAbsolutePath() + "\n" );
+
 			try {
 				recursiveDelete( startMenuPath, null );
 			} catch ( CancelledException ce ) {
-				log.append( bundle.getString("uninstaller.cancelled") + "\n" );
+				log( bundle.getString("uninstaller.cancelled") + "\n" );
 				changeToFinishToolbar();
 				JOptionPane.showMessageDialog(frame, bundle.getString("uninstaller.cancelled"), bundle.getString("uninstaller.complete"), 1);
@@ -310,6 +332,5 @@
 			recursiveDelete( cd , ex );
 		} catch ( CancelledException ce ) {
-			log.append( bundle.getString("uninstaller.cancelled") + "\n" );
-			log.repaint();
+			log( bundle.getString("uninstaller.cancelled") + "\n" );
 			JOptionPane.showMessageDialog(frame, bundle.getString("uninstaller.cancelled"), bundle.getString("uninstaller.complete"), 1);
 			changeToFinishToolbar();
@@ -321,10 +342,23 @@
 			(new File("uninst.flag")).createNewFile();
 		} catch (Exception e) {
-			log.append( bundle.getString("uninstaller.couldnt-create-flagfile") + "\n" );
-			log.repaint();
+			log( bundle.getString("uninstaller.couldnt-create-flagfile") + "\n" );
 		}
 
 		changeToFinishToolbar();
+		log( bundle.getString("uninstaller.finished") );
 		JOptionPane.showMessageDialog(frame, bundle.getString("uninstaller.finished"), bundle.getString("uninstaller.complete"), 1);
+	}
+
+	class LogAppender implements Runnable {
+		String s;
+
+		public LogAppender( String s ) {
+			this.s = s;
+		}
+
+		public void run() {
+			log.append( s );
+		}
+
 	}
 
@@ -373,6 +407,5 @@
 		// Make sure the file or directory exists
 		if (!f.exists()) {
-			log.append( Strings.replaceAll( bundle.getString("uninstaller.warning.nonexistent"), "{file}", f.getAbsolutePath() ) + "\n" );
-			log.repaint();
+			log( Strings.replaceAll( bundle.getString("uninstaller.warning.nonexistent"), "{file}", f.getAbsolutePath() ) + "\n" );
 			return;
 		}
@@ -384,5 +417,5 @@
 				try {
 					if ( f.equals( exceptions[i] ) || f.getCanonicalPath().equals(exceptions[i].getCanonicalPath()) ) {
-						log.append( Strings.replaceAll( bundle.getString("uninstaller.info.skipping"), "{file}", f.getAbsolutePath() ) + "\n" );
+						log( Strings.replaceAll( bundle.getString("uninstaller.info.skipping"), "{file}", f.getAbsolutePath() ) + "\n" );
 						return;
 					}
@@ -396,6 +429,5 @@
 		//check existance
 		if ( !f.exists() ) {
-			log.append( Strings.replaceAll( bundle.getString("uninstaller.error.nonexistent"), "{file}", f.getAbsolutePath() ) + "\n" );
-			log.repaint();
+			log( Strings.replaceAll( bundle.getString("uninstaller.error.nonexistent"), "{file}", f.getAbsolutePath() ) + "\n" );
 			return;
 		}
@@ -426,57 +458,9 @@
 			Object[] options = null;
 			int n = 0;
-			log.append( Strings.replaceAll( bundle.getString("uninstaller.deleting"), "{file}", f.getAbsolutePath() ) + "\n" );
-			log.repaint();
-			try{ Thread.sleep( 50 ); } catch( Exception e ) {}
-/*
-			//disable the uninstall button
-
-				options = new Object[1];
-				options = new Object[1];
-				options[0] = "OK";
-				n = JOptionPane.showOptionDialog(
-					frame,
-					"repainting",
-					"repainting",
-				    JOptionPane.OK_OPTION,
-				    JOptionPane.INFORMATION_MESSAGE,
-				    null,
-				    options,
-				    options[0]
-				);
-*/
-
-			while ( !f.delete() ) {
-				log.append( Strings.replaceAll( bundle.getString("uninstaller.warning.couldnt.delete"), "{file}", f.getAbsolutePath() ) + "\n" );
-				log.repaint();
-
-				if ( ignoreReadOnlys ) {
-					return;
-				}
-
-				options[0] = bundle.getString("uninstaller.retry");
-				options[1] = bundle.getString("uninstaller.skip");
-				options[2] = bundle.getString("uninstaller.skip.all");
-				options[3] = bundle.getString("uninstaller.cancel");
-				n = JOptionPane.showOptionDialog(
-					frame,
-					Strings.replaceAll( bundle.getString("uninstaller.warning.readonly"), "{file}", f.getAbsolutePath() ),
-					bundle.getString("uninstaller.readonly"),
-				    JOptionPane.YES_NO_CANCEL_OPTION,
-				    JOptionPane.QUESTION_MESSAGE,
-				    null,
-				    options,
-				    options[2]
-				);
-
-				if ( n == 3 ) {
-					throw new CancelledException();
-				} else if ( n == 1 ) {
-					return;
-				} else if ( n == 2 ) {
-					ignoreReadOnlys = true;
-					return;
-				}
-
+			log( Strings.replaceAll( bundle.getString("uninstaller.deleting"), "{file}", f.getAbsolutePath() ) + "\n" );
+
+			if ( !f.delete() ) {
+				log( "*********\n" + Strings.replaceAll( bundle.getString("uninstaller.warning.couldnt.delete"), "{file}", f.getAbsolutePath() ) + "\n*********\n" );
+				return;
 			}
 		}
@@ -511,8 +495,5 @@
 }
 
-
-
-
-class FollowingJTextArea extends JTextArea{
+class FollowingJTextArea extends JTextArea {
 
     private boolean follow = true;
@@ -561,28 +542,4 @@
     private JPopupMenu getPopupMenu() {
         JPopupMenu contextMenu = new JPopupMenu("Options");
-        JMenuItem saveMenu = new JMenuItem("Save Text");
-/*
-        saveMenu.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                SelectFileAction action = new SelectFileAction("Save Output", null, null);
-                try {
-                    action.actionPerformed(new ActionEvent(this, 0, "Save Output"));
-                    if (action.selectedFile != null) {
-                        FileWriter fos = new FileWriter(action.selectedFile);
-                        fos.write(getText());
-                        fos.close();
-                    }
-
-                }
-                catch (FileNotFoundException ex) {
-                    System.err.println("FileNotFoundException");
-                }
-                catch (IOException ex) {
-                    System.err.println("IOException");
-                }
-            }
-        });
-        contextMenu.add(saveMenu);
-*/
 
         JMenuItem toggleFollowMenu = new JMenuItem("Toggle Follow");
