Jskad's "Do you want to save your changes before you quit?" dialog is now

optional.
This commit is contained in:
dchandler 2002-11-08 03:58:35 +00:00
parent 947ac5537a
commit 86e384352b
2 changed files with 9 additions and 0 deletions

View file

@ -54,6 +54,11 @@ thdl.Jskad.disable.status.bar = false
# with thdl.Jskad.disable.status.bar set to false: # with thdl.Jskad.disable.status.bar set to false:
thdl.Jskad.initial.status.message = Welcome to Jskad! thdl.Jskad.initial.status.message = Welcome to Jskad!
# Set this to true if you don't want Jskad to ask you "Do you really
# want to quit?" when you try to exit the program. (Your changes will
# not be saved if this is true.)
thdl.Jskad.do.not.confirm.quit = false
############################################################################ ############################################################################
####################### Developer Preferences ######################## ####################### Developer Preferences ########################

View file

@ -640,6 +640,10 @@ public class Jskad extends JPanel implements DocumentListener {
} }
private boolean checkSave() { private boolean checkSave() {
if (ThdlOptions.getBooleanOption("thdl.Jskad.do.not.confirm.quit")) {
return true;
}
int saveFirst = JOptionPane.showConfirmDialog(this, "Do you want to save your changes?", "Please select", JOptionPane.YES_NO_CANCEL_OPTION); int saveFirst = JOptionPane.showConfirmDialog(this, "Do you want to save your changes?", "Please select", JOptionPane.YES_NO_CANCEL_OPTION);
switch (saveFirst) { switch (saveFirst) {