- Timestamp:
- 2007-05-14T22:34:25+02:00 (18 years ago)
- Location:
- src/org/openstreetmap/josm/actions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
r104 r236 24 24 public static ExtensionFileFilter[] filters = { 25 25 new ExtensionFileFilter("osm,xml", "osm", tr("OSM Server Files (.osm .xml)")), 26 new ExtensionFileFilter("gpx ", "gpx", tr("GPX Files (.gpx)")),26 new ExtensionFileFilter("gpx,gpx.gz", "gpx", tr("GPX Files (.gpx .gpx.gz)")), 27 27 new ExtensionFileFilter("csv,txt", "csv", tr("CSV Files (.csv .txt)")), 28 28 }; -
src/org/openstreetmap/josm/actions/OpenAction.java
r210 r236 12 12 import java.util.Collection; 13 13 import java.util.LinkedList; 14 import java.util.zip.GZIPInputStream; 14 15 15 16 import javax.swing.JFileChooser; … … 62 63 Collection<Marker> markerData = null; 63 64 if (ExtensionFileFilter.filters[ExtensionFileFilter.GPX].acceptName(fn)) { 64 RawGpsReader r = new RawGpsReader(new FileInputStream(file), file.getAbsoluteFile().getParentFile()); 65 RawGpsReader r = null; 66 // Check to see if we are opening a compressed file 67 if(file.getName().endsWith(".gpx.gz")) { 68 r = new RawGpsReader(new GZIPInputStream(new FileInputStream(file)), file.getAbsoluteFile().getParentFile()); 69 } else { 70 r = new RawGpsReader(new FileInputStream(file), file.getAbsoluteFile().getParentFile()); 71 } 65 72 gpsData = r.trackData; 66 73 markerData = r.markerData;
Note:
See TracChangeset
for help on using the changeset viewer.