From 49afb4b02a15033c85e92637e173e1ac69cf0ef9 Mon Sep 17 00:00:00 2001 From: mguessan Date: Wed, 20 Jan 2010 20:58:25 +0000 Subject: [PATCH] Caldav: add davmail.forceActiveSyncUpdate option to the settings frame git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@919 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/Settings.java | 1 + src/java/davmail/ui/SettingsFrame.java | 11 ++++++++++- src/java/davmailmessages.properties | 2 ++ src/java/davmailmessages_fr.properties | 6 ++++-- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/java/davmail/Settings.java b/src/java/davmail/Settings.java index d65abe9e..f76f4c51 100644 --- a/src/java/davmail/Settings.java +++ b/src/java/davmail/Settings.java @@ -126,6 +126,7 @@ public final class Settings { SETTINGS.put("davmail.server", Boolean.FALSE.toString()); SETTINGS.put("davmail.server.certificate.hash", ""); SETTINGS.put("davmail.caldavAlarmSound", ""); + SETTINGS.put("davmail.forceActiveSyncUpdate", "Boolean.FALSE.toString()"); SETTINGS.put("davmail.ssl.keystoreType", ""); SETTINGS.put("davmail.ssl.keystoreFile", ""); SETTINGS.put("davmail.ssl.keystorePass", ""); diff --git a/src/java/davmail/ui/SettingsFrame.java b/src/java/davmail/ui/SettingsFrame.java index fb88fdca..c27071e3 100644 --- a/src/java/davmail/ui/SettingsFrame.java +++ b/src/java/davmail/ui/SettingsFrame.java @@ -82,6 +82,7 @@ public class SettingsFrame extends JFrame { JTextField logFilePathField; JTextField caldavAlarmSoundField; + JCheckBox forceActiveSyncUpdateField; protected void addSettingComponent(JPanel panel, String label, JComponent component) { addSettingComponent(panel, label, component, null); @@ -342,13 +343,18 @@ public class SettingsFrame extends JFrame { } protected JPanel getOtherSettingsPanel() { - JPanel otherSettingsPanel = new JPanel(new GridLayout(1, 2)); + JPanel otherSettingsPanel = new JPanel(new GridLayout(2, 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")); 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")); + Dimension preferredSize = otherSettingsPanel.getPreferredSize(); preferredSize.width = Integer.MAX_VALUE; updateMaximumSize(otherSettingsPanel); @@ -433,6 +439,7 @@ public class SettingsFrame extends JFrame { disableUpdateCheck.setSelected(Settings.getBooleanProperty(("davmail.disableUpdateCheck"))); caldavAlarmSoundField.setText(Settings.getProperty("davmail.caldavAlarmSound")); + forceActiveSyncUpdateField.setSelected(Settings.getBooleanProperty("davmail.forceActiveSyncUpdate")); keystoreTypeCombo.setSelectedItem(Settings.getProperty("davmail.ssl.keystoreType")); keystoreFileField.setText(Settings.getProperty("davmail.ssl.keystoreFile")); @@ -537,7 +544,9 @@ 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.forceActiveSyncUpdate", String.valueOf(forceActiveSyncUpdateField.isSelected())); Settings.setProperty("davmail.ssl.keystoreType", (String) keystoreTypeCombo.getSelectedItem()); Settings.setProperty("davmail.ssl.keystoreFile", keystoreFileField.getText()); diff --git a/src/java/davmailmessages.properties b/src/java/davmailmessages.properties index dbf2f9c5..8810b958 100644 --- a/src/java/davmailmessages.properties +++ b/src/java/davmailmessages.properties @@ -242,3 +242,5 @@ 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 +UI_FORCE_ACTIVESYNC_UPDATE=Force ActiveSync update: +UI_FORCE_ACTIVESYNC_UPDATE_HELP=Force update of Caldav events for ActiveSync connected devices \ No newline at end of file diff --git a/src/java/davmailmessages_fr.properties b/src/java/davmailmessages_fr.properties index 87af3b58..1de9a55d 100644 --- a/src/java/davmailmessages_fr.properties +++ b/src/java/davmailmessages_fr.properties @@ -240,5 +240,7 @@ 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_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 \ No newline at end of file +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 \ No newline at end of file