Changeset 2889 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
- Timestamp:
- 24.01.2010 14:20:12 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r2839 r2889 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.io.File; 6 import java.io.InputStream; 5 7 import java.io.IOException; 6 8 import java.util.Collection; … … 23 25 private static ElemStyles styles = new ElemStyles(); 24 26 private static Collection<String> iconDirs; 27 private static File zipIcons; 25 28 26 29 public static ElemStyles getStyles() … … 46 49 } 47 50 } 48 ImageIcon i = ImageProvider.getIfAvailable(dirs, "mappaint."+styleName, null, name );51 ImageIcon i = ImageProvider.getIfAvailable(dirs, "mappaint."+styleName, null, name, zipIcons); 49 52 if(i == null) 50 53 { … … 87 90 xmlReader.setErrorHandler(handler); 88 91 MirroredInputStream in = new MirroredInputStream(a[1]); 89 xmlReader.parse(new InputSource(in)); 92 InputStream zip = in.getZipEntry("xml","style"); 93 if(zip != null) 94 { 95 zipIcons = in.getFile(); 96 xmlReader.parse(new InputSource(zip)); 97 } 98 else 99 xmlReader.parse(new InputSource(in)); 90 100 } catch(IOException e) { 91 101 System.err.println(tr("Warning: failed to load Mappaint styles from ''{0}''. Exception was: {1}", a[1], e.toString())); … … 97 107 } 98 108 iconDirs = null; 109 zipIcons = null; 99 110 } 100 111 }
Note: See TracChangeset
for help on using the changeset viewer.
