Changeset 15211 in josm for trunk/src/org/openstreetmap/josm/data/preferences/sources/PresetPrefHelper.java
- Timestamp:
- 2019-07-06T22:15:55+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/preferences/sources/PresetPrefHelper.java
r12825 r15211 6 6 import java.util.Collection; 7 7 import java.util.Collections; 8 import java.util.HashMap; 9 import java.util.Map;8 9 import org.openstreetmap.josm.tools.ImageProvider; 10 10 11 11 /** … … 31 31 ExtendedSourceEntry i = new ExtendedSourceEntry(type, "defaultpresets.xml", "resource://data/defaultpresets.xml"); 32 32 i.title = tr("Internal Preset"); 33 i.icon = new ImageProvider("logo").getResource(); 33 34 i.description = tr("The default preset for JOSM"); 34 35 return Collections.singletonList(i); 35 36 } 36 37 @Override38 public Map<String, String> serialize(SourceEntry entry) {39 Map<String, String> res = new HashMap<>();40 res.put("url", entry.url);41 res.put("title", entry.title == null ? "" : entry.title);42 return res;43 }44 45 @Override46 public SourceEntry deserialize(Map<String, String> s) {47 return new SourceEntry(type, s.get("url"), null, s.get("title"), true);48 }49 37 }
Note:
See TracChangeset
for help on using the changeset viewer.