Changeset 34549 in osm


Ignore:
Timestamp:
2018-08-18T19:35:31+02:00 (6 years ago)
Author:
donvip
Message:

update to JOSM 14153

Location:
applications/editors/josm/plugins/public_transport_layer
Files:
2 edited

Legend:

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

    r34280 r34549  
    33
    44    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    5     <property name="plugin.main.version" value="13919"/>
     5    <property name="plugin.main.version" value="14153"/>
    66
    77    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/public_transport_layer/src/ptl/DistanceBetweenStops.java

    r34164 r34549  
    1212import javax.swing.JOptionPane;
    1313
    14 import org.openstreetmap.josm.Main;
    1514import org.openstreetmap.josm.actions.JosmAction;
    1615import org.openstreetmap.josm.data.SystemOfMeasurement;
     
    2221import org.openstreetmap.josm.data.osm.RelationMember;
    2322import org.openstreetmap.josm.gui.ExtendedDialog;
     23import org.openstreetmap.josm.gui.MainApplication;
    2424import org.openstreetmap.josm.gui.dialogs.relation.sort.WayConnectionType;
    2525import org.openstreetmap.josm.gui.dialogs.relation.sort.WayConnectionTypeCalculator;
    2626import org.openstreetmap.josm.gui.util.GuiHelper;
    2727import org.openstreetmap.josm.gui.widgets.JosmTextArea;
     28import org.openstreetmap.josm.spi.preferences.Config;
    2829import org.openstreetmap.josm.tools.CheckParameterUtil;
    2930import org.openstreetmap.josm.tools.Utils;
     
    7475        double totalLength = 0.0;
    7576        int lengthN = 0;
    76         final boolean onlyLowerUnit = Main.pref.getBoolean("system_of_measurement.use_only_lower_unit", false);
    77         Main.pref.putBoolean("system_of_measurement.use_only_lower_unit", true);
     77        final boolean onlyLowerUnit = Config.getPref().getBoolean("system_of_measurement.use_only_lower_unit", false);
     78        Config.getPref().putBoolean("system_of_measurement.use_only_lower_unit", true);
    7879        try {
    7980            for (Node n : stopNodes) {
     
    105106            sb.insert(0, SystemOfMeasurement.getSystemOfMeasurement().getDistText(totalLength / lengthN, new DecimalFormat("0"), -1));
    106107        } finally {
    107             Main.pref.putBoolean("system_of_measurement.use_only_lower_unit", onlyLowerUnit);
     108            Config.getPref().putBoolean("system_of_measurement.use_only_lower_unit", onlyLowerUnit);
    108109        }
    109110
     
    142143        for (Relation relation : getLayerManager().getEditDataSet().getSelectedRelations()) {
    143144            if (!isRouteSupported(relation)) {
    144                 JOptionPane.showMessageDialog(Main.parent, "<html>" + tr("A valid public_transport:version=2 route is required")
     145                JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
     146                        "<html>" + tr("A valid public_transport:version=2 route is required")
    145147                + Utils.joinAsHtmlUnorderedList(Collections.singleton(relation.getDisplayName(DefaultNameFormatter.getInstance()))),
    146148                tr("Invalid selection"), JOptionPane.WARNING_MESSAGE);
     
    151153        }
    152154
    153         new ExtendedDialog(Main.parent, getValue(NAME).toString(), new String[]{tr("Close")}) {
     155        new ExtendedDialog(MainApplication.getMainFrame(), getValue(NAME).toString(), new String[]{tr("Close")}) {
    154156            {
    155157                setButtonIcons(new String[]{"ok.png"});
Note: See TracChangeset for help on using the changeset viewer.