Changeset 3930 in josm for trunk/src/org/openstreetmap/josm
- Timestamp:
- 2011-02-24T19:12:02+01:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r3896 r3930 6 6 import java.io.IOException; 7 7 import java.io.InputStream; 8 import java.io.InputStreamReader; 8 9 import java.util.ArrayList; 9 10 import java.util.Arrays; … … 147 148 if (entry.url.toLowerCase().endsWith(".mapcss")) { 148 149 return new MapCSSStyleSource(entry); 150 } 151 if (entry.url.toLowerCase().endsWith(".xml")) { 152 return new XmlStyleSource(entry); 149 153 } else { 154 InputStreamReader reader = new InputStreamReader(in); 155 WHILE: while (true) { 156 int c = reader.read(); 157 switch (c) { 158 case -1: 159 break WHILE; 160 case ' ': 161 case '\t': 162 case '\n': 163 case '\r': 164 continue; 165 case '<': 166 return new XmlStyleSource(entry); 167 default: 168 return new MapCSSStyleSource(entry); 169 } 170 } 171 System.err.println("Warning: Could not detect style type. Using default (xml)."); 150 172 return new XmlStyleSource(entry); 151 173 } -
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
r3894 r3930 1175 1175 } else if ("shortdescription".equals(key) && last.title == null) { 1176 1176 last.title = value; 1177 } else if ((lang + "title").equals(key) && last.title == null) { 1178 last.title = value; 1179 } else if ("title".equals(key) && last.title == null) { 1180 last.title = value; 1177 1181 } else if ("name".equals(key) && last.name == null) { 1178 1182 last.name = value;
Note:
See TracChangeset
for help on using the changeset viewer.