Changeset 7012 in josm for trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java
- Timestamp:
- 2014-04-27T15:35:47+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java
r7004 r7012 240 240 @Override 241 241 public void preferenceChanged(PreferenceChangeEvent evt) { 242 if ("osm-server.username".equals(evt.getKey())) { 242 switch (evt.getKey()) { 243 case "osm-server.username": 243 244 if (!(evt.getNewValue() instanceof StringSetting)) return; 244 String new Value = ((StringSetting) evt.getNewValue()).getValue();245 if (new Value == null || newValue.trim().length() == 0) {245 String newUserName = ((StringSetting) evt.getNewValue()).getValue(); 246 if (newUserName == null || newUserName.trim().isEmpty()) { 246 247 setAnonymous(); 247 248 } else { 248 if (! new Value.equals(userName)) {249 setPartiallyIdentified(new Value);249 if (! newUserName.equals(userName)) { 250 setPartiallyIdentified(newUserName); 250 251 } 251 252 } 252 253 return; 253 254 254 } else if ("osm-server.url".equals(evt.getKey())) {255 case "osm-server.url": 255 256 if (!(evt.getNewValue() instanceof StringSetting)) return; 256 String new Value= ((StringSetting) evt.getNewValue()).getValue();257 if (new Value == null || newValue.trim().isEmpty()) {257 String newUrl = ((StringSetting) evt.getNewValue()).getValue(); 258 if (newUrl == null || newUrl.trim().isEmpty()) { 258 259 setAnonymous(); 259 260 } else if (isFullyIdentified()) { 260 261 setPartiallyIdentified(getUserName()); 261 262 } 262 263 } else if ("oauth.access-token.key".equals(evt.getKey())) { 263 break; 264 265 case "oauth.access-token.key": 264 266 accessTokenKeyChanged = true; 265 266 } else if ("oauth.access-token.secret".equals(evt.getKey())) { 267 break; 268 269 case "oauth.access-token.secret": 267 270 accessTokenSecretChanged = true; 271 break; 268 272 } 269 273
Note:
See TracChangeset
for help on using the changeset viewer.