- Timestamp:
- 2015-05-02T23:33:56+02:00 (10 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r8299 r8315 1709 1709 1710 1710 String[] obsolete = { 1711 "osm.notes.enableDownload" // was used prior to r8071 when notes was an hidden feature. To remove end of 2015 1711 "osm.notes.enableDownload", // was used prior to r8071 when notes was an hidden feature. To remove end of 2015 1712 "mappaint.style.migration.switchedToMapCSS", // was used prior to 8315 for MapCSS switch. To remove end of 2015 1713 "mappaint.style.migration.changedXmlName" // was used prior to 8315 for MapCSS switch. To remove end of 2015 1712 1714 }; 1713 1715 for (String key : obsolete) { -
trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java
r7402 r8315 218 218 boolean changed = false; 219 219 220 boolean addedMapcssStyle = false; // Migration code can be removed ~ Nov. 2014221 222 220 Collection<String> knownDefaults = new TreeSet<>(Main.pref.getCollection("mappaint.style.known-defaults")); 223 221 … … 237 235 insertionIdx++; 238 236 changed = true; 239 /* Migration code can be removed ~ Nov. 2014 */240 if ("resource://styles/standard/elemstyles.mapcss".equals(def.url)) {241 addedMapcssStyle = true;242 }243 237 } else { 244 238 if (i >= insertionIdx) { … … 254 248 knownDefaults.remove(OLD_ELEMSTYLES_XML); 255 249 Main.pref.putCollection("mappaint.style.known-defaults", knownDefaults); 256 257 /* Migration code can be removed ~ Nov. 2014 */258 if (addedMapcssStyle) {259 // change title of the XML entry260 // only do this once. If the user changes it afterward, do not touch261 if (!Main.pref.getBoolean("mappaint.style.migration.changedXmlName", false)) {262 SourceEntry josmXml = Utils.find(list, new Predicate<SourceEntry>() {263 @Override264 public boolean evaluate(SourceEntry se) {265 return OLD_ELEMSTYLES_XML.equals(se.url);266 }267 });268 if (josmXml != null) {269 josmXml.title = tr("JOSM default (XML; old version)");270 changed = true;271 }272 Main.pref.put("mappaint.style.migration.changedXmlName", true);273 }274 }275 276 /* Migration code can be removed ~ Nov. 2014 */277 if (!Main.pref.getBoolean("mappaint.style.migration.switchedToMapCSS", false)) {278 SourceEntry josmXml = Utils.find(list, new Predicate<SourceEntry>() {279 @Override280 public boolean evaluate(SourceEntry se) {281 return "resource://styles/standard/elemstyles.xml".equals(se.url);282 }283 });284 SourceEntry josmMapCSS = Utils.find(list, new Predicate<SourceEntry>() {285 @Override286 public boolean evaluate(SourceEntry se) {287 return "resource://styles/standard/elemstyles.mapcss".equals(se.url);288 }289 });290 if (josmXml != null && josmMapCSS != null && josmXml.active) {291 josmMapCSS.active = true;292 josmXml.active = false;293 Main.info("Switched mappaint style from XML format to MapCSS (one time migration).");294 changed = true;295 }296 // in any case, do this check only once:297 Main.pref.put("mappaint.style.migration.switchedToMapCSS", true);298 }299 250 300 251 // XML style is not bundled anymore
Note:
See TracChangeset
for help on using the changeset viewer.