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;
*/
protected void warnIfUnsavedChanges()
{
- // BH 2018 no warning in JavaScript TODO
-
- if (/** @j2sNative true || */ !changedButNotSaved)
+ if (Platform.isJS() || !changedButNotSaved)
{
return;
}
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)
{
}