- Timestamp:
- 2014-02-12T20:52:31+01:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/oauth/OAuthParameters.java
r6599 r6847 235 235 } 236 236 237 /**238 * Saves these OAuth parameters to the given {@code Preferences}.239 * @param pref The Preferences into which are saved these OAuth parameters with the prefix "oauth.settings"240 */241 public void saveToPreferences(Preferences pref) {242 pref.put("oauth.settings.consumer-key", consumerKey);243 pref.put("oauth.settings.consumer-secret", consumerSecret);244 pref.put("oauth.settings.request-token-url", requestTokenUrl);245 pref.put("oauth.settings.access-token-url", accessTokenUrl);246 pref.put("oauth.settings.authorise-url", authoriseUrl);247 }248 249 237 @Override 250 238 public int hashCode() { -
trunk/src/org/openstreetmap/josm/gui/oauth/AdvancedOAuthPropertiesPanel.java
r6845 r6847 246 246 } else { 247 247 cbUseDefaults.setSelected(false); 248 tfConsumerKey.setText(pref.get("oauth.settings.consumer-key", ""));249 tfConsumerSecret.setText(pref.get("oauth.settings.consumer-secret", ""));250 tfRequestTokenURL.setText(pref.get("oauth.settings.request-token-url", ""));251 tfAccessTokenURL.setText(pref.get("oauth.settings.access-token-url", ""));252 tfAuthoriseURL.setText(pref.get("oauth.settings.authorise-url", ""));248 tfConsumerKey.setText(pref.get("oauth.settings.consumer-key", OAuthParameters.DEFAULT_JOSM_CONSUMER_KEY)); 249 tfConsumerSecret.setText(pref.get("oauth.settings.consumer-secret", OAuthParameters.DEFAULT_JOSM_CONSUMER_SECRET)); 250 tfRequestTokenURL.setText(pref.get("oauth.settings.request-token-url", OAuthParameters.DEFAULT_REQUEST_TOKEN_URL)); 251 tfAccessTokenURL.setText(pref.get("oauth.settings.access-token-url", OAuthParameters.DEFAULT_ACCESS_TOKEN_URL)); 252 tfAuthoriseURL.setText(pref.get("oauth.settings.authorise-url", OAuthParameters.DEFAULT_AUTHORISE_URL)); 253 253 setChildComponentsEnabled(true); 254 254 } -
trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java
r6602 r6847 171 171 OAuthAccessTokenHolder.getInstance().setSaveToPreferences(cbSaveToPreferences.isSelected()); 172 172 OAuthAccessTokenHolder.getInstance().save(Main.pref, CredentialsManager.getInstance()); 173 pnlAdvancedProperties. getAdvancedParameters().saveToPreferences(Main.pref);173 pnlAdvancedProperties.rememberPreferences(Main.pref); 174 174 } 175 175
Note:
See TracChangeset
for help on using the changeset viewer.