syncdir esc fixed
This commit is contained in:
parent
bc95ce2e39
commit
2d264b683e
@ -40,6 +40,12 @@ public class SyncDirectoriesDialog extends JDialog {
|
|||||||
if (getBounds().x == -1) setLocationRelativeTo(owner);
|
if (getBounds().x == -1) setLocationRelativeTo(owner);
|
||||||
applyAppearance();
|
applyAppearance();
|
||||||
|
|
||||||
|
// Close on ESC
|
||||||
|
getRootPane().registerKeyboardAction(e -> {
|
||||||
|
saveSettings();
|
||||||
|
dispose();
|
||||||
|
}, KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
|
||||||
|
|
||||||
addWindowListener(new WindowAdapter() {
|
addWindowListener(new WindowAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void windowClosing(WindowEvent e) {
|
public void windowClosing(WindowEvent e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user