Add new Default button to reset log levels

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1822 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2011-10-18 20:36:23 +00:00
parent 4cd1d27670
commit 3bb0613801
3 changed files with 16 additions and 0 deletions

View File

@ -470,11 +470,23 @@ public class SettingsFrame extends JFrame {
addSettingComponent(logFilePathPanel, BundleMessage.format("UI_LOG_FILE_PATH"), logFilePathField);
addSettingComponent(logFilePathPanel, BundleMessage.format("UI_LOG_FILE_SIZE"), logFileSizeField);
JButton defaultButton = new JButton(BundleMessage.format("UI_BUTTON_DEFAULT"));
defaultButton.setToolTipText(BundleMessage.format("UI_BUTTON_DEFAULT_HELP"));
defaultButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
rootLoggingLevelField.setSelectedItem(Level.WARN);
davmailLoggingLevelField.setSelectedItem(Level.DEBUG);
httpclientLoggingLevelField.setSelectedItem(Level.WARN);
wireLoggingLevelField.setSelectedItem(Level.WARN);
}
});
JPanel loggingPanel = new JPanel();
loggingPanel.setLayout(new BoxLayout(loggingPanel, BoxLayout.Y_AXIS));
loggingPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_LOGGING_LEVELS")));
loggingPanel.add(logFilePathPanel);
loggingPanel.add(loggingLevelPanel);
loggingPanel.add(defaultButton);
updateMaximumSize(loggingPanel);
return loggingPanel;

View File

@ -150,6 +150,8 @@ UI_BUTTON_DENY=Deny
UI_BUTTON_HELP=Help
UI_BUTTON_OK=OK
UI_BUTTON_SAVE=Save
UI_BUTTON_DEFAULT=Default
UI_BUTTON_DEFAULT_HELP=Reset default logging levels
UI_CALDAV_PORT=Caldav HTTP port:
UI_CALDAV_PORT_HELP=Local Caldav server port to configure in Caldav (calendar) client
UI_CALENDAR_PAST_EVENTS=Calendar past events (Caldav):

View File

@ -139,6 +139,8 @@ UI_BUTTON_DENY=Refuser
UI_BUTTON_HELP=Aide
UI_BUTTON_OK=OK
UI_BUTTON_SAVE=Enregistrer
UI_BUTTON_DEFAULT=Défaut
UI_BUTTON_DEFAULT_HELP=Réinitialiser les niveaux de trace par défaut
UI_CALDAV_PORT=Port HTTP Caldav :
UI_CALDAV_PORT_HELP=Port local Caldav à configurer dans le client Caldav (agenda)
UI_CALENDAR_PAST_EVENTS=Jours passés du calendrier (Caldav) :