chiark / gitweb /
debug output option
[jarrg-ian.git] / src / com / tedpearson / ypp / market / ControlPanel.java
index 0f15704403a011b22a9d626578da97003808a637..bbd75f6c71bcd33b19605e363dcb232600a57380 100644 (file)
@@ -35,13 +35,16 @@ public class ControlPanel extends JFrame {
                    com.tedpearson.ypp.market.Version.version;
                JLabel version = new JLabel(version_label);
 
-               setLayout(new GridLayout(7,1));
+               final JCheckBox enableDebug = new JCheckBox("Write debug files?", prefs.getBoolean("writeDebugFiles", false));
+
+               setLayout(new GridLayout(8,1));
                add(toPCTB);
                add(toYarrg);
                add(showArbitrage);
                add(live);
                add(testing);
                add(version);
+               add(enableDebug);
 
                final int exitstatus = Integer.parseInt(System.getProperty("com.tedpearson.ypp.market.controlpanel.exitstatus", "0"));
 
@@ -53,6 +56,7 @@ public class ControlPanel extends JFrame {
                                prefs.putBoolean("uploadToYarrg", toYarrg.isSelected());
                                prefs.putBoolean("showArbitrage", showArbitrage.isSelected());
                                prefs.putBoolean("useLiveServers", live.isSelected());
+                               prefs.putBoolean("writeDebugFiles", enableDebug.isSelected());
                                System.exit(exitstatus);
                        }
                });