Rename new setting to davmail.enableKeepalive and include in settings GUI

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2144 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2013-06-13 13:51:39 +00:00
parent 53819c01e8
commit 3540a9f387
9 changed files with 64 additions and 41 deletions

View File

@ -57,6 +57,9 @@ davmail.ssl.nosecuresmtp=false
# disable update check # disable update check
davmail.disableUpdateCheck=true davmail.disableUpdateCheck=true
# Send keepalive character during large folder and messages download
davmail.enableKeepalive=false
############################################################# #############################################################
# Caldav settings # Caldav settings

View File

@ -138,6 +138,7 @@ public final class Settings {
SETTINGS.put("davmail.sentKeepDelay", "90"); SETTINGS.put("davmail.sentKeepDelay", "90");
SETTINGS.put("davmail.caldavPastDelay", "90"); SETTINGS.put("davmail.caldavPastDelay", "90");
SETTINGS.put("davmail.imapIdleDelay", ""); SETTINGS.put("davmail.imapIdleDelay", "");
SETTINGS.put("davmail.enableKeepAlive", Boolean.FALSE.toString());
SETTINGS.put("davmail.allowRemote", Boolean.FALSE.toString()); SETTINGS.put("davmail.allowRemote", Boolean.FALSE.toString());
SETTINGS.put("davmail.bindAddress", ""); SETTINGS.put("davmail.bindAddress", "");
SETTINGS.put("davmail.useSystemProxies", Boolean.FALSE.toString()); SETTINGS.put("davmail.useSystemProxies", Boolean.FALSE.toString());

View File

@ -66,7 +66,7 @@ public class FolderLoadThread extends Thread {
while (!folderLoadThread.isComplete) { while (!folderLoadThread.isComplete) {
folderLoadThread.join(20000); folderLoadThread.join(20000);
LOGGER.debug("Still loading " + folder.folderPath + " (" + folder.count() + " messages)"); LOGGER.debug("Still loading " + folder.folderPath + " (" + folder.count() + " messages)");
if (Settings.getBooleanProperty("davmail.imapEnableKeepalive", false)) { if (Settings.getBooleanProperty("davmail.enableKeepAlive", false)) {
try { try {
outputStream.write(' '); outputStream.write(' ');
outputStream.flush(); outputStream.flush();

View File

@ -58,7 +58,7 @@ public class MessageLoadThread extends Thread {
while (!messageLoadThread.isComplete) { while (!messageLoadThread.isComplete) {
messageLoadThread.join(10000); messageLoadThread.join(10000);
LOGGER.debug("Still loading uid " + message.getUid() + " imapUid " + message.getImapUid()); LOGGER.debug("Still loading uid " + message.getUid() + " imapUid " + message.getImapUid());
if (Settings.getBooleanProperty("davmail.imapEnableKeepalive", false)) { if (Settings.getBooleanProperty("davmail.enableKeepAlive", false)) {
try { try {
outputStream.write(' '); outputStream.write(' ');
outputStream.flush(); outputStream.flush();

View File

@ -61,49 +61,50 @@ public class SettingsFrame extends JFrame {
protected JTextField caldavPastDelayField; protected JTextField caldavPastDelayField;
protected JTextField imapIdleDelayField; protected JTextField imapIdleDelayField;
JCheckBox useSystemProxiesField; protected JCheckBox useSystemProxiesField;
JCheckBox enableProxyField; protected JCheckBox enableProxyField;
JTextField httpProxyField; protected JTextField httpProxyField;
JTextField httpProxyPortField; protected JTextField httpProxyPortField;
JTextField httpProxyUserField; protected JTextField httpProxyUserField;
JTextField httpProxyPasswordField; protected JTextField httpProxyPasswordField;
JTextField noProxyForField; protected JTextField noProxyForField;
JCheckBox allowRemoteField; protected JCheckBox allowRemoteField;
JTextField bindAddressField; protected JTextField bindAddressField;
JTextField clientSoTimeoutField; protected JTextField clientSoTimeoutField;
JTextField certHashField; protected JTextField certHashField;
JCheckBox disableUpdateCheck; protected JCheckBox disableUpdateCheck;
JComboBox keystoreTypeCombo; protected JComboBox keystoreTypeCombo;
JTextField keystoreFileField; protected JTextField keystoreFileField;
JPasswordField keystorePassField; protected JPasswordField keystorePassField;
JPasswordField keyPassField; protected JPasswordField keyPassField;
JComboBox clientKeystoreTypeCombo; protected JComboBox clientKeystoreTypeCombo;
JTextField clientKeystoreFileField; protected JTextField clientKeystoreFileField;
JPasswordField clientKeystorePassField; protected JPasswordField clientKeystorePassField;
JTextField pkcs11LibraryField; protected JTextField pkcs11LibraryField;
JTextArea pkcs11ConfigField; protected JTextArea pkcs11ConfigField;
JComboBox rootLoggingLevelField; protected JComboBox rootLoggingLevelField;
JComboBox davmailLoggingLevelField; protected JComboBox davmailLoggingLevelField;
JComboBox httpclientLoggingLevelField; protected JComboBox httpclientLoggingLevelField;
JComboBox wireLoggingLevelField; protected JComboBox wireLoggingLevelField;
JTextField logFilePathField; protected JTextField logFilePathField;
JTextField logFileSizeField; protected JTextField logFileSizeField;
JCheckBox caldavEditNotificationsField; protected JCheckBox caldavEditNotificationsField;
JTextField caldavAlarmSoundField; protected JTextField caldavAlarmSoundField;
JCheckBox forceActiveSyncUpdateCheckBox; protected JCheckBox forceActiveSyncUpdateCheckBox;
JTextField defaultDomainField; protected JTextField defaultDomainField;
JCheckBox showStartupBannerCheckBox; protected JCheckBox showStartupBannerCheckBox;
JCheckBox disableGuiNotificationsCheckBox; protected JCheckBox disableGuiNotificationsCheckBox;
JCheckBox imapAutoExpungeCheckBox; protected JCheckBox imapAutoExpungeCheckBox;
JCheckBox popMarkReadOnRetrCheckBox; protected JCheckBox enableKeepAliveCheckBox;
JComboBox enableEwsComboBox; protected JCheckBox popMarkReadOnRetrCheckBox;
JCheckBox enableKerberosCheckBox; protected JComboBox enableEwsComboBox;
JCheckBox smtpSaveInSentCheckBox; protected JCheckBox enableKerberosCheckBox;
protected JCheckBox smtpSaveInSentCheckBox;
JCheckBox osxHideFromDockCheckBox; JCheckBox osxHideFromDockCheckBox;
@ -425,7 +426,7 @@ public class SettingsFrame extends JFrame {
} }
protected JPanel getOtherSettingsPanel() { protected JPanel getOtherSettingsPanel() {
JPanel otherSettingsPanel = new JPanel(new GridLayout(11, 2)); JPanel otherSettingsPanel = new JPanel(new GridLayout(12, 2));
otherSettingsPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_OTHER"))); otherSettingsPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_OTHER")));
enableKerberosCheckBox = new JCheckBox(); enableKerberosCheckBox = new JCheckBox();
@ -442,6 +443,8 @@ public class SettingsFrame extends JFrame {
disableGuiNotificationsCheckBox.setSelected(Settings.getBooleanProperty("davmail.disableGuiNotifications", false)); disableGuiNotificationsCheckBox.setSelected(Settings.getBooleanProperty("davmail.disableGuiNotifications", false));
imapAutoExpungeCheckBox = new JCheckBox(); imapAutoExpungeCheckBox = new JCheckBox();
imapAutoExpungeCheckBox.setSelected(Settings.getBooleanProperty("davmail.imapAutoExpunge", true)); imapAutoExpungeCheckBox.setSelected(Settings.getBooleanProperty("davmail.imapAutoExpunge", true));
enableKeepAliveCheckBox = new JCheckBox();
enableKeepAliveCheckBox.setSelected(Settings.getBooleanProperty("davmail.enableKeepAlive", false));
popMarkReadOnRetrCheckBox = new JCheckBox(); popMarkReadOnRetrCheckBox = new JCheckBox();
popMarkReadOnRetrCheckBox.setSelected(Settings.getBooleanProperty("davmail.popMarkReadOnRetr", false)); popMarkReadOnRetrCheckBox.setSelected(Settings.getBooleanProperty("davmail.popMarkReadOnRetr", false));
smtpSaveInSentCheckBox = new JCheckBox(); smtpSaveInSentCheckBox = new JCheckBox();
@ -465,6 +468,8 @@ public class SettingsFrame extends JFrame {
BundleMessage.format("UI_DISABLE_GUI_NOTIFICATIONS_HELP")); BundleMessage.format("UI_DISABLE_GUI_NOTIFICATIONS_HELP"));
addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_IMAP_AUTO_EXPUNGE"), imapAutoExpungeCheckBox, addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_IMAP_AUTO_EXPUNGE"), imapAutoExpungeCheckBox,
BundleMessage.format("UI_IMAP_AUTO_EXPUNGE_HELP")); BundleMessage.format("UI_IMAP_AUTO_EXPUNGE_HELP"));
addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_ENABLE_KEEPALIVE"), enableKeepAliveCheckBox,
BundleMessage.format("UI_ENABLE_KEEPALIVE_HELP"));
addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_POP_MARK_READ"), popMarkReadOnRetrCheckBox, addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_POP_MARK_READ"), popMarkReadOnRetrCheckBox,
BundleMessage.format("UI_POP_MARK_READ_HELP")); BundleMessage.format("UI_POP_MARK_READ_HELP"));
addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_SAVE_IN_SENT"), smtpSaveInSentCheckBox, addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_SAVE_IN_SENT"), smtpSaveInSentCheckBox,
@ -600,6 +605,7 @@ public class SettingsFrame extends JFrame {
showStartupBannerCheckBox.setSelected(Settings.getBooleanProperty("davmail.showStartupBanner", true)); showStartupBannerCheckBox.setSelected(Settings.getBooleanProperty("davmail.showStartupBanner", true));
disableGuiNotificationsCheckBox.setSelected(Settings.getBooleanProperty("davmail.disableGuiNotifications", false)); disableGuiNotificationsCheckBox.setSelected(Settings.getBooleanProperty("davmail.disableGuiNotifications", false));
imapAutoExpungeCheckBox.setSelected(Settings.getBooleanProperty("davmail.imapAutoExpunge", true)); imapAutoExpungeCheckBox.setSelected(Settings.getBooleanProperty("davmail.imapAutoExpunge", true));
enableKeepAliveCheckBox.setSelected(Settings.getBooleanProperty("davmail.enableKeepAlive", false));
popMarkReadOnRetrCheckBox.setSelected(Settings.getBooleanProperty("davmail.popMarkReadOnRetrCheckBox", false)); popMarkReadOnRetrCheckBox.setSelected(Settings.getBooleanProperty("davmail.popMarkReadOnRetrCheckBox", false));
setEwsModeSelectedItem(Settings.getProperty("davmail.enableEws", "auto")); setEwsModeSelectedItem(Settings.getProperty("davmail.enableEws", "auto"));
smtpSaveInSentCheckBox.setSelected(Settings.getBooleanProperty("davmail.smtpSaveInSent", true)); smtpSaveInSentCheckBox.setSelected(Settings.getBooleanProperty("davmail.smtpSaveInSent", true));
@ -761,6 +767,7 @@ public class SettingsFrame extends JFrame {
Settings.setProperty("davmail.showStartupBanner", String.valueOf(showStartupBannerCheckBox.isSelected())); Settings.setProperty("davmail.showStartupBanner", String.valueOf(showStartupBannerCheckBox.isSelected()));
Settings.setProperty("davmail.disableGuiNotifications", String.valueOf(disableGuiNotificationsCheckBox.isSelected())); Settings.setProperty("davmail.disableGuiNotifications", String.valueOf(disableGuiNotificationsCheckBox.isSelected()));
Settings.setProperty("davmail.imapAutoExpunge", String.valueOf(imapAutoExpungeCheckBox.isSelected())); Settings.setProperty("davmail.imapAutoExpunge", String.valueOf(imapAutoExpungeCheckBox.isSelected()));
Settings.setProperty("davmail.enableKeepAlive", String.valueOf(enableKeepAliveCheckBox.isSelected()));
Settings.setProperty("davmail.popMarkReadOnRetr", String.valueOf(popMarkReadOnRetrCheckBox.isSelected())); Settings.setProperty("davmail.popMarkReadOnRetr", String.valueOf(popMarkReadOnRetrCheckBox.isSelected()));
String selectedEwsMode = (String) enableEwsComboBox.getSelectedItem(); String selectedEwsMode = (String) enableEwsComboBox.getSelectedItem();
String enableEws; String enableEws;

View File

@ -268,6 +268,8 @@ UI_DISABLE_GUI_NOTIFICATIONS=Disable balloon notifications
UI_DISABLE_GUI_NOTIFICATIONS_HELP=Disable all graphical notifications UI_DISABLE_GUI_NOTIFICATIONS_HELP=Disable all graphical notifications
UI_IMAP_AUTO_EXPUNGE=IMAP auto expunge: UI_IMAP_AUTO_EXPUNGE=IMAP auto expunge:
UI_IMAP_AUTO_EXPUNGE_HELP=Delete messages immediately on the server over IMAP UI_IMAP_AUTO_EXPUNGE_HELP=Delete messages immediately on the server over IMAP
UI_ENABLE_KEEPALIVE=Enable KeepAlive:
UI_ENABLE_KEEPALIVE_HELP=Send KeepAlive character during large folder and messages download
UI_POP_MARK_READ=POP mark read: UI_POP_MARK_READ=POP mark read:
UI_POP_MARK_READ_HELP=Mark messages read on server immediately after retrieval UI_POP_MARK_READ_HELP=Mark messages read on server immediately after retrieval
UI_IMAP_IDLE_DELAY=IDLE folder monitor delay (IMAP): UI_IMAP_IDLE_DELAY=IDLE folder monitor delay (IMAP):

View File

@ -272,6 +272,8 @@ UI_IMAP_IDLE_DELAY=D
UI_IMAP_IDLE_DELAY_HELP=Délai de surveillance du dossier IMAP en minutes, laisser vide pour désactiver le support IDLE UI_IMAP_IDLE_DELAY_HELP=Délai de surveillance du dossier IMAP en minutes, laisser vide pour désactiver le support IDLE
UI_IMAP_AUTO_EXPUNGE=IMAP suppression immédiate : UI_IMAP_AUTO_EXPUNGE=IMAP suppression immédiate :
UI_IMAP_AUTO_EXPUNGE_HELP=Supprimer immédiatement les messages du serveur via IMAP UI_IMAP_AUTO_EXPUNGE_HELP=Supprimer immédiatement les messages du serveur via IMAP
UI_ENABLE_KEEPALIVE=Activer KeepAlive :
UI_ENABLE_KEEPALIVE_HELP=Envoyer caractère KeepAlive pendant le chargement des dossiers et messages de taille importante
UI_POP_MARK_READ=POP marquer lu : UI_POP_MARK_READ=POP marquer lu :
UI_POP_MARK_READ_HELP=Marquer les messages lus sur le serveur immédiatement après chargement UI_POP_MARK_READ_HELP=Marquer les messages lus sur le serveur immédiatement après chargement
EXCEPTION_EWS_NOT_AVAILABLE=Point d''accès EWS non disponible EXCEPTION_EWS_NOT_AVAILABLE=Point d''accès EWS non disponible

View File

@ -78,6 +78,11 @@
<td>Client connection timeout in seconds, 0 to disable timeout, empty for 5 minutes</td> <td>Client connection timeout in seconds, 0 to disable timeout, empty for 5 minutes</td>
<td>300</td> <td>300</td>
</tr> </tr>
<tr>
<td>Enable KeepAlive</td>
<td>Send KeepAlive character during large folder and messages download</td>
<td>false</td>
</tr>
</table> </table>
</subsection> </subsection>
<subsection name="Encryption"> <subsection name="Encryption">

View File

@ -87,6 +87,9 @@ davmail.ssl.nosecuresmtp=false
# disable update check # disable update check
davmail.disableUpdateCheck=true davmail.disableUpdateCheck=true
# Send keepalive character during large folder and messages download
davmail.enableKeepalive=false
############################################################# #############################################################
# Caldav settings # Caldav settings