Ignore:
Timestamp:
2018-08-15T13:29:06+02:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 14153

Location:
applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/DataImportPlugin.java

    r33024 r34475  
    1818     * Add new File import filter into open dialog
    1919     * @param info plugin information
     20     * @throws IOException in case of I/O error
    2021     */
    2122    public DataImportPlugin(PluginInformation info) throws IOException {
  • applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java

    r33559 r34475  
    1010import java.io.InputStream;
    1111import java.io.InputStreamReader;
     12import java.nio.charset.StandardCharsets;
    1213import java.util.ArrayList;
    1314import java.util.Collections;
     
    1617import javax.swing.JOptionPane;
    1718
    18 import org.openstreetmap.josm.Main;
    1919import org.openstreetmap.josm.actions.ExtensionFileFilter;
    2020import org.openstreetmap.josm.data.coor.LatLon;
     
    2727import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
    2828import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     29import org.openstreetmap.josm.spi.preferences.Config;
    2930import org.openstreetmap.josm.tools.Logging;
    3031
     
    5556        try (
    5657            InputStream source = new FileInputStream(file);
    57             BufferedReader rd = new BufferedReader(new InputStreamReader(source));
     58            BufferedReader rd = new BufferedReader(new InputStreamReader(source, StandardCharsets.UTF_8));
    5859         ) {
    5960            String line;
     
    8384                GpxLayer gpxLayer = new GpxLayer(data, file.getName());
    8485                MainApplication.getLayerManager().addLayer(gpxLayer);
    85                 if (Main.pref.getBoolean("marker.makeautomarkers", true)) {
     86                if (Config.getPref().getBoolean("marker.makeautomarkers", true)) {
    8687                    MarkerLayer ml = new MarkerLayer(data, tr("Markers from {0}", file.getName()), file, gpxLayer);
    8788                    if (ml.data.size() > 0) {
     
    107108        String msg = tr("Coordinates imported: ") + success + " " + tr("Format errors: ") + failure + "\n";
    108109        if (success > 0) {
    109             JOptionPane.showMessageDialog(Main.parent, msg, tr("TangoGPS import success"), JOptionPane.INFORMATION_MESSAGE);
     110            JOptionPane.showMessageDialog(MainApplication.getMainFrame(), msg, tr("TangoGPS import success"), JOptionPane.INFORMATION_MESSAGE);
    110111        } else {
    111             JOptionPane.showMessageDialog(Main.parent, msg, tr("TangoGPS import failure!"), JOptionPane.ERROR_MESSAGE);
     112            JOptionPane.showMessageDialog(MainApplication.getMainFrame(), msg, tr("TangoGPS import failure!"), JOptionPane.ERROR_MESSAGE);
    112113        }
    113114    }
  • applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/Tcx.java

    r33581 r34475  
    1616import javax.xml.datatype.XMLGregorianCalendar;
    1717
    18 import org.openstreetmap.josm.Main;
    1918import org.openstreetmap.josm.actions.ExtensionFileFilter;
    2019import org.openstreetmap.josm.data.coor.LatLon;
     
    3433import org.openstreetmap.josm.plugins.dataimport.io.tcx.TrackpointT;
    3534import org.openstreetmap.josm.plugins.dataimport.io.tcx.TrainingCenterDatabaseT;
     35import org.openstreetmap.josm.spi.preferences.Config;
    3636
    3737
     
    7676        GpxLayer gpxLayer = new GpxLayer(gpxData, tcxFile.getName());
    7777        MainApplication.getLayerManager().addLayer(gpxLayer);
    78         if (Main.pref.getBoolean("marker.makeautomarkers", true)) {
     78        if (Config.getPref().getBoolean("marker.makeautomarkers", true)) {
    7979            MarkerLayer ml = new MarkerLayer(gpxData, tr("Markers from {0}", tcxFile.getName()), tcxFile, gpxLayer);
    8080            if (ml.data.size() > 0) {
Note: See TracChangeset for help on using the changeset viewer.