Changeset 16911 in josm
- Timestamp:
- 2020-08-23T13:05:53+02:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r16883 r16911 129 129 if (PlatformManager.isPlatformUnixoid()) { 130 130 PlatformHookUnixoid platform = (PlatformHookUnixoid) PlatformManager.getPlatform(); 131 // Add desktop environment 132 platform.getDesktopEnvironment().ifPresent(desktop -> text 133 .append("Desktop environment: ") 134 .append(desktop) 135 .append('\n')); 131 136 // Add Java package details 132 137 String packageDetails = platform.getJavaPackageDetails(); -
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r16643 r16911 26 26 import java.util.HashSet; 27 27 import java.util.Locale; 28 import java.util.Optional; 28 29 import java.util.Set; 29 30 import java.util.concurrent.ExecutionException; … … 100 101 public String getDefaultStyle() { 101 102 return "javax.swing.plaf.metal.MetalLookAndFeel"; 103 } 104 105 /** 106 * Returns desktop environment based on the environment variable {@code XDG_CURRENT_DESKTOP}. 107 * @return desktop environment. 108 */ 109 public Optional<String> getDesktopEnvironment() { 110 return Optional.ofNullable(Utils.getSystemEnv("XDG_CURRENT_DESKTOP")).filter(s -> !s.isEmpty()); 102 111 } 103 112
Note:
See TracChangeset
for help on using the changeset viewer.