j2sNative references moved to Platform
[jalview.git] / src / jalview / gui / UserDefinedColours.java
index 04266be..94f9a37 100755 (executable)
@@ -32,6 +32,7 @@ import jalview.schemes.UserColourScheme;
 import jalview.util.ColorUtils;
 import jalview.util.Format;
 import jalview.util.MessageManager;
+import jalview.util.Platform;
 import jalview.xml.binding.jalview.JalviewUserColours;
 import jalview.xml.binding.jalview.JalviewUserColours.Colour;
 import jalview.xml.binding.jalview.ObjectFactory;
@@ -483,9 +484,7 @@ public class UserDefinedColours extends GUserDefinedColours
    */
   protected void warnIfUnsavedChanges()
   {
-    // BH 2018 no warning in JavaScript TODO
-    
-    if (/** @j2sNative true || */ !changedButNotSaved)
+    if (Platform.isJS() || !changedButNotSaved)
     {
       return;
     }
@@ -747,12 +746,12 @@ public class UserDefinedColours extends GUserDefinedColours
     if (ColourSchemes.getInstance().nameExists(name))
     {
       // BH 2018 SwingJS bypasses this question with YES_OPTION
-      int reply = /** @j2sNative  0 &&  */ JvOptionPane.showInternalConfirmDialog(Desktop.desktop,
+      int reply = (Platform.isJS() ? 0 : JvOptionPane.showInternalConfirmDialog(Desktop.desktop,
               MessageManager.formatMessage(
                       "label.colour_scheme_exists_overwrite", new Object[]
                       { name, name }),
               MessageManager.getString("label.duplicate_scheme_name"),
-              JvOptionPane.YES_NO_OPTION);
+              JvOptionPane.YES_NO_OPTION));
       if (reply != JvOptionPane.YES_OPTION)
       {
       }