isAMac() -> isAMacAndNotJS(), isWindows() -> isWindowsAndNotJS()
[jalview.git] / src / jalview / io / JalviewFileChooser.java
index c275ef0..f6455bf 100755 (executable)
@@ -22,6 +22,7 @@
 package jalview.io;
 
 import jalview.bin.Cache;
+import jalview.bin.Jalview;
 import jalview.gui.JvOptionPane;
 import jalview.util.MessageManager;
 import jalview.util.Platform;
@@ -193,15 +194,13 @@ public class JalviewFileChooser extends JFileChooser implements DialogRunnerI,
   {
     int value = super.showOpenDialog(this);
     
-    /*
-     * code below here is not reached in JalviewJS, instead
-     * propertyChange() is called for dialog action
-     */
-    /**
-     * @j2sNative
-     */
+    if (!Jalview.isJS())
     {
-    handleResponse(value);
+      /*
+       * code here is not run in JalviewJS, instead
+       * propertyChange() is called for dialog action
+       */
+      handleResponse(value);
     }
     return value;
   }
@@ -471,7 +470,7 @@ public class JalviewFileChooser extends JFileChooser implements DialogRunnerI,
       layout.putConstraint(SpringLayout.NORTH, scroller, 5,
               SpringLayout.NORTH, this);
 
-      if (Platform.isAMac())
+      if (Platform.isAMacAndNotJS())
       {
         scroller.setPreferredSize(new Dimension(500, 100));
       }