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:
parent
c9dc4de5ef
commit
21844fe61e
@ -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,
|
||||||
@ -305,12 +304,16 @@ public class SettingsFrame extends JFrame {
|
|||||||
BundleMessage.format("UI_PKCS11_CONFIG_HELP"));
|
BundleMessage.format("UI_PKCS11_CONFIG_HELP"));
|
||||||
cardPanel.add(pkcs11Panel, "PKCS11");
|
cardPanel.add(pkcs11Panel, "PKCS11");
|
||||||
|
|
||||||
((CardLayout)cardPanel.getLayout()).show(cardPanel, (String) clientKeystoreTypeCombo.getSelectedItem());
|
((CardLayout) cardPanel.getLayout()).show(cardPanel, (String) clientKeystoreTypeCombo.getSelectedItem());
|
||||||
|
|
||||||
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user