chiark / gitweb /
disable pctb uploads for now as they are broken
[jarrg-ian.git] / src / com / tedpearson / ypp / market / ControlPanel.java
index a43da10d588b4ae5802147854fb7ce9a092fa16b..57ed140fe967bdc4ea48819c43c092e376c1b06d 100644 (file)
@@ -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) {
@@ -17,7 +17,6 @@ public class ControlPanel extends JFrame {
        public ControlPanel() {
                super("PCTB Control Panel");
                final Preferences prefs = Preferences.userNodeForPackage(getClass());
-               final JCheckBox cb = new JCheckBox("Launch PCTB Uploader when YPP starts?", prefs.getBoolean("launchAtStartup", true));
                final JCheckBox toPCTB = new JCheckBox("Upload to PCTB?", prefs.getBoolean("uploadToPCTB", true));
                final JCheckBox toYarrg = new JCheckBox("Upload to Yarrg?", prefs.getBoolean("uploadToYarrg", true));
 
@@ -31,22 +30,27 @@ public class ControlPanel extends JFrame {
                liveortest.add(live);
                liveortest.add(testing);
 
+               String version_label = " version: " +
+                   com.tedpearson.ypp.market.Version.version;
+               JLabel version = new JLabel(version_label);
+
                setLayout(new GridLayout(6,1));
-               add(cb);
-               add(toPCTB);
+               //add(toPCTB);
                add(toYarrg);
                add(live);
                add(testing);
+               add(version);
+
+               final int exitstatus = Integer.parseInt(System.getProperty("com.tedpearson.ypp.market.controlpanel.exitstatus", "0"));
 
-               JButton but = new JButton("Save");
+               JButton but = new JButton("Save options");
                add(but);
                but.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
-                               prefs.putBoolean("launchAtStartup", cb.isSelected());
                                prefs.putBoolean("uploadToPCTB", toPCTB.isSelected());
                                prefs.putBoolean("uploadToYarrg", toYarrg.isSelected());
                                prefs.putBoolean("useLiveServers", live.isSelected());
-                               System.exit(0);
+                               System.exit(exitstatus);
                        }
                });
                pack();