Alt+X on Warning window exits the application - Fixed.

cusax-fix
Yana Stamcheva 20 years ago
parent 4bbf3688d8
commit b67d16970a

@ -107,11 +107,14 @@ public void windowClosing(WindowEvent e) {
});
getRootPane().getActionMap().put("close", new CloseAction());
getRootPane().getActionMap().put("exit", new ExitAction());
InputMap imap = this.getRootPane().getInputMap(
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
imap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "close");
imap.put(KeyStroke.getKeyStroke(KeyEvent.VK_X,
KeyEvent.ALT_DOWN_MASK), "exit");
}
private void setTransparent(boolean transparent) {
@ -191,4 +194,15 @@ public void actionPerformed(ActionEvent e) {
SwingUtilities.invokeLater(new RunLogin());
}
};
private class ExitAction extends AbstractAction {
public void actionPerformed(ActionEvent e) {
try {
bc.getBundle(0).stop();
} catch (BundleException ex) {
logger.error("Failed to gently shutdown Oscar", ex);
}
System.exit(0);
}
};
}

Loading…
Cancel
Save