Modify

Opened 18 months ago

Closed 16 months ago

Last modified 16 months ago

#20133 closed enhancement (fixed)

Set macOS icon on macOS startup

Reported by: Stereo Owned by: Stereo
Priority: normal Milestone: 21.02
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 18 months ago.

Download all attachments as: .zip

Change History (16)

Changed 18 months ago by Stereo

Attachment: JOSM-BigSur-Pencil.png added

comment:1 Changed 18 months 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 18 months 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 18 months ago by Don-vip

Milestone: 20.1120.12

comment:4 Changed 18 months 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 18 months 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 18 months ago by Stereo

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

comment:7 Changed 18 months 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 18 months ago by Stereo

Keywords: macos added

comment:9 Changed 17 months ago by Stereo

Fix in #20257

comment:10 Changed 17 months ago by stoecker

Milestone: 20.1221.01

comment:11 Changed 16 months ago by Don-vip

Milestone: 21.0121.02

comment:12 Changed 16 months ago by Stereo

Milestone: 21.0221.01
Status: needinfonew

comment:13 Changed 16 months ago by Stereo

Status: newassigned

comment:14 Changed 16 months ago by Stereo

Resolution: fixed
Status: assignedclosed

comment:15 Changed 16 months ago by stoecker

Milestone: 21.0121.02

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Stereo.
as The resolution will be set.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.