Changeset 1359 in josm for trunk/src/org
- Timestamp:
- 2009-01-31T22:58:40+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
r1356 r1359 52 52 } 53 53 } 54 54 55 55 public class readMOTD implements Callable<String> { 56 56 private boolean isLocalized; … … 59 59 private String urlIntl; 60 60 private String urlBase; 61 61 62 62 readMOTD(boolean isLocalized, String urlBase, String urlLoc, String urlIntl, boolean isHelp) { 63 63 this.isLocalized = isLocalized; … … 82 82 content += message; 83 83 else 84 content += "<ul><li>"+ message.substring(8) +"</li></ul>";84 content += "<ul><li>"+ message.substring(8).replaceAll("\n *\\* +","</li><li>")+"</li></ul>"; 85 85 } catch (IOException ioe) { 86 86 try { … … 88 88 content += wr.read(urlIntl); 89 89 else 90 content += "<ul><li>"+wr.read(urlIntl).substring(8) +"</li></ul>";90 content += "<ul><li>"+wr.read(urlIntl).substring(8).replaceAll("\n *\\* +","</li><li>")+"</li></ul>"; 91 91 } catch (IOException ioe2) { 92 92 } 93 93 } 94 94 95 95 return content; 96 96 } … … 135 135 linksList += matcher.group(1)+matcher.group(2)+matcher.group(3)+": "; 136 136 } 137 137 138 138 // We cannot use Main.worker here because it's single-threaded and 139 139 // setting it to multi-threading will cause problems elsewhere 140 140 ExecutorService slave = Executors.newCachedThreadPool(); 141 141 142 142 ArrayList<Future<String>> linkContent = new ArrayList<Future<String>>(); 143 143 for(int i=0; i < links.size(); i++) { … … 165 165 166 166 if(!included) continue; 167 167 168 168 boolean isHelp = targetVersion == 1; 169 169 String urlStart = baseurl + "/wiki/"; … … 171 171 String urlLoc = urlStart + languageCode + urlEnd; 172 172 String urlIntl = urlStart + urlEnd; 173 173 174 174 // This adds all links to the worker which will download them concurrently 175 175 linkContent.add(slave.submit(new readMOTD(isLocalized, baseurl, urlLoc, urlIntl, isHelp))); 176 176 } 177 177 178 178 for(int i=0; i < linkContent.size(); i++) { 179 179 try { … … 181 181 } catch (Exception e) {} 182 182 } 183 183 184 184 content = "<html>\n"+ 185 185 styles +
Note:
See TracChangeset
for help on using the changeset viewer.