aboutsummaryrefslogtreecommitdiffstats
path: root/netx
diff options
context:
space:
mode:
authorDanesh Dadachanji <[email protected]>2011-08-17 12:01:19 -0400
committerDanesh Dadachanji <[email protected]>2011-08-17 12:01:19 -0400
commit3fdbc63fe69b247c9aaa49a322142a2085248095 (patch)
treed4962677682590f7eb6adc37c01444cd37976499 /netx
parent398354066e71dcfb716b03ed3e97a1f3f2ecbbb3 (diff)
Update UI for SecurityDialog.
Diffstat (limited to 'netx')
-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
3 files changed, 16 insertions, 5 deletions
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";