Changeset 34526 in osm for applications/editors


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

update to JOSM 14153

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

Legend:

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

    r33739 r34526  
    22<project name="livegps" default="dist" basedir=".">
    33    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
    4     <property name="plugin.main.version" value="12987"/>
     4    <property name="plugin.main.version" value="14153"/>
    55       
    66    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java

    r33739 r34526  
    2121import javax.json.JsonObject;
    2222
    23 import org.openstreetmap.josm.Main;
     23import org.openstreetmap.josm.spi.preferences.Config;
    2424import org.openstreetmap.josm.tools.Logging;
    2525
     
    4747    public LiveGpsAcquirer() {
    4848
    49         gpsdHost = Main.pref.get(C_HOST, DEFAULT_HOST);
    50         gpsdPort = Main.pref.getInt(C_PORT, DEFAULT_PORT);
     49        gpsdHost = Config.getPref().get(C_HOST, DEFAULT_HOST);
     50        gpsdPort = Config.getPref().getInt(C_PORT, DEFAULT_PORT);
    5151        // put the settings back in to the preferences, makes keys appear.
    52         Main.pref.put(C_HOST, gpsdHost);
    53         Main.pref.putInt(C_PORT, gpsdPort);
     52        Config.getPref().put(C_HOST, gpsdHost);
     53        Config.getPref().putInt(C_PORT, gpsdPort);
    5454    }
    5555
  • applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDrawHelper.java

    r33739 r34526  
    66import java.awt.Point;
    77
    8 import org.openstreetmap.josm.Main;
    98import org.openstreetmap.josm.data.gpx.WayPoint;
    109import org.openstreetmap.josm.data.preferences.CachingProperty;
     
    1312import org.openstreetmap.josm.gui.layer.MapViewGraphics;
    1413import org.openstreetmap.josm.gui.layer.gpx.GpxDrawHelper;
     14import org.openstreetmap.josm.spi.preferences.Config;
    1515
    1616public class LiveGpsDrawHelper extends GpxDrawHelper {
     
    4848        Point screen = mv.getPoint(lastPoint.getCoor());
    4949
    50         int TriaHeight = Main.pref.getInt(C_CURSOR_H, 20);
    51         int TriaWidth = Main.pref.getInt(C_CURSOR_W, 10);
    52         int TriaThick = Main.pref.getInt(C_CURSOR_T, 4);
     50        int TriaHeight = Config.getPref().getInt(C_CURSOR_H, 20);
     51        int TriaWidth = Config.getPref().getInt(C_CURSOR_W, 10);
     52        int TriaThick = Config.getPref().getInt(C_CURSOR_T, 4);
    5353
    5454        /*
  • applications/editors/josm/plugins/livegps/src/livegps/LiveGpsLayer.java

    r33953 r34526  
    1313import java.util.Map;
    1414
    15 import org.openstreetmap.josm.Main;
    1615import org.openstreetmap.josm.data.coor.LatLon;
    1716import org.openstreetmap.josm.data.gpx.GpxData;
     
    2019import org.openstreetmap.josm.gui.MainApplication;
    2120import org.openstreetmap.josm.gui.layer.GpxLayer;
     21import org.openstreetmap.josm.spi.preferences.Config;
    2222
    2323public class LiveGpsLayer extends GpxLayer implements PropertyChangeListener {
     
    139139     */
    140140    private void initIntervals() {
    141         if ((refreshInterval = Main.pref.getInt(oldC_REFRESH_INTERVAL, 0)) != 0) {
     141        if ((refreshInterval = Config.getPref().getInt(oldC_REFRESH_INTERVAL, 0)) != 0) {
    142142            refreshInterval *= 1000;
    143             Main.pref.put(oldC_REFRESH_INTERVAL, null);
     143            Config.getPref().put(oldC_REFRESH_INTERVAL, null);
    144144        } else
    145             refreshInterval = Main.pref.getInt(C_REFRESH_INTERVAL, DEFAULT_REFRESH_INTERVAL);
     145            refreshInterval = Config.getPref().getInt(C_REFRESH_INTERVAL, DEFAULT_REFRESH_INTERVAL);
    146146
    147         centerInterval = Main.pref.getInt(C_CENTER_INTERVAL, DEFAULT_CENTER_INTERVAL);
    148         centerFactor = Main.pref.getInt(C_CENTER_FACTOR, DEFAULT_CENTER_FACTOR);
     147        centerInterval = Config.getPref().getInt(C_CENTER_INTERVAL, DEFAULT_CENTER_INTERVAL);
     148        centerFactor = Config.getPref().getInt(C_CENTER_FACTOR, DEFAULT_CENTER_FACTOR);
    149149        if (centerFactor <= 1 || centerFactor >= 99)
    150150            centerFactor = DEFAULT_CENTER_FACTOR;
    151151
    152             Main.pref.putInt(C_REFRESH_INTERVAL, refreshInterval);
    153             Main.pref.putInt(C_CENTER_INTERVAL, centerInterval);
    154         Main.pref.putInt(C_CENTER_FACTOR, (int) centerFactor);
     152            Config.getPref().putInt(C_REFRESH_INTERVAL, refreshInterval);
     153            Config.getPref().putInt(C_CENTER_INTERVAL, centerInterval);
     154        Config.getPref().putInt(C_CENTER_FACTOR, (int) centerFactor);
    155155
    156156        /*
Note: See TracChangeset for help on using the changeset viewer.