import com.formdev.flatlaf.extras.FlatDesktop;
import jalview.util.MessageManager;
+import jalview.util.Platform;
public class APQHandlers
{
- protected static boolean setAPQHandlers = false;
-
public static boolean setAPQHandlers(GDesktop desktop)
{
+ if (Platform.isJS())
+ {
+ return false;
+ }
FlatDesktop.setAboutHandler(() -> {
desktop.aboutMenuItem_actionPerformed(null);
});
response.cancelQuit();
}
});
-
- setAPQHandlers = true;
-
- return setAPQHandlers;
+ // if we got to here, no exceptions occurred when we set the handlers.
+ return true;
}
}