mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-13 06:28:19 -05:00
SWT: fix 2992428, hide instead of dispose on close
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1328 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
76ced7915b
commit
bd12bbd30e
@ -46,7 +46,7 @@ public class AboutFrame extends JFrame {
|
|||||||
* About frame.
|
* About frame.
|
||||||
*/
|
*/
|
||||||
public AboutFrame() {
|
public AboutFrame() {
|
||||||
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
|
||||||
setTitle(BundleMessage.format("UI_ABOUT_DAVMAIL"));
|
setTitle(BundleMessage.format("UI_ABOUT_DAVMAIL"));
|
||||||
setIconImage(DavGatewayTray.getFrameIcon());
|
setIconImage(DavGatewayTray.getFrameIcon());
|
||||||
try {
|
try {
|
||||||
@ -81,7 +81,7 @@ public class AboutFrame extends JFrame {
|
|||||||
} catch (URISyntaxException e) {
|
} catch (URISyntaxException e) {
|
||||||
DavGatewayTray.error(new BundleMessage("LOG_UNABLE_TO_OPEN_LINK"), e);
|
DavGatewayTray.error(new BundleMessage("LOG_UNABLE_TO_OPEN_LINK"), e);
|
||||||
}
|
}
|
||||||
dispose();
|
setVisible(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -95,7 +95,7 @@ public class AboutFrame extends JFrame {
|
|||||||
JButton ok = new JButton(BundleMessage.format("UI_BUTTON_OK"));
|
JButton ok = new JButton(BundleMessage.format("UI_BUTTON_OK"));
|
||||||
ActionListener close = new ActionListener() {
|
ActionListener close = new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent evt) {
|
public void actionPerformed(ActionEvent evt) {
|
||||||
dispose();
|
setVisible(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
ok.addActionListener(close);
|
ok.addActionListener(close);
|
||||||
|
@ -126,13 +126,13 @@ public class AcceptCertificateDialog extends JDialog {
|
|||||||
accept.addActionListener(new ActionListener() {
|
accept.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent evt) {
|
public void actionPerformed(ActionEvent evt) {
|
||||||
accepted = true;
|
accepted = true;
|
||||||
dispose();
|
setVisible(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
deny.addActionListener(new ActionListener() {
|
deny.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent evt) {
|
public void actionPerformed(ActionEvent evt) {
|
||||||
accepted = false;
|
accepted = false;
|
||||||
dispose();
|
setVisible(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ public class PasswordPromptDialog extends JDialog {
|
|||||||
passwordField.addActionListener(new ActionListener() {
|
passwordField.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
password = passwordField.getPassword();
|
password = passwordField.getPassword();
|
||||||
dispose();
|
setVisible(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
JPanel passwordPanel = new JPanel();
|
JPanel passwordPanel = new JPanel();
|
||||||
@ -102,13 +102,13 @@ public class PasswordPromptDialog extends JDialog {
|
|||||||
okButton.addActionListener(new ActionListener() {
|
okButton.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent evt) {
|
public void actionPerformed(ActionEvent evt) {
|
||||||
password = passwordField.getPassword();
|
password = passwordField.getPassword();
|
||||||
dispose();
|
setVisible(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
cancelButton.addActionListener(new ActionListener() {
|
cancelButton.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent evt) {
|
public void actionPerformed(ActionEvent evt) {
|
||||||
password = null;
|
password = null;
|
||||||
dispose();
|
setVisible(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -506,7 +506,7 @@ public class SettingsFrame extends JFrame {
|
|||||||
* DavMail settings frame.
|
* DavMail settings frame.
|
||||||
*/
|
*/
|
||||||
public SettingsFrame() {
|
public SettingsFrame() {
|
||||||
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
|
||||||
setTitle(BundleMessage.format("UI_DAVMAIL_SETTINGS"));
|
setTitle(BundleMessage.format("UI_DAVMAIL_SETTINGS"));
|
||||||
setIconImage(DavGatewayTray.getFrameIcon());
|
setIconImage(DavGatewayTray.getFrameIcon());
|
||||||
|
|
||||||
@ -615,7 +615,7 @@ public class SettingsFrame extends JFrame {
|
|||||||
Settings.setLoggingLevel("httpclient.wire", (Level) wireLoggingLevelField.getSelectedItem());
|
Settings.setLoggingLevel("httpclient.wire", (Level) wireLoggingLevelField.getSelectedItem());
|
||||||
Settings.setProperty("davmail.logFilePath", logFilePathField.getText());
|
Settings.setProperty("davmail.logFilePath", logFilePathField.getText());
|
||||||
|
|
||||||
dispose();
|
setVisible(false);
|
||||||
Settings.save();
|
Settings.save();
|
||||||
// restart listeners with new config
|
// restart listeners with new config
|
||||||
DavGateway.restart();
|
DavGateway.restart();
|
||||||
@ -626,7 +626,7 @@ public class SettingsFrame extends JFrame {
|
|||||||
cancel.addActionListener(new ActionListener() {
|
cancel.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent evt) {
|
public void actionPerformed(ActionEvent evt) {
|
||||||
reload();
|
reload();
|
||||||
dispose();
|
setVisible(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user