JAL-3084 hide startup file, Chimera, HTML/SVG, Web Services options/tab
[jalview.git] / src / jalview / gui / Preferences.java
index 31842e4..6271ba9 100755 (executable)
@@ -22,6 +22,7 @@ package jalview.gui;
 
 import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
 import jalview.bin.Cache;
+import jalview.bin.Jalview;
 import jalview.gui.Help.HelpId;
 import jalview.gui.StructureViewer.ViewerType;
 import jalview.io.FileFormatI;
@@ -188,10 +189,12 @@ public class Preferences extends GPreferences
     super();
     frame = new JInternalFrame();
     frame.setContentPane(this);
-    wsPrefs = new WsPreferences();
-    wsTab.add(wsPrefs, BorderLayout.CENTER);
+    if (!Jalview.isJS())
+    {
+      wsPrefs = new WsPreferences();
+      wsTab.add(wsPrefs, BorderLayout.CENTER);
+    }
     int width = 500, height = 450;
-    new jalview.util.Platform();
     if (Platform.isAMac())
     {
       width = 570;
@@ -813,7 +816,10 @@ public class Preferences extends GPreferences
     Cache.applicationProperties.setProperty("PAD_GAPS",
             Boolean.toString(padGaps.isSelected()));
 
-    wsPrefs.updateAndRefreshWsMenuConfig(false);
+    if (!Jalview.isJS())
+    {
+      wsPrefs.updateAndRefreshWsMenuConfig(false);
+    }
     Cache.saveProperties();
     Desktop.instance.doConfigureStructurePrefs();
     try
@@ -887,8 +893,11 @@ public class Preferences extends GPreferences
   {
     try
     {
-      wsPrefs.updateWsMenuConfig(true);
-      wsPrefs.refreshWs_actionPerformed(e);
+      if (!Jalview.isJS())
+      {
+        wsPrefs.updateWsMenuConfig(true);
+        wsPrefs.refreshWs_actionPerformed(e);
+      }
       frame.setClosed(true);
     } catch (Exception ex)
     {