chiark / gitweb /
Turn off PCTB upload by default
[jarrg-ian.git] / src / net / chiark / yarrg / MarketUploader.java
index c39b0f85ac3402e3cd3158ff4308aef7d9f38752..fd9a0fe10679f027167bba0b5f39cc4efc8bfb40 100644 (file)
@@ -41,8 +41,8 @@ implements Runnable, TopLevelWindowListener, GUIInitializedListener {
   private Window window = null;
 
   // Genuinely global variables
-  public PrintStream dtxt = null;
-  private int uploadcounter = 0;
+  private PrintStream dtxt = null;
+  public int uploadcounter = 0;
 
   // UI objects which are enabled/disabled, cleared/set, created/destroyed,
   //  etc., for each upload
@@ -136,6 +136,7 @@ implements Runnable, TopLevelWindowListener, GUIInitializedListener {
    */
 
   public static void main(String[] args) {
+    // This is not normally called, it seems.
     new MarketUploader();
   }
 
@@ -159,7 +160,7 @@ implements Runnable, TopLevelWindowListener, GUIInitializedListener {
     }
                
     uploadToYarrg=prefs.getBoolean("uploadToYarrg", true);
-    uploadToPCTB=prefs.getBoolean("uploadToPCTB", true);
+    uploadToPCTB=prefs.getBoolean("uploadToPCTB", false);
     showArbitrage=prefs.getBoolean("showArbitrage", true);
 
     debuglog("main on dispatch thread: "+EventQueue.isDispatchThread());
@@ -362,7 +363,7 @@ implements Runnable, TopLevelWindowListener, GUIInitializedListener {
    * error and error_html may be called from any thread
    */ 
 
-  private void error(final String msg) {
+  public void error(final String msg) {
     try {
       new UIX() { public void body() {
        resultSummary.setText("failed");
@@ -375,7 +376,7 @@ implements Runnable, TopLevelWindowListener, GUIInitializedListener {
     }
   }
        
-  private void error_html(final String msg, String html) {
+  public void error_html(final String msg, String html) {
     Pattern body = Pattern.compile("<body>(.*)</body>",
                                   Pattern.DOTALL | Pattern.CASE_INSENSITIVE);
     Matcher m = body.matcher(html);
@@ -394,7 +395,7 @@ implements Runnable, TopLevelWindowListener, GUIInitializedListener {
     error(whole_msg);
   }
 
-  private void progressNote(final String s_in) throws Exception {
+  public void progressNote(final String s_in) throws Exception {
     new UIA() { public void body() {
       String arb = null;
       arb = arbitrageResult.getText();
@@ -404,12 +405,12 @@ implements Runnable, TopLevelWindowListener, GUIInitializedListener {
       progmon.setNote(s);
     }}.exec("progressNote "+s_in);
   }
-  private void setProgress(final int nv) throws Exception {
+  public void setProgress(final int nv) throws Exception {
     new UIA() { public void body() {
       progmon.setProgress(nv);
     }}.exec("setProgress "+nv);
   }
-  private boolean checkCancelled() throws Exception {
+  public boolean checkCancelled() throws Exception {
     return new UIXR<Boolean>() { public Boolean bodyr() {
       boolean can = progmon.isCanceled();
       if (can) resultSummary.setText("cancelled");
@@ -754,7 +755,7 @@ implements Runnable, TopLevelWindowListener, GUIInitializedListener {
       latch = new java.util.concurrent.CountDownLatch(1);
       // make the Players Online ("/who") panel appear
       AccessibleEditableText chat = chatArea.getAccessibleEditableText();
-      chat.setTextContents("/w");
+      chat.setTextContents("/who");
       int c = chatArea.getAccessibleAction().getAccessibleActionCount();
       for(int i=0;i<c;i++) {
        if("notify-field-accept".equals(chatArea.getAccessibleAction()
@@ -773,7 +774,7 @@ implements Runnable, TopLevelWindowListener, GUIInitializedListener {
         e.getPropertyName().equals
         (AccessibleContext.ACCESSIBLE_CHILD_PROPERTY)) {
        Accessible islandInfo =
-         descendNodes(window,new int[] {0,1,0,0,2,2,0,0,0,0,1,2});;
+         descendNodes(window,new int[] {0,1,0,0,2,2,0,0,0,0,1,3});;
        String text = islandInfo.getAccessibleContext().getAccessibleText()
          .getAtIndex(AccessibleText.SENTENCE,0);
        int index = text.indexOf(":");