Changeset 11544 in josm for trunk/src/org
- Timestamp:
- 2017-02-09T00:54:57+01:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java
r11534 r11544 586 586 } 587 587 currentTask = null; 588 currentFuture = null;589 588 } 590 589 } -
trunk/src/org/openstreetmap/josm/gui/widgets/HtmlPanel.java
r8846 r11544 30 30 Font f = UIManager.getFont("Label.font"); 31 31 StyleSheet ss = new StyleSheet(); 32 String rule =MessageFormat.format(32 ss.addRule("body {" + MessageFormat.format( 33 33 "font-family: ''{0}'';font-size: {1,number}pt; font-weight: {2}; font-style: {3}", 34 34 f.getName(), 35 35 f.getSize(), 36 36 f.isBold() ? "bold" : "normal", 37 f.isItalic() ? "italic" : "normal" 38 ); 39 rule = "body {" + rule + '}'; 40 rule = MessageFormat.format( 37 f.isItalic() ? "italic" : "normal" 38 ) + '}'); 39 ss.addRule("strong {" + MessageFormat.format( 41 40 "font-family: ''{0}'';font-size: {1,number}pt; font-weight: {2}; font-style: {3}", 42 41 f.getName(), … … 44 43 "bold", 45 44 f.isItalic() ? "italic" : "normal" 46 ); 47 rule = "strong {" + rule + '}'; 48 ss.addRule(rule); 45 ) + '}'); 49 46 ss.addRule("a {text-decoration: underline; color: blue}"); 50 47 ss.addRule("ul {margin-left: 1cm; list-style-type: disc}"); -
trunk/src/org/openstreetmap/josm/io/OsmConnection.java
r10618 r11544 67 67 throw new OsmTransferException(e); 68 68 } 69 String token; 70 if (response == null) { 71 token = ":"; 72 } else if (response.isCanceled()) { 73 cancel = true; 74 return; 75 } else { 76 String username = response.getUsername() == null ? "" : response.getUsername(); 77 String password = response.getPassword() == null ? "" : String.valueOf(response.getPassword()); 78 token = username + ':' + password; 79 con.setHeader("Authorization", "Basic "+Base64.getEncoder().encodeToString(token.getBytes(StandardCharsets.UTF_8))); 69 if (response != null) { 70 if (response.isCanceled()) { 71 cancel = true; 72 return; 73 } else { 74 String username = response.getUsername() == null ? "" : response.getUsername(); 75 String password = response.getPassword() == null ? "" : String.valueOf(response.getPassword()); 76 String token = username + ':' + password; 77 con.setHeader("Authorization", "Basic "+Base64.getEncoder().encodeToString(token.getBytes(StandardCharsets.UTF_8))); 78 } 80 79 } 81 80 }
Note:
See TracChangeset
for help on using the changeset viewer.