X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=src%2Fcom%2Ftedpearson%2Fypp%2Fmarket%2FControlPanel.java;h=62886c16e6a88cb9310b0b129b58274ec8478879;hb=b4fbcc4b1b6ac5c88c747fbd98b51935fe8150d6;hp=1a78b2d67307a113e7fab4498a789e2313d58bdd;hpb=61c9b37317a18cf120062c10db49f1b935898d3b;p=jarrg-ian.git diff --git a/src/com/tedpearson/ypp/market/ControlPanel.java b/src/com/tedpearson/ypp/market/ControlPanel.java index 1a78b2d..62886c1 100644 --- a/src/com/tedpearson/ypp/market/ControlPanel.java +++ b/src/com/tedpearson/ypp/market/ControlPanel.java @@ -7,7 +7,7 @@ import java.util.prefs.*; /** * ControlPanel is a simple management utility that sets -* a preference for whether the PCTB client is to launch or not. +* a preference for which server(s) to upload to. */ public class ControlPanel extends JFrame { public static void main(String[] args) { @@ -19,6 +19,7 @@ public class ControlPanel extends JFrame { final Preferences prefs = Preferences.userNodeForPackage(getClass()); final JCheckBox toPCTB = new JCheckBox("Upload to PCTB?", prefs.getBoolean("uploadToPCTB", true)); final JCheckBox toYarrg = new JCheckBox("Upload to Yarrg?", prefs.getBoolean("uploadToYarrg", true)); + final JCheckBox showArbitrage = new JCheckBox("Show arbitrage?", prefs.getBoolean("showArbitrage", false)); final JRadioButton live = new JRadioButton("Use live servers"); final JRadioButton testing = new JRadioButton("Use testing servers"); @@ -30,11 +31,17 @@ public class ControlPanel extends JFrame { liveortest.add(live); liveortest.add(testing); - setLayout(new GridLayout(6,1)); + String version_label = " version: " + + com.tedpearson.ypp.market.Version.version; + JLabel version = new JLabel(version_label); + + setLayout(new GridLayout(7,1)); add(toPCTB); add(toYarrg); + add(showArbitrage); add(live); add(testing); + add(version); final int exitstatus = Integer.parseInt(System.getProperty("com.tedpearson.ypp.market.controlpanel.exitstatus", "0")); @@ -42,9 +49,9 @@ public class ControlPanel extends JFrame { add(but); but.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - prefs.putBoolean("launchAtStartup", true); prefs.putBoolean("uploadToPCTB", toPCTB.isSelected()); prefs.putBoolean("uploadToYarrg", toYarrg.isSelected()); + prefs.putBoolean("showArbitrage", showArbitrage.isSelected()); prefs.putBoolean("useLiveServers", live.isSelected()); System.exit(exitstatus); }