Changeset 18704 in josm
- Timestamp:
- 2023-04-19T18:03:38+02:00 (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
r18580 r18704 32 32 import org.openstreetmap.josm.data.Preferences; 33 33 import org.openstreetmap.josm.gui.MainApplication; 34 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetReader; 34 35 import org.openstreetmap.josm.io.CertificateAmendment.NativeCertAmend; 35 36 … … 50 51 51 52 @Override 52 public void preStartupHook() {53 public void afterPrefStartupHook() { 53 54 // This will merge our MenuBar into the system menu. 54 55 // MUST be set before Swing is initialized! 55 // And will not work when one of the system independent LAFs is used. 56 // They just insist on painting themselves... 57 Utils.updateSystemProperty("apple.laf.useScreenMenuBar", "true"); 56 57 // But only use the menu bar if the Name Suggestion Index is not enabled -- see JDK-8297117 (can remove once that is fixed) 58 // The NSI is especially egregious since it adds something like 8k presets, and is the most likely to trigger JDK-8297117. 59 if (TaggingPresetReader.getPresetSources().stream().noneMatch(url -> url.contains("name-suggestion-index"))) { 60 Utils.updateSystemProperty("apple.laf.useScreenMenuBar", "true"); 61 } 58 62 Utils.updateSystemProperty("apple.awt.application.name", "JOSM"); 59 63 }
Note:
See TracChangeset
for help on using the changeset viewer.