Modify

Opened 8 days ago

Last modified 7 days ago

#20133 needinfo enhancement

Set macOS icon on macOS startup

Reported by: Stereo Owned by: Stereo
Priority: normal Milestone: 20.12
Component: Installer MacOS Version: latest
Keywords: macos Cc:

Description

In src/org/openstreetmap/josm/tools/PlatformHookOsx.java, line 84 updates the dock icon:

eawtApplication.getDeclaredMethod("setDockIconImage", Image.class).invoke(appli, ImageProvider.get("logo").getImage());

This sets the icon to the 'normal' icon instead of the macOS icon.

The line should be updated to read

eawtApplication.getDeclaredMethod("setDockIconImage", Image.class).invoke(appli, ImageProvider.get("JOSM-BigSur-Pencil").getImage());

The image JOSM-BigSur-Pencil.png is attached to the ticket.

Attachments (1)

JOSM-BigSur-Pencil.png (76.9 KB) - added by Stereo 8 days ago.

Download all attachments as: .zip

Change History (9)

Changed 8 days ago by Stereo

Attachment: JOSM-BigSur-Pencil.png added

comment:1 Changed 8 days ago by Stereo

Oh, and this will also fix the macOS icon for people who use the jnlp (although I think it should be deprecated for macOS as it doesn't support high resolution displays, etc.)

comment:2 Changed 8 days ago by Don-vip

Owner: changed from team to Stereo
Status: newneedinfo
Type: defectenhancement

I already added the SVG in r17319 (in nodist folder).
What should be done is update the build file so that the SVG is copied into jar file, but only for macOS build.

comment:3 Changed 8 days ago by Don-vip

Milestone: 20.1120.12

comment:4 Changed 8 days ago by Stereo

I think it has to be png.

I can tell the build script to copy the png from nodist to the actual directory when it builds the jar, but then it won't be in the jnlp jar. Is that what we want?

comment:5 in reply to:  4 Changed 8 days ago by Don-vip

Replying to Stereo:

I can tell the build script to copy the png from nodist to the actual directory when it builds the jar, but then it won't be in the jnlp jar.

Good catch. You're right, I don't want that. Other option is to not include it in jar file at all and download it from JOSM server the first time and cache it automatically (using CachedFile).

comment:6 Changed 8 days ago by Stereo

CachedFile is beyond my java-fu :). Is it worth it for 77KB?

comment:7 Changed 8 days ago by Don-vip

Yes. For the URL please use https://josm.openstreetmap.de/logo-macos.png I just added the rewrite rule.

comment:8 Changed 7 days ago by Stereo

Keywords: macos added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as needinfo The owner will remain Stereo.
as The resolution will be set.
to The owner will be changed from Stereo to the specified user.
to The owner will be changed from Stereo to the specified user.
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from Stereo to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.