Changeset 30303 in osm for applications/editors/josm/plugins/opendata/src/org
- Timestamp:
- 2014-02-25T00:13:55+01:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/OdPlugin.java
r30211 r30303 145 145 JMenuItem handlerItem = null; 146 146 if (dataURL != null) { 147 handlerItem = endMenu.add(new DownloadDataAction(module .getDisplayedName()+"_"+handlerName, dataURL));147 handlerItem = endMenu.add(new DownloadDataAction(module, handlerName, dataURL)); 148 148 } else if (dataURLs != null) { 149 149 JMenu handlerMenu = new JMenu(handlerName); … … 151 151 for (Pair<String, URL> pair : dataURLs) { 152 152 if (pair != null && pair.a != null && pair.b != null) { 153 item = handlerMenu.add(new DownloadDataAction( pair.a, pair.b));153 item = handlerMenu.add(new DownloadDataAction(module, pair.a, pair.b)); 154 154 } 155 155 } -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/actions/DownloadDataAction.java
r28050 r30303 23 23 import org.openstreetmap.josm.Main; 24 24 import org.openstreetmap.josm.actions.JosmAction; 25 import org.openstreetmap.josm.plugins.opendata.core.modules.Module; 25 26 import org.openstreetmap.josm.tools.CheckParameterUtil; 26 27 … … 29 30 private final URL url; 30 31 31 public DownloadDataAction( String name, URL url) {32 public DownloadDataAction(Module module, String name, URL url) { 32 33 super(false); 33 34 CheckParameterUtil.ensureParameterNotNull(name, "name"); 34 35 CheckParameterUtil.ensureParameterNotNull(url, "url"); 35 36 putValue(Action.NAME, name); 36 putValue("toolbar", "opendata_download_"+name.toLowerCase().replace(" ", "_"));37 putValue("toolbar", ("opendata_download_"+module.getDisplayedName()+"_"+name).toLowerCase().replace(" ", "_")); 37 38 this.url = url; 38 39 } -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/archive/ZipImporter.java
r28696 r30303 16 16 package org.openstreetmap.josm.plugins.opendata.core.io.archive; 17 17 18 import java.io.File; 18 19 import java.io.InputStream; 19 20 … … 38 39 } 39 40 } 41 42 @Override 43 public boolean acceptFile(File pathname) { 44 return super.acceptFile(pathname) && !pathname.getName().endsWith(".osm.zip"); 45 } 40 46 }
Note:
See TracChangeset
for help on using the changeset viewer.