Changeset 7654 in josm


Ignore:
Timestamp:
2014-10-27T14:58:17+01:00 (9 years ago)
Author:
stoecker
Message:

support data: style URL's for icon in plugin list, see #10581

Location:
trunk/src/org/openstreetmap/josm/plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java

    r7596 r7654  
    114114            for (PluginInformation pi : availablePlugins.values()) {
    115115                if (pi.icon == null && pi.iconPath != null) {
    116                     pi.icon = new ImageProvider(pi.name+".jar/"+pi.iconPath)
     116                    String path = pi.iconPath;
     117                    if(!path.startsWith("data:")) {
     118                        path = pi.name+".jar/"+path;
     119                    }
     120                    pi.icon = new ImageProvider(path)
    117121                                    .setArchive(f)
    118122                                    .setMaxWidth(24)
  • trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java

    r7434 r7654  
    302302        for (PluginInformation pi : availablePlugins) {
    303303            if (pi.icon == null && pi.iconPath != null) {
    304                 pi.icon = new ImageProvider(pi.name+".jar/"+pi.iconPath)
     304                String path = pi.iconPath;
     305                if(!path.startsWith("data:")) {
     306                    path = pi.name+".jar/"+path;
     307                }
     308                pi.icon = new ImageProvider(path)
    305309                                .setArchive(destFile)
    306310                                .setMaxWidth(24)
Note: See TracChangeset for help on using the changeset viewer.