From 86e384352b079848a7dafd6cdecf8cdae529241a Mon Sep 17 00:00:00 2001 From: dchandler Date: Fri, 8 Nov 2002 03:58:35 +0000 Subject: [PATCH] Jskad's "Do you want to save your changes before you quit?" dialog is now optional. --- source/options.txt | 5 +++++ source/org/thdl/tib/input/Jskad.java | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/source/options.txt b/source/options.txt index 95b3478..f6d272d 100644 --- a/source/options.txt +++ b/source/options.txt @@ -54,6 +54,11 @@ thdl.Jskad.disable.status.bar = false # with thdl.Jskad.disable.status.bar set to false: 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 ######################## diff --git a/source/org/thdl/tib/input/Jskad.java b/source/org/thdl/tib/input/Jskad.java index dff6ce6..c54eb5d 100644 --- a/source/org/thdl/tib/input/Jskad.java +++ b/source/org/thdl/tib/input/Jskad.java @@ -640,6 +640,10 @@ public class Jskad extends JPanel implements DocumentListener { } 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); switch (saveFirst) {