changeset in /hg/icedtea: 2008-02-20 Joshua Sumali <jsumali at re...

Joshua Sumali jsumali at redhat.com
Thu May 29 14:12:00 PDT 2008


changeset 9202d7a4e6a5 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=9202d7a4e6a5
description:
	2008-02-20  Joshua Sumali  <jsumali at redhat.com>

	        * tools/netx/jnlp/security/CertWarningPane.java: Make run and cancel
	        buttons of equal width.
	        * tools/netx/jnlp/tools/KeyTool.java: Create new trusted.certs if
	        directory exists but file does not.

diffstat:

3 files changed, 19 insertions(+), 7 deletions(-)
ChangeLog                                     |    7 +++++++
tools/netx/jnlp/security/CertWarningPane.java |   10 ++++++----
tools/netx/jnlp/tools/KeyTool.java            |    9 ++++++---

diffs (54 lines):

diff -r abe7a24fb5ef -r 9202d7a4e6a5 ChangeLog
--- a/ChangeLog	Tue Feb 19 23:15:37 2008 -0500
+++ b/ChangeLog	Wed Feb 20 10:33:16 2008 -0500
@@ -1,3 +1,10 @@ 2008-02-19  Joshua Sumali  <jsumali at redh
+2008-02-20  Joshua Sumali  <jsumali at redhat.com>
+
+	* tools/netx/jnlp/security/CertWarningPane.java: Make run and cancel
+	buttons of equal width.
+	* tools/netx/jnlp/tools/KeyTool.java: Create new trusted.certs if
+	directory exists but file does not.
+
 2008-02-19  Joshua Sumali  <jsumali at redhat.com>
 
 	* tools/netx/jnlp/tools/KeyTool.java: Instantiate usercerts before trying to
diff -r abe7a24fb5ef -r 9202d7a4e6a5 tools/netx/jnlp/security/CertWarningPane.java
--- a/tools/netx/jnlp/security/CertWarningPane.java	Tue Feb 19 23:15:37 2008 -0500
+++ b/tools/netx/jnlp/security/CertWarningPane.java	Wed Feb 20 10:33:16 2008 -0500
@@ -141,11 +141,13 @@ public class CertWarningPane extends Sec
 
 		//run and cancel buttons
 		JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
-
-		String runButtonText = "Run";
-
-		JButton run = new JButton(runButtonText);
+		JButton run = new JButton("Run");
 		JButton cancel = new JButton("Cancel");
+		int buttonWidth = Math.max(run.getMinimumSize().width, cancel.getMinimumSize().width);
+		int buttonHeight = run.getMinimumSize().height;
+		Dimension d = new Dimension(buttonWidth, buttonHeight);
+		run.setPreferredSize(d);
+		cancel.setPreferredSize(d);
 		run.addActionListener(createButtonActionListener(0));
 		run.addActionListener(new CheckBoxListener());
 		cancel.addActionListener(createButtonActionListener(1));
diff -r abe7a24fb5ef -r 9202d7a4e6a5 tools/netx/jnlp/tools/KeyTool.java
--- a/tools/netx/jnlp/tools/KeyTool.java	Tue Feb 19 23:15:37 2008 -0500
+++ b/tools/netx/jnlp/tools/KeyTool.java	Wed Feb 20 10:33:16 2008 -0500
@@ -126,9 +126,12 @@ public class KeyTool {
 			boolean madeDir = false;
 			if (!certDir.isDirectory()) { //directory does not exist
 				madeDir = (new File(homeDir+certPath)).mkdirs();
-			}
-			
-			if (madeDir) {
+			} 
+		
+			// If we successfully made the directory,
+			// or the directory already exists (but the file does 
+			// not), then create the keystore.
+			if (madeDir || certDir.isDirectory()) {
 				usercerts = KeyStore.getInstance("JKS");
 				usercerts.load(null, password);
 				fos = new FileOutputStream(certFile);



More information about the distro-pkg-dev mailing list