- Timestamp:
- 2014-02-14T12:03:27+01:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r6798 r6851 1288 1288 } 1289 1289 1290 private void updateSystemProperty(String key, String value) { 1290 /** 1291 * Updates a given system property. 1292 * @param key The property key 1293 * @param value The property value 1294 * @return the previous value of the system property, or {@code null} if it did not have one. 1295 * @since 6851 1296 */ 1297 public static String updateSystemProperty(String key, String value) { 1291 1298 if (value != null) { 1292 1299 String old = System.setProperty(key, value); 1293 1300 Main.debug("System property '"+key+"' set to '"+value+"'. Old value was '"+old+"'"); 1294 } 1301 return old; 1302 } 1303 return null; 1295 1304 } 1296 1305 -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r6839 r6851 40 40 import org.openstreetmap.josm.data.AutosaveTask; 41 41 import org.openstreetmap.josm.data.CustomConfigurator; 42 import org.openstreetmap.josm.data.Preferences; 42 43 import org.openstreetmap.josm.data.Version; 43 44 import org.openstreetmap.josm.gui.download.DownloadDialog; … … 305 306 // http://stackoverflow.com/q/75218/2257172 306 307 // To be replaced with official API when switching to Java 7: https://bugs.openjdk.java.net/browse/JDK-4714232 307 System.setProperty("sun.awt.exception.handler", BugReportExceptionHandler.class.getName());308 Preferences.updateSystemProperty("sun.awt.exception.handler", BugReportExceptionHandler.class.getName()); 308 309 309 310 // initialize the platform hook, and … … 320 321 321 322 if (args.containsKey(Option.DEBUG)) { 323 // Enable JOSM debug level 322 324 logLevel = 4; 325 // Enable debug in OAuth signpost 326 Preferences.updateSystemProperty("debug", "true"); 323 327 Main.debug(tr("Print debugging messages to console")); 324 328 } -
trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
r6443 r6851 13 13 14 14 import org.openstreetmap.josm.Main; 15 import org.openstreetmap.josm.data.Preferences; 15 16 16 17 /** … … 19 20 */ 20 21 public class PlatformHookOsx extends PlatformHookUnixoid implements PlatformHook, InvocationHandler { 21 22 22 23 private static PlatformHookOsx ivhandler = new PlatformHookOsx(); 23 24 24 25 @Override 25 26 public void preStartupHook() { … … 28 29 // And will not work when one of the system independent LAFs is used. 29 30 // They just insist on painting themselves... 30 System.setProperty("apple.laf.useScreenMenuBar", "true");31 } 32 31 Preferences.updateSystemProperty("apple.laf.useScreenMenuBar", "true"); 32 } 33 33 34 @Override 34 35 public void startupHook() { … … 48 49 } 49 50 } 50 51 51 52 @Override 52 53 public Object invoke (Object proxy, Method method, Object[] args) throws Throwable { … … 69 70 return null; 70 71 } 71 72 72 73 @Override 73 74 public void openUrl(String url) throws IOException { … … 212 213 Shortcut.registerSystemShortcut("view:zoomout", tr("reserved"), KeyEvent.VK_SUBTRACT, KeyEvent.META_DOWN_MASK); // Zoom out 213 214 } 214 215 215 216 @Override 216 217 public String makeTooltip(String name, Shortcut sc) {
Note:
See TracChangeset
for help on using the changeset viewer.