mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
Implement a new option to let users disable all GUI notifications
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1819 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
28b3001317
commit
a4629730cb
@ -153,6 +153,7 @@ public final class Settings {
|
||||
SETTINGS.put("davmail.caldavAlarmSound", "");
|
||||
SETTINGS.put("davmail.forceActiveSyncUpdate", Boolean.FALSE.toString());
|
||||
SETTINGS.put("davmail.showStartupBanner", Boolean.TRUE.toString());
|
||||
SETTINGS.put("davmail.disableGuiNotifications", Boolean.FALSE.toString());
|
||||
SETTINGS.put("davmail.imapAutoExpunge", Boolean.TRUE.toString());
|
||||
SETTINGS.put("davmail.smtpSaveInSent", Boolean.TRUE.toString());
|
||||
SETTINGS.put("davmail.ssl.keystoreType", "");
|
||||
|
@ -96,6 +96,7 @@ public class SettingsFrame extends JFrame {
|
||||
JCheckBox forceActiveSyncUpdateCheckBox;
|
||||
JTextField defaultDomainField;
|
||||
JCheckBox showStartupBannerCheckBox;
|
||||
JCheckBox disableGuiNotificationsCheckBox;
|
||||
JCheckBox imapAutoExpungeCheckBox;
|
||||
JCheckBox enableEwsCheckBox;
|
||||
JCheckBox smtpSaveInSentCheckBox;
|
||||
@ -392,7 +393,7 @@ public class SettingsFrame extends JFrame {
|
||||
}
|
||||
|
||||
protected JPanel getOtherSettingsPanel() {
|
||||
JPanel otherSettingsPanel = new JPanel(new GridLayout(9, 2));
|
||||
JPanel otherSettingsPanel = new JPanel(new GridLayout(10, 2));
|
||||
otherSettingsPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_OTHER")));
|
||||
|
||||
enableEwsCheckBox = new JCheckBox();
|
||||
@ -405,6 +406,8 @@ public class SettingsFrame extends JFrame {
|
||||
defaultDomainField = new JTextField(Settings.getProperty("davmail.defaultDomain"), 15);
|
||||
showStartupBannerCheckBox = new JCheckBox();
|
||||
showStartupBannerCheckBox.setSelected(Settings.getBooleanProperty("davmail.showStartupBanner", true));
|
||||
disableGuiNotificationsCheckBox = new JCheckBox();
|
||||
disableGuiNotificationsCheckBox.setSelected(Settings.getBooleanProperty("davmail.disableGuiNotifications", false));
|
||||
imapAutoExpungeCheckBox = new JCheckBox();
|
||||
imapAutoExpungeCheckBox.setSelected(Settings.getBooleanProperty("davmail.imapAutoExpunge", true));
|
||||
smtpSaveInSentCheckBox = new JCheckBox();
|
||||
@ -424,6 +427,8 @@ public class SettingsFrame extends JFrame {
|
||||
BundleMessage.format("UI_DEFAULT_DOMAIN_HELP"));
|
||||
addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_SHOW_STARTUP_BANNER"), showStartupBannerCheckBox,
|
||||
BundleMessage.format("UI_SHOW_STARTUP_BANNER_HELP"));
|
||||
addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_DISABLE_GUI_NOTIFICATIONS"), disableGuiNotificationsCheckBox,
|
||||
BundleMessage.format("UI_DISABLE_GUI_NOTIFICATIONS_HELP"));
|
||||
addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_IMAP_AUTO_EXPUNGE"), imapAutoExpungeCheckBox,
|
||||
BundleMessage.format("UI_IMAP_AUTO_EXPUNGE_HELP"));
|
||||
addSettingComponent(otherSettingsPanel, BundleMessage.format("UI_SAVE_IN_SENT"), smtpSaveInSentCheckBox,
|
||||
@ -530,6 +535,7 @@ public class SettingsFrame extends JFrame {
|
||||
forceActiveSyncUpdateCheckBox.setSelected(Settings.getBooleanProperty("davmail.forceActiveSyncUpdate"));
|
||||
defaultDomainField.setText(Settings.getProperty("davmail.defaultDomain"));
|
||||
showStartupBannerCheckBox.setSelected(Settings.getBooleanProperty("davmail.showStartupBanner", true));
|
||||
disableGuiNotificationsCheckBox.setSelected(Settings.getBooleanProperty("davmail.disableGuiNotifications", false));
|
||||
imapAutoExpungeCheckBox.setSelected(Settings.getBooleanProperty("davmail.imapAutoExpunge", true));
|
||||
enableEwsCheckBox.setSelected(Settings.getBooleanProperty("davmail.enableEws", false));
|
||||
smtpSaveInSentCheckBox.setSelected(Settings.getBooleanProperty("davmail.smtpSaveInSent", true));
|
||||
@ -672,6 +678,7 @@ public class SettingsFrame extends JFrame {
|
||||
Settings.setProperty("davmail.forceActiveSyncUpdate", String.valueOf(forceActiveSyncUpdateCheckBox.isSelected()));
|
||||
Settings.setProperty("davmail.defaultDomain", String.valueOf(defaultDomainField.getText()));
|
||||
Settings.setProperty("davmail.showStartupBanner", String.valueOf(showStartupBannerCheckBox.isSelected()));
|
||||
Settings.setProperty("davmail.disableGuiNotifications", String.valueOf(disableGuiNotificationsCheckBox.isSelected()));
|
||||
Settings.setProperty("davmail.imapAutoExpunge", String.valueOf(imapAutoExpungeCheckBox.isSelected()));
|
||||
Settings.setProperty("davmail.enableEws", String.valueOf(enableEwsCheckBox.isSelected()));
|
||||
Settings.setProperty("davmail.smtpSaveInSent", String.valueOf(smtpSaveInSentCheckBox.isSelected()));
|
||||
|
@ -94,7 +94,7 @@ public final class DavGatewayTray {
|
||||
*/
|
||||
private static void displayMessage(BundleMessage message, Level level) {
|
||||
LOGGER.log(level, message.formatLog());
|
||||
if (davGatewayTray != null) {
|
||||
if (davGatewayTray != null && !Settings.getBooleanProperty("davmail.disableGuiNotifications")) {
|
||||
davGatewayTray.displayMessage(message.format(), level);
|
||||
}
|
||||
}
|
||||
@ -112,7 +112,7 @@ public final class DavGatewayTray {
|
||||
} else {
|
||||
LOGGER.log(level, BundleMessage.getExceptionLogMessage(message, e), e);
|
||||
}
|
||||
if (davGatewayTray != null
|
||||
if (davGatewayTray != null && !Settings.getBooleanProperty("davmail.disableGuiNotifications")
|
||||
&& (!(e instanceof NetworkDownException))) {
|
||||
davGatewayTray.displayMessage(BundleMessage.getExceptionMessage(message, e), level);
|
||||
}
|
||||
|
@ -251,6 +251,8 @@ UI_DEFAULT_DOMAIN_HELP=Default windows domain name
|
||||
UI_USE_SYSTEM_PROXIES=Use system proxy settings:
|
||||
UI_SHOW_STARTUP_BANNER=Display startup banner
|
||||
UI_SHOW_STARTUP_BANNER_HELP=Whether to show the initial startup notification window or not
|
||||
UI_DISABLE_GUI_NOTIFICATIONS=Disable balloon notifications
|
||||
UI_DISABLE_GUI_NOTIFICATIONS_HELP=Disable all graphical notifications
|
||||
UI_IMAP_AUTO_EXPUNGE=IMAP auto expunge:
|
||||
UI_IMAP_AUTO_EXPUNGE_HELP=Delete messages immediately on the server over IMAP
|
||||
UI_IMAP_IDLE_DELAY=IDLE folder monitor delay (IMAP):
|
||||
|
@ -251,6 +251,8 @@ EXCEPTION_INVALID_PARAMETER=Param
|
||||
UI_USE_SYSTEM_PROXIES=Utiliser la configuration système :
|
||||
UI_SHOW_STARTUP_BANNER=Notification au lancement :
|
||||
UI_SHOW_STARTUP_BANNER_HELP=Afficher ou non la fenêtre de notification au démarrage
|
||||
UI_DISABLE_GUI_NOTIFICATIONS=Désactiver notifications graphiques
|
||||
UI_DISABLE_GUI_NOTIFICATIONS_HELP=Supprimer toutes les notifications graphiques
|
||||
LOG_READ_CLIENT_AUTH_LOGIN=< AUTH LOGIN ********
|
||||
UI_IMAP_IDLE_DELAY=Délai de surveillance dossier (IMAP) :
|
||||
UI_IMAP_IDLE_DELAY_HELP=Délai de surveillance du dossier IMAP en minutes, laisser vide pour désactiver le support IDLE
|
||||
|
Loading…
x
Reference in New Issue
Block a user