1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-14 11:42:23 -05:00

GUI: Fix client certificate setting switch

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@939 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-02-08 20:44:42 +00:00
parent c9dc4de5ef
commit 21844fe61e

View File

@ -295,8 +295,7 @@ public class SettingsFrame extends JFrame {
BundleMessage.format("UI_CLIENT_KEY_STORE_HELP")); BundleMessage.format("UI_CLIENT_KEY_STORE_HELP"));
addSettingComponent(clientKeystoreFilePanel, BundleMessage.format("UI_CLIENT_KEY_STORE_PASSWORD"), clientKeystorePassField, addSettingComponent(clientKeystoreFilePanel, BundleMessage.format("UI_CLIENT_KEY_STORE_PASSWORD"), clientKeystorePassField,
BundleMessage.format("UI_CLIENT_KEY_STORE_PASSWORD_HELP")); BundleMessage.format("UI_CLIENT_KEY_STORE_PASSWORD_HELP"));
cardPanel.add(clientKeystoreFilePanel, "PKCS12"); cardPanel.add(clientKeystoreFilePanel, "FILE");
cardPanel.add(clientKeystoreFilePanel, "JKS");
JPanel pkcs11Panel = new JPanel(new GridLayout(2, 2)); JPanel pkcs11Panel = new JPanel(new GridLayout(2, 2));
addSettingComponent(pkcs11Panel, BundleMessage.format("UI_PKCS11_LIBRARY"), pkcs11LibraryField, addSettingComponent(pkcs11Panel, BundleMessage.format("UI_PKCS11_LIBRARY"), pkcs11LibraryField,
@ -310,7 +309,11 @@ public class SettingsFrame extends JFrame {
clientKeystoreTypeCombo.addItemListener(new ItemListener() { clientKeystoreTypeCombo.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent event) { public void itemStateChanged(ItemEvent event) {
CardLayout cardLayout = (CardLayout) (cardPanel.getLayout()); CardLayout cardLayout = (CardLayout) (cardPanel.getLayout());
cardLayout.show(cardPanel, (String) event.getItem()); if ("PKCS11".equals((String) event.getItem())) {
cardLayout.show(cardPanel, "PKCS11");
} else {
cardLayout.show(cardPanel, "FILE");
}
} }
}); });
updateMaximumSize(clientKeystorePanel); updateMaximumSize(clientKeystorePanel);