Changeset 9356 in josm
- Timestamp:
- 2016-01-09T18:27:03+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java
r9352 r9356 36 36 import javax.swing.event.HyperlinkEvent; 37 37 import javax.swing.event.HyperlinkListener; 38 import javax.swing.text.html.HTMLEditorKit; 38 39 39 40 import org.openstreetmap.josm.Main; … … 48 49 import org.openstreetmap.josm.gui.util.GuiHelper; 49 50 import org.openstreetmap.josm.gui.widgets.HtmlPanel; 51 import org.openstreetmap.josm.io.OsmApi; 50 52 import org.openstreetmap.josm.tools.CheckParameterUtil; 51 53 import org.openstreetmap.josm.tools.ImageProvider; … … 152 154 cbAuthorisationProcedure.addItemListener(new AuthorisationProcedureChangeListener()); 153 155 lbl.setLabelFor(cbAuthorisationProcedure); 156 157 if (!OsmApi.DEFAULT_API_URL.equals(apiUrl)) { 158 gc.gridy = 3; 159 gc.gridwidth = 2; 160 gc.gridx = 0; 161 final HtmlPanel pnlWarning = new HtmlPanel(); 162 final HTMLEditorKit kit = (HTMLEditorKit) pnlWarning.getEditorPane().getEditorKit(); 163 kit.getStyleSheet().addRule(".warning-body {" 164 + "background-color:rgb(253,255,221);padding: 10pt; " 165 + "border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}"); 166 kit.getStyleSheet().addRule("ol {margin-left: 1cm}"); 167 pnlWarning.setText("<html><body>" 168 + "<p class=\"warning-body\">" 169 + tr("<strong>Warning:</strong> Since you are using not the default OSM API, " + 170 "make sure to set an OAuth consumer key and secret in the <i>Advanced OAuth parameters</i>.") 171 + "</p>" 172 + "</body></html>"); 173 pnl.add(pnlWarning, gc); 174 } 175 154 176 return pnl; 155 177 }
Note:
See TracChangeset
for help on using the changeset viewer.