Changeset 14138 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2018-08-12T02:21:19+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/KeyboardUtils.java
r14022 r14138 9 9 import java.util.Locale; 10 10 import java.util.Map; 11 12 import org.openstreetmap.josm.Main;13 11 14 12 /** … … 293 291 // UK Apple, https://en.wikipedia.org/wiki/QWERTY#UK_Apple_keyboard 294 292 // International English Apple, https://en.wikipedia.org/wiki/QWERTY#Apple_International_English_Keyboard 295 if ( Main.isPlatformOsx()) {293 if (PlatformManager.isPlatformOsx()) { 296 294 result.add('§'); // https://en.wikipedia.org/wiki/Section_sign 297 295 } -
trunk/src/org/openstreetmap/josm/tools/OpenBrowser.java
r12620 r14138 25 25 26 26 private static void displayUrlFallback(URI uri) throws IOException { 27 if ( Main.platform== null)27 if (PlatformManager.getPlatform() == null) 28 28 throw new IllegalStateException(tr("Failed to open URL. There is currently no platform set. Please set a platform first.")); 29 Main.platform.openUrl(uri.toString());29 PlatformManager.getPlatform().openUrl(uri.toString()); 30 30 } 31 31 … … 45 45 if (Desktop.isDesktopSupported()) { 46 46 try { 47 if ( Main.isPlatformWindows()) {47 if (PlatformManager.isPlatformWindows()) { 48 48 // Desktop API works fine under Windows, so we don't try any fallback in case of I/O exceptions because it's not API's fault 49 49 Desktop.getDesktop().browse(uri); 50 } else if ( Main.platform instanceof PlatformHookUnixoid || Main.platform instanceof PlatformHookOsx) {50 } else if (PlatformManager.isPlatformUnixoid() || PlatformManager.isPlatformOsx()) { 51 51 // see #5629 #5108 #9568 52 Main.platform.openUrl(uri.toString());52 PlatformManager.getPlatform().openUrl(uri.toString()); 53 53 } else { 54 54 // This is not the case with some Linux environments (see below), -
trunk/src/org/openstreetmap/josm/tools/Shortcut.java
r14017 r14138 371 371 if (initdone) return; 372 372 initdone = true; 373 int commandDownMask = Main.platform.getMenuShortcutKeyMaskEx();373 int commandDownMask = PlatformManager.getPlatform().getMenuShortcutKeyMaskEx(); 374 374 groups.put(NONE, -1); 375 375 groups.put(MNEMONIC, KeyEvent.ALT_DOWN_MASK); … … 384 384 385 385 // (1) System reserved shortcuts 386 Main.platform.initSystemShortcuts();386 PlatformManager.getPlatform().initSystemShortcuts(); 387 387 // (2) User defined shortcuts 388 388 Main.pref.getAllPrefixCollectionKeys("shortcut.entry.").stream() … … 507 507 } else if (existing.isPresent()) { 508 508 final Shortcut conflict = existing.get(); 509 if ( Main.isPlatformOsx()) {509 if (PlatformManager.isPlatformOsx()) { 510 510 // Try to reassign Meta to Ctrl 511 511 int newmodifier = findNewOsxModifier(requestedGroup);
Note:
See TracChangeset
for help on using the changeset viewer.