forked from External/mage
Fixed close dialog not working correctly
This commit is contained in:
parent
490a4f8427
commit
830533360e
1 changed files with 5 additions and 1 deletions
|
|
@ -650,7 +650,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
btnExit = new javax.swing.JButton();
|
||||
lblStatus = new javax.swing.JLabel();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
||||
setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
|
||||
setMinimumSize(new java.awt.Dimension(1024, 768));
|
||||
|
||||
desktopPane.setBackground(new java.awt.Color(204, 204, 204));
|
||||
|
|
@ -833,6 +833,10 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
return;
|
||||
}
|
||||
session.disconnect(false);
|
||||
} else {
|
||||
if (JOptionPane.showConfirmDialog(this, "Are you sure you want to exit?", "Confirm exit", JOptionPane.YES_NO_OPTION) != JOptionPane.YES_OPTION) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
Plugins.getInstance().shutdown();
|
||||
dispose();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue