chiark / gitweb /
debug output option
[jarrg-ian.git] / src / com / tedpearson / ypp / market / ControlPanel.java
index 0f15704..bbd75f6 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);
                        }
                });