Changeset 1879 in josm for trunk/src/org/openstreetmap/josm/actions/AboutAction.java
- Timestamp:
- 2009-08-02T14:36:40+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AboutAction.java
r1802 r1879 58 58 URL u = Main.class.getResource("/REVISION"); 59 59 if(u == null) { 60 try { 61 manifest = true; 62 u = new URL("jar:" + Main.class.getProtectionDomain().getCodeSource().getLocation().toString() 63 + "!/META-INF/MANIFEST.MF"); 64 } catch (MalformedURLException e) { 65 e.printStackTrace(); 66 } 60 // try { 61 manifest = true; 62 // u = new URL("jar:" + Main.class.getProtectionDomain().getCodeSource().getLocation().toString() 63 // + "!/META-INF/MANIFEST.MF"); 64 u = Main.class.getResource("/META-INF/MANIFEST.MF"); 65 // } catch (MalformedURLException e) { 66 // e.printStackTrace(); 67 // } 67 68 } 68 69 revision = loadFile(u, manifest); … … 155 156 156 157 JOptionPane.showMessageDialog(Main.parent, about, tr("About JOSM..."), 157 JOptionPane.INFORMATION_MESSAGE, ImageProvider.get("logo"));158 JOptionPane.INFORMATION_MESSAGE, ImageProvider.get("logo")); 158 159 } 159 160 … … 194 195 area.setEditable(false); 195 196 Font font = Font.getFont("monospaced"); 196 if (font != null) 197 if (font != null) { 197 198 area.setFont(font); 199 } 198 200 if (resource == null) 199 201 return area; … … 202 204 in = new BufferedReader(new InputStreamReader(resource.openStream())); 203 205 String s = ""; 204 for (String line = in.readLine(); line != null; line = in.readLine()) 206 for (String line = in.readLine(); line != null; line = in.readLine()) { 205 207 s += line + "\n"; 208 } 206 209 if (manifest) { 207 210 s = Pattern.compile("\n ", Pattern.DOTALL).matcher(s).replaceAll("");
Note:
See TracChangeset
for help on using the changeset viewer.