Ticket #18431: 18431.patch

File 18431.patch, 1.3 KB (added by GerdP, 4 years ago)

add expert option gui.start.animation. If set to false JOSM will not show an animation after next start or restart

  • src/org/openstreetmap/josm/gui/animation/AnimationExtensionManager.java

     
    55import java.util.Date;
    66import java.util.GregorianCalendar;
    77
     8import org.openstreetmap.josm.data.preferences.BooleanProperty;
     9
    810/**
    911 * Animation extension manager. Copied from Icedtea-Web.
    1012 * @author Jiri Vanek (Red Hat)
     
    1416public final class AnimationExtensionManager {
    1517
    1618    private static volatile AnimationExtension currentExtension;
     19    private static final BooleanProperty PROP_ANIMATION = new BooleanProperty("gui.start.animation", true);
    1720
    1821    private AnimationExtensionManager() {
    1922        // Hide default constructor for utility classes
     
    2528     */
    2629    public static AnimationExtension getExtension() {
    2730        if (currentExtension == null) {
    28             currentExtension = isChristmas() ? new ChristmasExtension() : new NoExtension();
     31            currentExtension = Boolean.TRUE.equals(PROP_ANIMATION.get()) && isChristmas() ? new ChristmasExtension()
     32                    : new NoExtension();
    2933        }
    3034        return currentExtension;
    3135    }