mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-13 22:48:07 -05:00
Add new setting davmail.defaultDomain to set default windows domain
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@920 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
49afb4b02a
commit
6b232b7b52
@ -84,6 +84,12 @@ public final class ExchangeSessionFactory {
|
||||
ExchangeSession session = null;
|
||||
try {
|
||||
String baseUrl = Settings.getProperty("davmail.url");
|
||||
|
||||
// prepend default windows domain prefix
|
||||
String defaultDomain = Settings.getProperty("davmail.defaultDomain");
|
||||
if (userName.indexOf('\\') < 0 && defaultDomain != null && defaultDomain.length() > 0) {
|
||||
userName = defaultDomain + '\\' + userName;
|
||||
}
|
||||
PoolKey poolKey = new PoolKey(baseUrl, userName, password);
|
||||
|
||||
synchronized (LOCK) {
|
||||
|
@ -83,6 +83,7 @@ public class SettingsFrame extends JFrame {
|
||||
|
||||
JTextField caldavAlarmSoundField;
|
||||
JCheckBox forceActiveSyncUpdateField;
|
||||
JTextField defaultDomainField;
|
||||
|
||||
protected void addSettingComponent(JPanel panel, String label, JComponent component) {
|
||||
addSettingComponent(panel, label, component, null);
|
||||
@ -343,17 +344,20 @@ public class SettingsFrame extends JFrame {
|
||||
}
|
||||
|
||||
protected JPanel getOtherSettingsPanel() {
|
||||
JPanel otherSettingsPanel = new JPanel(new GridLayout(2, 2));
|
||||
JPanel otherSettingsPanel = new JPanel(new GridLayout(3, 2));
|
||||
otherSettingsPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_OTHER")));
|
||||
|
||||
caldavAlarmSoundField = new JTextField(Settings.getProperty("davmail.caldavAlarmSound"), 15);
|
||||
forceActiveSyncUpdateField = new JCheckBox();
|
||||
forceActiveSyncUpdateField.setSelected(Settings.getBooleanProperty("davmail.forceActiveSyncUpdate"));
|
||||
defaultDomainField = new JTextField(Settings.getProperty("davmail.defaultDomain"), 15);
|
||||
|
||||
addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_CALDAV_ALARM_SOUND"), caldavAlarmSoundField,
|
||||
BundleMessage.format("UI_CALDAV_ALARM_SOUND_HELP"));
|
||||
addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_FORCE_ACTIVESYNC_UPDATE"), forceActiveSyncUpdateField,
|
||||
BundleMessage.format("UI_FORCE_ACTIVESYNC_UPDATE_HELP"));
|
||||
addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_DEFAULT_DOMAIN"), defaultDomainField,
|
||||
BundleMessage.format("UI_DEFAULT_DOMAIN_HELP"));
|
||||
|
||||
Dimension preferredSize = otherSettingsPanel.getPreferredSize();
|
||||
preferredSize.width = Integer.MAX_VALUE;
|
||||
@ -440,6 +444,7 @@ public class SettingsFrame extends JFrame {
|
||||
|
||||
caldavAlarmSoundField.setText(Settings.getProperty("davmail.caldavAlarmSound"));
|
||||
forceActiveSyncUpdateField.setSelected(Settings.getBooleanProperty("davmail.forceActiveSyncUpdate"));
|
||||
defaultDomainField.setText(Settings.getProperty("davmail.defaultDomain"));
|
||||
|
||||
keystoreTypeCombo.setSelectedItem(Settings.getProperty("davmail.ssl.keystoreType"));
|
||||
keystoreFileField.setText(Settings.getProperty("davmail.ssl.keystoreFile"));
|
||||
@ -547,6 +552,7 @@ public class SettingsFrame extends JFrame {
|
||||
|
||||
Settings.setProperty("davmail.caldavAlarmSound", String.valueOf(caldavAlarmSoundField.getText()));
|
||||
Settings.setProperty("davmail.forceActiveSyncUpdate", String.valueOf(forceActiveSyncUpdateField.isSelected()));
|
||||
Settings.setProperty("davmail.defaultDomain", String.valueOf(defaultDomainField.getText()));
|
||||
|
||||
Settings.setProperty("davmail.ssl.keystoreType", (String) keystoreTypeCombo.getSelectedItem());
|
||||
Settings.setProperty("davmail.ssl.keystoreFile", keystoreFileField.getText());
|
||||
|
@ -243,4 +243,6 @@ 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
|
||||
UI_FORCE_ACTIVESYNC_UPDATE=Force ActiveSync update:
|
||||
UI_FORCE_ACTIVESYNC_UPDATE_HELP=Force update of Caldav events for ActiveSync connected devices
|
||||
UI_FORCE_ACTIVESYNC_UPDATE_HELP=Force update of Caldav events for ActiveSync connected devices
|
||||
UI_DEFAULT_DOMAIN=Default domain:
|
||||
UI_DEFAULT_DOMAIN_HELP=Default windows domain name
|
||||
|
@ -243,4 +243,6 @@ 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
|
||||
UI_FORCE_ACTIVESYNC_UPDATE=Forcer ActiveSync :
|
||||
UI_FORCE_ACTIVESYNC_UPDATE_HELP=Forcer la mise à jour des évènements Caldav pour les appareils connectés via ActiveSync
|
||||
UI_FORCE_ACTIVESYNC_UPDATE_HELP=Forcer la mise à jour des évènements Caldav pour les appareils connectés via ActiveSync
|
||||
UI_DEFAULT_DOMAIN=Domaine par défaut :
|
||||
UI_DEFAULT_DOMAIN_HELP=Nom du domaine windows par défaut
|
@ -81,6 +81,11 @@
|
||||
<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>Default domain</td>
|
||||
<td>Default windows domain name</td>
|
||||
<td>DOMAIN</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Key store type</td>
|
||||
<td>Choose key store type</td>
|
||||
|
Loading…
Reference in New Issue
Block a user