Ignore:
Timestamp:
2009-12-09T22:55:18+01:00 (15 years ago)
Author:
casualwalker
Message:

Make the config-keys for gpsd port and host appear in the preferences.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java

    r19011 r19012  
    2020        BufferedReader gpsdReader;
    2121        boolean connected = false;
    22         String gpsdHost = Main.pref.get("livegps.gpsd.host", "localhost");
    23         int gpsdPort = Main.pref.getInteger("livegps.gpsd.port", 2947);
     22        String gpsdHost;
     23        int gpsdPort;
    2424        boolean shutdownFlag = false;
    2525        private final List<PropertyChangeListener> propertyChangeListener = new ArrayList<PropertyChangeListener>();
    2626        private PropertyChangeEvent lastStatusEvent;
    2727        private PropertyChangeEvent lastDataEvent;
     28
     29        /**
     30         * Constructor, initializes the configurable settings.
     31         */
     32        public LiveGpsAcquirer() {
     33                super();
     34
     35                gpsdHost = Main.pref.get("livegps.gpsd.host", "localhost");
     36                gpsdPort = Main.pref.getInteger("livegps.gpsd.port", 2947);
     37                // put the settings back in to the preferences, makes keys appear.
     38                Main.pref.put("livegps.gpsd.host", gpsdHost);
     39                Main.pref.putInteger("livegps.gpsd.port", gpsdPort);
     40        }
    2841
    2942        /**
Note: See TracChangeset for help on using the changeset viewer.