- Timestamp:
- 2010-01-09T23:13:53+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java
r2745 r2797 37 37 static public final String API_URL_PROP = OsmApiUrlInputPanel.class.getName() + ".apiUrl"; 38 38 39 static private final String defaulturl = "http://api.openstreetmap.org/api"; 39 40 private JLabel lblValid; 40 41 private JLabel lblApiUrl; … … 59 60 gc.gridx = 1; 60 61 gc.weightx = 1.0; 61 JLabel lbl = new JLabel( "<html>Use the default OSM server URL (<strong>http://api.openstreetmap.org/api</strong>)</html>");62 JLabel lbl = new JLabel(tr("<html>Use the default OSM server URL (<strong>{0}</strong>)</html>", defaulturl)); 62 63 lbl.setFont(lbl.getFont().deriveFont(Font.PLAIN)); 63 64 pnl.add(lbl, gc); … … 120 121 if (url == null) { 121 122 cbUseDefaultServerUrl.setSelected(true); 122 firePropertyChange(API_URL_PROP, null, "http://api.openstreetmap.org/api");123 } else if (url.trim().equals( "http://api.openstreetmap.org/api")) {123 firePropertyChange(API_URL_PROP, null, defaulturl); 124 } else if (url.trim().equals(defaulturl)) { 124 125 cbUseDefaultServerUrl.setSelected(true); 125 firePropertyChange(API_URL_PROP, null, "http://api.openstreetmap.org/api");126 firePropertyChange(API_URL_PROP, null, defaulturl); 126 127 } else { 127 128 cbUseDefaultServerUrl.setSelected(false); … … 137 138 if (cbUseDefaultServerUrl.isSelected()) { 138 139 Main.pref.put("osm-server.url", null); 139 } else if (tfOsmServerUrl.getText().trim().equals( "http://api.openstreetmap.org/api")) {140 } else if (tfOsmServerUrl.getText().trim().equals(defaulturl)) { 140 141 Main.pref.put("osm-server.url", null); 141 142 } else { … … 251 252 case ItemEvent.SELECTED: 252 253 setApiUrlInputEnabled(false); 253 firePropertyChange(API_URL_PROP, null, "http://api.openstreetmap.org/api");254 firePropertyChange(API_URL_PROP, null, defaulturl); 254 255 break; 255 256 case ItemEvent.DESELECTED:
Note:
See TracChangeset
for help on using the changeset viewer.