aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--netx/net/sourceforge/jnlp/resources/question.pngbin0 -> 2528 bytes
-rw-r--r--netx/net/sourceforge/jnlp/security/CertWarningPane.java12
-rw-r--r--netx/net/sourceforge/jnlp/security/SecurityDialog.java9
4 files changed, 26 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index fd85980..f63d938 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2011-08-17 Danesh Dadachanji <[email protected]>
+ Update UI for SecurityDialog
+ * netx/net/sourceforge/jnlp/resources/question.png: New icon added.
+ * netx/net/sourceforge/jnlp/security/CertWarningPane.java:
+ (addComponents): When certs are verified, question.png is used as the icon
+ and SAlwaysTrustPublisher is automatically selected.
+ * netx/net/sourceforge/jnlp/security/SecurityDialog.java:
+ (initDialog): Changed the title of a CERT_WARNING dialog.
+
+2011-08-17 Danesh Dadachanji <[email protected]>
+
AUTHORS: Adding myself and Denis Lila. Removing the extra email from
Andrew Hughes.
diff --git a/netx/net/sourceforge/jnlp/resources/question.png b/netx/net/sourceforge/jnlp/resources/question.png
new file mode 100644
index 0000000..e8d57d6
--- /dev/null
+++ b/netx/net/sourceforge/jnlp/resources/question.png
Binary files differ
diff --git a/netx/net/sourceforge/jnlp/security/CertWarningPane.java b/netx/net/sourceforge/jnlp/security/CertWarningPane.java
index 383120d..79ad0ce 100644
--- a/netx/net/sourceforge/jnlp/security/CertWarningPane.java
+++ b/netx/net/sourceforge/jnlp/security/CertWarningPane.java
@@ -135,6 +135,8 @@ public class CertWarningPane extends SecurityDialogPanel {
//Top label
String topLabelText = "";
String propertyName = "";
+ String iconLocation = "net/sourceforge/jnlp/resources/";
+ boolean alwaysTrustSelected = false;
if (certVerifier instanceof HttpsCertVerifier) {
topLabelText = R("SHttpsUnverified") + " " +
R("Continue");
@@ -144,25 +146,30 @@ public class CertWarningPane extends SecurityDialogPanel {
case VERIFIED:
topLabelText = R("SSigVerified");
propertyName = "OptionPane.informationIcon";
+ iconLocation += "question.png";
+ alwaysTrustSelected = true;
break;
case UNVERIFIED:
topLabelText = R("SSigUnverified");
propertyName = "OptionPane.warningIcon";
+ iconLocation += "warning.png";
break;
case SIGNING_ERROR:
topLabelText = R("SSignatureError");
propertyName = "OptionPane.warningIcon";
+ iconLocation += "warning.png";
break;
}
+
ImageIcon icon = new ImageIcon((new sun.misc.Launcher())
- .getClassLoader().getResource("net/sourceforge/jnlp/resources/warning.png"));
+ .getClassLoader().getResource(iconLocation));
JLabel topLabel = new JLabel(htmlWrap(topLabelText), icon, SwingConstants.LEFT);
topLabel.setFont(new Font(topLabel.getFont().toString(),
Font.BOLD, 12));
JPanel topPanel = new JPanel(new BorderLayout());
topPanel.setBackground(Color.WHITE);
topPanel.add(topLabel, BorderLayout.CENTER);
- topPanel.setPreferredSize(new Dimension(400, 60));
+ topPanel.setPreferredSize(new Dimension(400, 75));
topPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
//application info
@@ -175,6 +182,7 @@ public class CertWarningPane extends SecurityDialogPanel {
alwaysTrust = new JCheckBox(R("SAlwaysTrustPublisher"));
alwaysTrust.setEnabled(true);
+ alwaysTrust.setSelected(alwaysTrustSelected);
JPanel infoPanel = new JPanel(new GridLayout(4, 1));
infoPanel.add(nameLabel);
diff --git a/netx/net/sourceforge/jnlp/security/SecurityDialog.java b/netx/net/sourceforge/jnlp/security/SecurityDialog.java
index 2fc201d..1988e5e 100644
--- a/netx/net/sourceforge/jnlp/security/SecurityDialog.java
+++ b/netx/net/sourceforge/jnlp/security/SecurityDialog.java
@@ -207,9 +207,12 @@ public class SecurityDialog extends JDialog {
setSystemLookAndFeel();
String dialogTitle = "";
- if (dialogType == DialogType.CERT_WARNING)
- dialogTitle = "Warning - Security";
- else if (dialogType == DialogType.MORE_INFO)
+ if (dialogType == DialogType.CERT_WARNING) {
+ if (accessType == AccessType.VERIFIED)
+ dialogTitle = "Security Approval Required";
+ else
+ dialogTitle = "Security Warning";
+ } else if (dialogType == DialogType.MORE_INFO)
dialogTitle = "More Information";
else if (dialogType == DialogType.CERT_INFO)
dialogTitle = "Details - Certificate";