Mercurial > hg > release > icedtea6-1.2
changeset 722:9202d7a4e6a5 cacao
2008-02-20 Joshua Sumali <jsumali@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.
author | Joshua Sumali <jsumali@redhat.com> |
---|---|
date | Wed, 20 Feb 2008 10:33:16 -0500 |
parents | abe7a24fb5ef |
children | 385ef9e9c25f |
files | ChangeLog tools/netx/jnlp/security/CertWarningPane.java tools/netx/jnlp/tools/KeyTool.java |
diffstat | 3 files changed, 19 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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-20 Joshua Sumali <jsumali@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@redhat.com> * tools/netx/jnlp/tools/KeyTool.java: Instantiate usercerts before trying to
--- 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 @@ //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));
--- 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 @@ 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);