mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-14 19:52:21 -05:00
Caldav: add davmail.caldavAlarmSound option to the settings frame (used to force conversion of Caldav alarms to AUDIO supported by iCal)
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@918 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
d83fb699ca
commit
35c754939a
@ -125,6 +125,7 @@ public final class Settings {
|
||||
SETTINGS.put("davmail.proxyPassword", "");
|
||||
SETTINGS.put("davmail.server", Boolean.FALSE.toString());
|
||||
SETTINGS.put("davmail.server.certificate.hash", "");
|
||||
SETTINGS.put("davmail.caldavAlarmSound", "");
|
||||
SETTINGS.put("davmail.ssl.keystoreType", "");
|
||||
SETTINGS.put("davmail.ssl.keystoreFile", "");
|
||||
SETTINGS.put("davmail.ssl.keystorePass", "");
|
||||
|
@ -81,6 +81,8 @@ public class SettingsFrame extends JFrame {
|
||||
JComboBox wireLoggingLevelField;
|
||||
JTextField logFilePathField;
|
||||
|
||||
JTextField caldavAlarmSoundField;
|
||||
|
||||
protected void addSettingComponent(JPanel panel, String label, JComponent component) {
|
||||
addSettingComponent(panel, label, component, null);
|
||||
}
|
||||
@ -236,6 +238,7 @@ public class SettingsFrame extends JFrame {
|
||||
addSettingComponent(proxyPanel, BundleMessage.format("UI_PROXY_PORT"), httpProxyPortField);
|
||||
addSettingComponent(proxyPanel, BundleMessage.format("UI_PROXY_USER"), httpProxyUserField);
|
||||
addSettingComponent(proxyPanel, BundleMessage.format("UI_PROXY_PASSWORD"), httpProxyPasswordField);
|
||||
updateMaximumSize(proxyPanel);
|
||||
return proxyPanel;
|
||||
}
|
||||
|
||||
@ -257,7 +260,7 @@ public class SettingsFrame extends JFrame {
|
||||
BundleMessage.format("UI_KEY_STORE_PASSWORD_HELP"));
|
||||
addSettingComponent(keyStorePanel, BundleMessage.format("UI_KEY_PASSWORD"), keyPassField,
|
||||
BundleMessage.format("UI_KEY_PASSWORD_HELP"));
|
||||
|
||||
updateMaximumSize(keyStorePanel);
|
||||
return keyStorePanel;
|
||||
}
|
||||
|
||||
@ -308,6 +311,7 @@ public class SettingsFrame extends JFrame {
|
||||
cardLayout.show(cardPanel, (String) event.getItem());
|
||||
}
|
||||
});
|
||||
updateMaximumSize(clientKeystorePanel);
|
||||
return clientKeystorePanel;
|
||||
}
|
||||
|
||||
@ -333,10 +337,24 @@ public class SettingsFrame extends JFrame {
|
||||
BundleMessage.format("UI_SERVER_CERTIFICATE_HASH_HELP"));
|
||||
addSettingComponent(networkSettingsPanel, BundleMessage.format("UI_DISABLE_UPDATE_CHECK"), disableUpdateCheck,
|
||||
BundleMessage.format("UI_DISABLE_UPDATE_CHECK_HELP"));
|
||||
networkSettingsPanel.setMaximumSize(networkSettingsPanel.getPreferredSize());
|
||||
updateMaximumSize(networkSettingsPanel);
|
||||
return networkSettingsPanel;
|
||||
}
|
||||
|
||||
protected JPanel getOtherSettingsPanel() {
|
||||
JPanel otherSettingsPanel = new JPanel(new GridLayout(1, 2));
|
||||
otherSettingsPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_OTHER")));
|
||||
|
||||
caldavAlarmSoundField = new JTextField(Settings.getProperty("davmail.caldavAlarmSound"), 15);
|
||||
|
||||
addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_CALDAV_ALARM_SOUND"), caldavAlarmSoundField,
|
||||
BundleMessage.format("UI_CALDAV_ALARM_SOUND_HELP"));
|
||||
Dimension preferredSize = otherSettingsPanel.getPreferredSize();
|
||||
preferredSize.width = Integer.MAX_VALUE;
|
||||
updateMaximumSize(otherSettingsPanel);
|
||||
return otherSettingsPanel;
|
||||
}
|
||||
|
||||
protected JPanel getLoggingSettingsPanel() {
|
||||
JPanel loggingLevelPanel = new JPanel();
|
||||
JPanel leftLoggingPanel = new JPanel(new GridLayout(2, 2));
|
||||
@ -369,10 +387,16 @@ public class SettingsFrame extends JFrame {
|
||||
loggingPanel.add(logFilePathPanel);
|
||||
loggingPanel.add(loggingLevelPanel);
|
||||
|
||||
loggingPanel.setMaximumSize(loggingPanel.getPreferredSize());
|
||||
updateMaximumSize(loggingPanel);
|
||||
return loggingPanel;
|
||||
}
|
||||
|
||||
protected void updateMaximumSize(JPanel panel) {
|
||||
Dimension preferredSize = panel.getPreferredSize();
|
||||
preferredSize.width = Integer.MAX_VALUE;
|
||||
panel.setMaximumSize(preferredSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reload settings from properties.
|
||||
*/
|
||||
@ -408,6 +432,8 @@ public class SettingsFrame extends JFrame {
|
||||
certHashField.setText(Settings.getProperty("davmail.server.certificate.hash"));
|
||||
disableUpdateCheck.setSelected(Settings.getBooleanProperty(("davmail.disableUpdateCheck")));
|
||||
|
||||
caldavAlarmSoundField.setText(Settings.getProperty("davmail.caldavAlarmSound"));
|
||||
|
||||
keystoreTypeCombo.setSelectedItem(Settings.getProperty("davmail.ssl.keystoreType"));
|
||||
keystoreFileField.setText(Settings.getProperty("davmail.ssl.keystoreFile"));
|
||||
keystorePassField.setText(Settings.getProperty("davmail.ssl.keystorePass"));
|
||||
@ -460,8 +486,9 @@ public class SettingsFrame extends JFrame {
|
||||
JPanel encryptionPanel = new JPanel();
|
||||
encryptionPanel.setLayout(new BoxLayout(encryptionPanel, BoxLayout.Y_AXIS));
|
||||
encryptionPanel.add(getKeystorePanel());
|
||||
// empty panel
|
||||
encryptionPanel.add(getSmartCardPanel());
|
||||
// empty panel
|
||||
encryptionPanel.add(new JPanel());
|
||||
tabbedPane.add(BundleMessage.format("UI_TAB_ENCRYPTION"), encryptionPanel);
|
||||
|
||||
JPanel loggingPanel = new JPanel();
|
||||
@ -476,6 +503,7 @@ public class SettingsFrame extends JFrame {
|
||||
advancedPanel.setLayout(new BoxLayout(advancedPanel, BoxLayout.Y_AXIS));
|
||||
|
||||
advancedPanel.add(getNetworkSettingsPanel());
|
||||
advancedPanel.add(getOtherSettingsPanel());
|
||||
// empty panel
|
||||
advancedPanel.add(new JPanel());
|
||||
|
||||
@ -509,6 +537,8 @@ public class SettingsFrame extends JFrame {
|
||||
Settings.setProperty("davmail.allowRemote", String.valueOf(allowRemoteField.isSelected()));
|
||||
Settings.setProperty("davmail.server.certificate.hash", certHashField.getText());
|
||||
Settings.setProperty("davmail.disableUpdateCheck", String.valueOf(disableUpdateCheck.isSelected()));
|
||||
Settings.setProperty("davmail.caldavAlarmSound", String.valueOf(caldavAlarmSoundField.getText()));
|
||||
|
||||
Settings.setProperty("davmail.ssl.keystoreType", (String) keystoreTypeCombo.getSelectedItem());
|
||||
Settings.setProperty("davmail.ssl.keystoreFile", keystoreFileField.getText());
|
||||
Settings.setProperty("davmail.ssl.keystorePass", String.valueOf(keystorePassField.getPassword()));
|
||||
|
@ -238,4 +238,7 @@ LOG_FOLDER_NOT_FOUND=Folder {0} not found
|
||||
LOG_FOLDER_ACCESS_FORBIDDEN=Folder access to {0} forbidden
|
||||
LOG_FOLDER_ACCESS_ERROR=Folder access to {0} error: {1}
|
||||
UI_OTP_PASSWORD_PROMPT=One Time (token) Password:
|
||||
UI_TAB_LOGGING=Logging
|
||||
UI_TAB_LOGGING=Logging
|
||||
UI_OTHER=Other
|
||||
UI_CALDAV_ALARM_SOUND=Caldav alarm sound:
|
||||
UI_CALDAV_ALARM_SOUND_HELP=Convert Caldav alarm to sound alarm supported by iCal, e.g. Basso
|
||||
|
@ -238,4 +238,7 @@ UI_CLIENT_KEY_STORE=Fichier certificat client :
|
||||
UI_CLIENT_KEY_STORE_HELP=Chemin du fichier contenant le certificat client SSL
|
||||
UI_CLIENT_KEY_STORE_PASSWORD=Mot de passe certificat client :
|
||||
UI_CLIENT_KEY_STORE_PASSWORD_HELP=Mot de passe du certificat client, laisser vide pour fournir le mot de passe mode interactif
|
||||
UI_TAB_LOGGING=Traces
|
||||
UI_TAB_LOGGING=Traces
|
||||
UI_OTHER=Autres
|
||||
UI_CALDAV_ALARM_SOUND=Son des alarmes Caldav:
|
||||
UI_CALDAV_ALARM_SOUND_HELP=Convertir les alarmes Caldav en alarmes sonores supportées par iCal, par exemple Basso
|
@ -76,6 +76,11 @@
|
||||
<td>Allow remote connections to the gateway (server mode)</td>
|
||||
<td>false</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Caldav alarm sound</td>
|
||||
<td>Convert Caldav alarm to sound alarm supported by iCal, e.g. Basso. Leave empty for no conversion</td>
|
||||
<td>Basso</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Key store type</td>
|
||||
<td>Choose key store type</td>
|
||||
|
Loading…
Reference in New Issue
Block a user