Changeset 34533 in osm for applications/editors


Ignore:
Timestamp:
2018-08-18T18:53:47+02:00 (6 years ago)
Author:
donvip
Message:

update to JOSM 14153

Location:
applications/editors/josm/plugins/NanoLog
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/NanoLog/build.xml

    r33788 r34533  
    55    <property name="commit.message" value="NanoLog"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="12643"/>
     7    <property name="plugin.main.version" value="14153"/>
    88    <property name="plugin.author" value="Ilya Zverev"/>
    99    <property name="plugin.class" value="nanolog.NanoLogPlugin"/>
  • applications/editors/josm/plugins/NanoLog/src/nanolog/Correlator.java

    r34339 r34533  
    99import javax.swing.JOptionPane;
    1010
    11 import org.openstreetmap.josm.Main;
    1211import org.openstreetmap.josm.data.coor.EastNorth;
    1312import org.openstreetmap.josm.data.coor.LatLon;
     
    1615import org.openstreetmap.josm.data.gpx.GpxTrackSegment;
    1716import org.openstreetmap.josm.data.gpx.WayPoint;
     17import org.openstreetmap.josm.data.projection.ProjectionRegistry;
     18import org.openstreetmap.josm.gui.MainApplication;
    1819import org.openstreetmap.josm.tools.Logging;
    1920import org.openstreetmap.josm.tools.UncheckedParseException;
     
    6162        // No GPX timestamps found, exit
    6263        if (firstGPXDate < 0) {
    63             JOptionPane.showMessageDialog(Main.parent,
     64            JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
    6465                    tr("The selected GPX track does not contain timestamps. Please select another one."),
    6566                    tr("GPX Track has no time information"), JOptionPane.WARNING_MESSAGE);
     
    218219     */
    219220    public static long getGpxDate(GpxData data, LatLon pos) {
    220         EastNorth en = Main.getProjection().latlon2eastNorth(pos);
     221        EastNorth en = ProjectionRegistry.getProjection().latlon2eastNorth(pos);
    221222        for (GpxTrack track : data.tracks) {
    222223            for (GpxTrackSegment segment : track.getSegments()) {
     
    229230                            long curWpTime = DateUtils.fromString(curWpTimeStr).getTime();
    230231                            if (prevWp != null) {
    231                                 EastNorth c1 = Main.getProjection().latlon2eastNorth(prevWp.getCoor());
    232                                 EastNorth c2 = Main.getProjection().latlon2eastNorth(curWp.getCoor());
     232                                EastNorth c1 = ProjectionRegistry.getProjection().latlon2eastNorth(prevWp.getCoor());
     233                                EastNorth c2 = ProjectionRegistry.getProjection().latlon2eastNorth(curWp.getCoor());
    233234                                if (!c1.equals(c2)) {
    234235                                    EastNorth middle = getSegmentAltitudeIntersection(c1, c2, en);
  • applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogLayer.java

    r33788 r34533  
    2929import javax.swing.JOptionPane;
    3030
    31 import org.openstreetmap.josm.Main;
    3231import org.openstreetmap.josm.actions.JosmAction;
    3332import org.openstreetmap.josm.actions.RenameLayerAction;
     
    369368        public void actionPerformed(ActionEvent e) {
    370369            // todo
    371             JOptionPane.showMessageDialog(Main.parent, "Sorry, no saving yet", "NanoLog", JOptionPane.ERROR_MESSAGE);
     370            JOptionPane.showMessageDialog(MainApplication.getMainFrame(), "Sorry, no saving yet", "NanoLog", JOptionPane.ERROR_MESSAGE);
    372371        }
    373372    }
  • applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogPlugin.java

    r33788 r34533  
    1010import javax.swing.JOptionPane;
    1111
    12 import org.openstreetmap.josm.Main;
    1312import org.openstreetmap.josm.actions.JosmAction;
    1413import org.openstreetmap.josm.gui.MainApplication;
     
    4645        public void actionPerformed(ActionEvent e) {
    4746            JFileChooser fc = new JFileChooser();
    48             if (fc.showOpenDialog(Main.parent) == JFileChooser.APPROVE_OPTION) {
     47            if (fc.showOpenDialog(MainApplication.getMainFrame()) == JFileChooser.APPROVE_OPTION) {
    4948                try {
    5049                    List<NanoLogEntry> entries = NanoLogLayer.readNanoLog(fc.getSelectedFile());
     
    5554                    }
    5655                } catch (IOException ex) {
    57                     JOptionPane.showMessageDialog(Main.parent, tr("Could not read NanoLog file:") + "\n" + ex.getMessage());
     56                    JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Could not read NanoLog file:") + "\n" + ex.getMessage());
    5857                }
    5958            }
Note: See TracChangeset for help on using the changeset viewer.