Ignore:
Timestamp:
2019-07-06T22:15:55+02:00 (5 years ago)
Author:
Don-vip
Message:

fix #13458 - display external resources icons in the preferences

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/preferences/sources/MapPaintPrefHelper.java

    r12846 r15211  
    77import java.util.Arrays;
    88import java.util.Collection;
    9 import java.util.HashMap;
    109import java.util.List;
    1110import java.util.Map;
     
    1413
    1514import org.openstreetmap.josm.spi.preferences.Config;
     15import org.openstreetmap.josm.tools.ImageProvider;
    1616import org.openstreetmap.josm.tools.Utils;
    1717
     
    8484        defJosmMapcss.active = true;
    8585        defJosmMapcss.name = "standard";
     86        defJosmMapcss.icon = new ImageProvider("logo").getResource();
    8687        defJosmMapcss.title = tr("JOSM default (MapCSS)");
    8788        defJosmMapcss.description = tr("Internal style to be used as base for runtime switchable overlay styles");
     
    8990        defPL2.active = false;
    9091        defPL2.name = "standard";
     92        defPL2.icon = new ImageProvider("dialogs/mappaint", "pl2_small").getResource();
    9193        defPL2.title = tr("Potlatch 2");
    9294        defPL2.description = tr("the main Potlatch 2 style");
     
    9799    @Override
    98100    public Map<String, String> serialize(SourceEntry entry) {
    99         Map<String, String> res = new HashMap<>();
    100         res.put("url", entry.url == null ? "" : entry.url);
    101         res.put("title", entry.title == null ? "" : entry.title);
     101        Map<String, String> res = super.serialize(entry);
    102102        res.put("active", Boolean.toString(entry.active));
    103103        if (entry.name != null) {
Note: See TracChangeset for help on using the changeset viewer.