Ignore:
Timestamp:
2021-02-08T20:52:53+01:00 (3 years ago)
Author:
GerdP
Message:

see #20257:macOS build process fixes and improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java

    r15121 r17487  
    2626import java.util.List;
    2727import java.util.Objects;
     28import java.util.Optional;
    2829import java.util.concurrent.ExecutionException;
    2930
     
    3132import org.openstreetmap.josm.gui.MainApplication;
    3233import org.openstreetmap.josm.io.CertificateAmendment.NativeCertAmend;
     34import org.openstreetmap.josm.spi.preferences.Config;
     35
    3336
    3437/**
     
    8184            }
    8285            // setup the dock icon. It is automatically set with application bundle and Web start but we need
    83             // to do it manually if run with `java -jar``
    84             eawtApplication.getDeclaredMethod("setDockIconImage", Image.class).invoke(appli, ImageProvider.get("logo").getImage());
     86            // to do it manually if run with `java -jar``.
     87            eawtApplication.getDeclaredMethod("setDockIconImage", Image.class).invoke(
     88                appli,
     89                Optional.ofNullable(
     90                    new ImageProvider(Config.getUrls().getJOSMWebsite()+"/logo-macos.png").setOptional(true).get()
     91                ).orElse( // Fall back to default icon
     92                    ImageProvider.get("logo")).getImage()
     93            );
     94       
    8595            // enable full screen
    8696            enableOSXFullscreen(MainApplication.getMainFrame());
Note: See TracChangeset for help on using the changeset viewer.