- Timestamp:
- 2010-01-10T12:46:10+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/oauth/AdvancedOAuthPropertiesPanel.java
r2801 r2804 34 34 private JTextField tfRequestTokenURL; 35 35 private JTextField tfAccessTokenURL; 36 private JTextField tfAut oriseURL;36 private JTextField tfAuthoriseURL; 37 37 private UseDefaultItemListener ilUseDefault; 38 38 … … 95 95 96 96 97 // -- aut orise URL97 // -- authorise URL 98 98 gc.gridy = 5; 99 99 gc.gridx = 0; 100 100 gc.weightx = 0.0; 101 add(new JLabel(tr("Aut orise URL:")), gc);102 103 gc.gridx = 1; 104 gc.weightx = 1.0; 105 add(tfAut oriseURL = new JTextField(), gc);106 SelectAllOnFocusGainedDecorator.decorate(tfAut oriseURL);101 add(new JLabel(tr("Authorise URL:")), gc); 102 103 gc.gridx = 1; 104 gc.weightx = 1.0; 105 add(tfAuthoriseURL = new JTextField(), gc); 106 SelectAllOnFocusGainedDecorator.decorate(tfAuthoriseURL); 107 107 108 108 cbUseDefaults.addItemListener(ilUseDefault = new UseDefaultItemListener()); … … 115 115 || ! tfRequestTokenURL.getText().equals( OAuthParameters.DEFAULT_REQUEST_TOKEN_URL) 116 116 || ! tfAccessTokenURL.getText().equals( OAuthParameters.DEFAULT_ACCESS_TOKEN_URL) 117 || ! tfAut oriseURL.getText().equals( OAuthParameters.DEFAULT_AUTHORISE_URL);117 || ! tfAuthoriseURL.getText().equals( OAuthParameters.DEFAULT_AUTHORISE_URL); 118 118 } 119 119 … … 156 156 tfRequestTokenURL.setText(OAuthParameters.DEFAULT_REQUEST_TOKEN_URL); 157 157 tfAccessTokenURL.setText(OAuthParameters.DEFAULT_ACCESS_TOKEN_URL); 158 tfAut oriseURL.setText(OAuthParameters.DEFAULT_AUTHORISE_URL);158 tfAuthoriseURL.setText(OAuthParameters.DEFAULT_AUTHORISE_URL); 159 159 160 160 setChildComponentsEnabled(false); … … 182 182 parameters.setRequestTokenUrl(tfRequestTokenURL.getText()); 183 183 parameters.setAccessTokenUrl(tfAccessTokenURL.getText()); 184 parameters.setAuthoriseUrl(tfAut oriseURL.getText());184 parameters.setAuthoriseUrl(tfAuthoriseURL.getText()); 185 185 return parameters; 186 186 } … … 204 204 tfRequestTokenURL.setText(parameters.getRequestTokenUrl() == null ? "" : parameters.getRequestTokenUrl()); 205 205 tfAccessTokenURL.setText(parameters.getAccessTokenUrl() == null ? "" : parameters.getAccessTokenUrl()); 206 tfAut oriseURL.setText(parameters.getAuthoriseUrl() == null ? "" : parameters.getAuthoriseUrl());206 tfAuthoriseURL.setText(parameters.getAuthoriseUrl() == null ? "" : parameters.getAuthoriseUrl()); 207 207 } 208 208 } … … 230 230 tfRequestTokenURL.setText(pref.get("oauth.settings.request-token-url", "")); 231 231 tfAccessTokenURL.setText(pref.get("oauth.settings.access-token-url", "")); 232 tfAut oriseURL.setText(pref.get("oauth.settings.authorise-url", ""));232 tfAuthoriseURL.setText(pref.get("oauth.settings.authorise-url", "")); 233 233 setChildComponentsEnabled(true); 234 234 } … … 256 256 pref.put("oauth.settings.request-token-url", tfRequestTokenURL.getText().trim()); 257 257 pref.put("oauth.settings.access-token-url", tfAccessTokenURL.getText().trim()); 258 pref.put("oauth.settings.authorise-url", tfAut oriseURL.getText().trim());258 pref.put("oauth.settings.authorise-url", tfAuthoriseURL.getText().trim()); 259 259 } 260 260 } -
trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorisationUI.java
r2801 r2804 451 451 protected void finish() {} 452 452 453 protected void alertAut orisationFailed(OsmOAuthAuthorisationException e) {453 protected void alertAuthorisationFailed(OsmOAuthAuthorisationException e) { 454 454 HelpAwareOptionPane.showOptionDialog( 455 455 FullyAutomaticAuthorisationUI.this, … … 463 463 tr("OAuth authorisation failed"), 464 464 JOptionPane.ERROR_MESSAGE, 465 HelpUtil.ht("/Dialog/OAuthAut orisationWizard#FullyAutomaticProcessFailed")465 HelpUtil.ht("/Dialog/OAuthAuthorisationWizard#FullyAutomaticProcessFailed") 466 466 ); 467 467 } … … 473 473 + "The automatic process for retrieving an OAuth Access Token<br>" 474 474 + "from the OSM server failed because JOSM wasn't able to build<br>" 475 + "a valid login URL from the OAuth Aut orise Endpoint URL ''{0}''.<br><br>"475 + "a valid login URL from the OAuth Authorise Endpoint URL ''{0}''.<br><br>" 476 476 + "Please check your advanced setting and try again." 477 477 +"</html>", … … 480 480 tr("OAuth authorisation failed"), 481 481 JOptionPane.ERROR_MESSAGE, 482 HelpUtil.ht("/Dialog/OAuthAut orisationWizard#FullyAutomaticProcessFailed")482 HelpUtil.ht("/Dialog/OAuthAuthorisationWizard#FullyAutomaticProcessFailed") 483 483 ); 484 484 } … … 505 505 tr("OAuth authorisation failed"), 506 506 JOptionPane.ERROR_MESSAGE, 507 HelpUtil.ht("/Dialog/OAuthAut orisationWizard#FullyAutomaticProcessFailed")507 HelpUtil.ht("/Dialog/OAuthAuthorisationWizard#FullyAutomaticProcessFailed") 508 508 ); 509 509 } … … 515 515 alertLoginFailed((OsmLoginFailedException)e); 516 516 } else { 517 alertAut orisationFailed(e);517 alertAuthorisationFailed(e); 518 518 } 519 519 } -
trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorisationClient.java
r2801 r2804 435 435 int retCode = connection.getResponseCode(); 436 436 if (retCode != HttpURLConnection.HTTP_MOVED_TEMP) 437 throw new OsmOAuthAuthorisationException(tr("Failed to aut orise OAuth request ''{0}''", requestToken.getKey()));437 throw new OsmOAuthAuthorisationException(tr("Failed to authorise OAuth request ''{0}''", requestToken.getKey())); 438 438 } catch(MalformedURLException e) { 439 439 throw new OsmOAuthAuthorisationException(e); -
trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorisationUI.java
r2801 r2804 234 234 gc.weightx = 0.0; 235 235 gc.gridwidth = 1; 236 pnl.add(new JLabel(tr("Aut orise URL:")), gc);236 pnl.add(new JLabel(tr("Authorise URL:")), gc); 237 237 238 238 gc.gridx = 1; -
trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java
r2801 r2804 48 48 49 49 private JPanel pnlAuthorisationMessage; 50 private NotYetAuthorisedPanel pnlNotYetAut orised;51 private AlreadyAuthorisedPanel pnlAlreadyAut orised;50 private NotYetAuthorisedPanel pnlNotYetAuthorised; 51 private AlreadyAuthorisedPanel pnlAlreadyAuthorised; 52 52 private AdvancedOAuthPropertiesPanel pnlAdvancedProperties; 53 53 private String apiUrl; … … 123 123 // create these two panels, they are going to be used later in refreshView 124 124 // 125 pnlAlreadyAut orised = new AlreadyAuthorisedPanel();126 pnlNotYetAut orised = new NotYetAuthorisedPanel();125 pnlAlreadyAuthorised = new AlreadyAuthorisedPanel(); 126 pnlNotYetAuthorised = new NotYetAuthorisedPanel(); 127 127 } 128 128 … … 130 130 pnlAuthorisationMessage.removeAll(); 131 131 if (OAuthAccessTokenHolder.getInstance().containsAccessToken()) { 132 pnlAuthorisationMessage.add(pnlAlreadyAut orised, BorderLayout.CENTER);133 pnlAlreadyAut orised.refreshView();134 pnlAlreadyAut orised.revalidate();132 pnlAuthorisationMessage.add(pnlAlreadyAuthorised, BorderLayout.CENTER); 133 pnlAlreadyAuthorised.refreshView(); 134 pnlAlreadyAuthorised.revalidate(); 135 135 } else { 136 pnlAuthorisationMessage.add(pnlNotYetAut orised, BorderLayout.CENTER);137 pnlNotYetAut orised.revalidate();136 pnlAuthorisationMessage.add(pnlNotYetAuthorised, BorderLayout.CENTER); 137 pnlNotYetAuthorised.revalidate(); 138 138 } 139 139 repaint();
Note:
See TracChangeset
for help on using the changeset viewer.