Index: applications/editors/josm/plugins/livegps/livegps/LiveGpsAcquirer.java
===================================================================
--- applications/editors/josm/plugins/livegps/livegps/LiveGpsAcquirer.java	(revision 12598)
+++ applications/editors/josm/plugins/livegps/livegps/LiveGpsAcquirer.java	(revision 12778)
@@ -18,50 +18,50 @@
 
 public class LiveGpsAcquirer implements Runnable {
-	Socket gpsdSocket;
-	BufferedReader gpsdReader;
-	boolean connected = false;
-	String gpsdHost = "localhost";
-	int gpsdPort = 2947;
-	String configFile = "liveGPS.conf";
-	boolean shutdownFlag = false;
+    Socket gpsdSocket;
+    BufferedReader gpsdReader;
+    boolean connected = false;
+    String gpsdHost = "localhost";
+    int gpsdPort = 2947;
+    String configFile = "liveGPS.conf";
+    boolean shutdownFlag = false;
     private List<PropertyChangeListener> propertyChangeListener = new ArrayList<PropertyChangeListener>();
     private PropertyChangeEvent lastStatusEvent;
     private PropertyChangeEvent lastDataEvent;
-	
-	public LiveGpsAcquirer(String pluginDir) {
-				
-		Properties liveGPSconfig = new Properties();
-		
-		FileInputStream fis = null;
-				
-		try {
-			fis = new FileInputStream(pluginDir + configFile);
-		} catch (FileNotFoundException e) {
-			System.err.println("No liveGPS.conf found, using defaults");
-		}
-		
-		if(fis != null)
-		{		
-			try {
-				liveGPSconfig.load(fis);
-				this.gpsdHost = liveGPSconfig.getProperty("host");
-				this.gpsdPort = Integer.parseInt(liveGPSconfig.getProperty("port"));
-				
-			} catch (IOException e) {
-				System.err.println("Error while loading liveGPS.conf, using defaults");
-			}
-			
-			if(this.gpsdHost == null || this.gpsdPort == 0)
-			{
-				System.err.println("Error in liveGPS.conf, using defaults");
-				this.gpsdHost = "localhost";
-				this.gpsdPort = 2947;
-			}
-		}
-		
-	}
-    
-    /**
-     * Adds a property change listener to the acquirer. 
+
+    public LiveGpsAcquirer(String pluginDir) {
+
+        Properties liveGPSconfig = new Properties();
+
+        FileInputStream fis = null;
+
+        try {
+            fis = new FileInputStream(pluginDir + configFile);
+        } catch (FileNotFoundException e) {
+            System.err.println("No liveGPS.conf found, using defaults");
+        }
+
+        if(fis != null)
+        {
+            try {
+                liveGPSconfig.load(fis);
+                this.gpsdHost = liveGPSconfig.getProperty("host");
+                this.gpsdPort = Integer.parseInt(liveGPSconfig.getProperty("port"));
+
+            } catch (IOException e) {
+                System.err.println("Error while loading liveGPS.conf, using defaults");
+            }
+
+            if(this.gpsdHost == null || this.gpsdPort == 0)
+            {
+                System.err.println("Error in liveGPS.conf, using defaults");
+                this.gpsdHost = "localhost";
+                this.gpsdPort = 2947;
+            }
+        }
+
+    }
+
+    /**
+     * Adds a property change listener to the acquirer.
      * @param listener the new listener
      */
@@ -71,5 +71,5 @@
         }
     }
-    
+
     /**
      * Fire a gps status change event. Fires events with key "gpsstatus" and a {@link LiveGpsStatus}
@@ -87,5 +87,5 @@
 
     /**
-     * Fire a gps data change event to all listeners. Fires events with key "gpsdata" and a 
+     * Fire a gps data change event to all listeners. Fires events with key "gpsdata" and a
      * {@link LiveGpsData} object as values.
      * @param oldData the old gps data.
@@ -99,5 +99,5 @@
         }
     }
-    
+
     /**
      * Fires the given event to all listeners.
@@ -107,44 +107,44 @@
         for (PropertyChangeListener listener : propertyChangeListener) {
             listener.propertyChange(event);
-        }        
-    }
-
-	public void run() {	
-	    LiveGpsData oldGpsData = null;
-	    LiveGpsData gpsData = null;
+        }
+    }
+
+    public void run() {
+        LiveGpsData oldGpsData = null;
+        LiveGpsData gpsData = null;
         shutdownFlag = false;
-		while(!shutdownFlag) {
-			double lat = 0;
-			double lon = 0;
+        while(!shutdownFlag) {
+            double lat = 0;
+            double lon = 0;
             float speed = 0;
             float course = 0;
-			boolean haveFix = false;
-
-			try
-			{
-				if (!connected)
-				{
-				    System.out.println("LiveGps tries to connect to gpsd");
+            boolean haveFix = false;
+
+            try
+            {
+                if (!connected)
+                {
+                    System.out.println("LiveGps tries to connect to gpsd");
                     fireGpsStatusChangeEvent(LiveGpsStatus.GpsStatus.CONNECTING, tr("Connecting"));
-					InetAddress[] addrs = InetAddress.getAllByName(gpsdHost);
-					for (int i=0; i < addrs.length && gpsdSocket == null; i++) {
-						try {
-							gpsdSocket = new Socket(addrs[i], gpsdPort);
-							break;
-						} catch (Exception e) {
-							System.out.println("LiveGps: Could not open connection to gpsd: " + e);
-							gpsdSocket = null;
-						}
-					}
-					
-					if (gpsdSocket != null)
-					{
-						gpsdReader = new BufferedReader(new InputStreamReader(gpsdSocket.getInputStream()));
-						gpsdSocket.getOutputStream().write(new byte[] { 'w', 13, 10 });
+                    InetAddress[] addrs = InetAddress.getAllByName(gpsdHost);
+                    for (int i=0; i < addrs.length && gpsdSocket == null; i++) {
+                        try {
+                            gpsdSocket = new Socket(addrs[i], gpsdPort);
+                            break;
+                        } catch (Exception e) {
+                            System.out.println("LiveGps: Could not open connection to gpsd: " + e);
+                            gpsdSocket = null;
+                        }
+                    }
+
+                    if (gpsdSocket != null)
+                    {
+                        gpsdReader = new BufferedReader(new InputStreamReader(gpsdSocket.getInputStream()));
+                        gpsdSocket.getOutputStream().write(new byte[] { 'w', 13, 10 });
                         fireGpsStatusChangeEvent(LiveGpsStatus.GpsStatus.CONNECTING, tr("Connecting"));
-						connected = true;
-					System.out.println("LiveGps: Connected to gpsd");
-					}
-				}
+                        connected = true;
+                    System.out.println("LiveGps: Connected to gpsd");
+                    }
+                }
 
 
@@ -153,5 +153,5 @@
                     // TODO this read is blocking if gps is connected but has no fix, so gpsd does not send positions
                     String line = gpsdReader.readLine();
-                    // </FIXXME> 
+                    // </FIXXME>
                     if (line == null) break;
                     String words[] = line.split(",");
@@ -189,5 +189,5 @@
                             }
                             break;
-                        case 'P':	
+                        case 'P':
                             // position report, tab delimited.
                             String[] pos = value.split("\\s+");
@@ -217,33 +217,33 @@
                     try { Thread.sleep(1000); } catch (InterruptedException ignore) {};
                 }
-			} catch(IOException iox) {
-				connected = false;
-				if(gpsData != null) {
-				    gpsData.setFix(false);
-				    fireGpsDataChangeEvent(oldGpsData, gpsData);
-				}
+            } catch(IOException iox) {
+                connected = false;
+                if(gpsData != null) {
+                    gpsData.setFix(false);
+                    fireGpsDataChangeEvent(oldGpsData, gpsData);
+                }
                 fireGpsStatusChangeEvent(LiveGpsStatus.GpsStatus.CONNECTION_FAILED, tr("Connection Failed"));
-				try { Thread.sleep(1000); } catch (InterruptedException ignore) {};
-				// send warning to layer
-
-			}
-		}
-    
+                try { Thread.sleep(1000); } catch (InterruptedException ignore) {};
+                // send warning to layer
+
+            }
+        }
+
     fireGpsStatusChangeEvent(LiveGpsStatus.GpsStatus.DISCONNECTED, tr("Not connected"));
-		if (gpsdSocket != null) {
-      try { 
-        gpsdSocket.close(); 
+        if (gpsdSocket != null) {
+      try {
+        gpsdSocket.close();
         gpsdSocket = null;
-  			System.out.println("LiveGps: Disconnected from gpsd");
-      } 
+            System.out.println("LiveGps: Disconnected from gpsd");
+      }
       catch (Exception e) {
         System.out.println("LiveGps: Unable to close socket; reconnection may not be possible");
       };
-	  }
+      }
   }
-	
-	public void shutdown()
-	{
-		shutdownFlag = true;
-	}
+
+    public void shutdown()
+    {
+        shutdownFlag = true;
+    }
 }
Index: applications/editors/josm/plugins/livegps/livegps/LiveGpsData.java
===================================================================
--- applications/editors/josm/plugins/livegps/livegps/LiveGpsData.java	(revision 12598)
+++ applications/editors/josm/plugins/livegps/livegps/LiveGpsData.java	(revision 12778)
@@ -1,4 +1,4 @@
 /**
- * 
+ *
  */
 package livegps;
@@ -22,5 +22,5 @@
     private String wayString;
     private Way way;
-    
+
     /**
      * @param latitude
@@ -38,5 +38,5 @@
     }
     /**
-     * 
+     *
      */
     public LiveGpsData() {
@@ -91,5 +91,5 @@
         this.speed = speed;
     }
-    
+
     /**
      * @return the latlon
@@ -98,5 +98,5 @@
         return this.latLon;
     }
-    
+
     /**
      * @param latLon
@@ -105,15 +105,15 @@
         this.latLon = latLon;
     }
-    
+
     public String toString() {
-        return getClass().getSimpleName() + "[fix=" + fix + ", lat=" + latLon.lat() 
+        return getClass().getSimpleName() + "[fix=" + fix + ", lat=" + latLon.lat()
         + ", long=" + latLon.lon() + ", speed=" + speed + ", course=" + course + "]";
-        
-    }
-    
+
+    }
+
     /**
      * Returns the name of the way that is closest to the current coordinates or an
      * empty string if no way is around.
-     * 
+     *
      * @return the name of the way that is closest to the current coordinates.
      */
@@ -156,5 +156,5 @@
         return wayString;
     }
-    
+
     /**
      * Returns the closest way to this position.
@@ -163,12 +163,12 @@
     public Way getWay() {
         if(way == null) {
-            EastNorth eastnorth = Main.proj.latlon2eastNorth(getLatLon()); 
-            Point xy = Main.map.mapView.getPoint(eastnorth); 
+            EastNorth eastnorth = Main.proj.latlon2eastNorth(getLatLon());
+            Point xy = Main.map.mapView.getPoint(eastnorth);
             way = Main.map.mapView.getNearestWay(xy);
         }
         return way;
-        
-    }
-    
+
+    }
+
     /* (non-Javadoc)
      * @see java.lang.Object#hashCode()
@@ -207,5 +207,5 @@
     }
 
-    
-    
+
+
 }
Index: applications/editors/josm/plugins/livegps/livegps/LiveGpsDialog.java
===================================================================
--- applications/editors/josm/plugins/livegps/livegps/LiveGpsDialog.java	(revision 12598)
+++ applications/editors/josm/plugins/livegps/livegps/LiveGpsDialog.java	(revision 12778)
@@ -1,4 +1,4 @@
 /**
- * 
+ *
  */
 package livegps;
@@ -62,5 +62,5 @@
         add(new JScrollPane(panel), BorderLayout.CENTER);
     }
-    
+
     /* (non-Javadoc)
      * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
@@ -79,5 +79,5 @@
                 speedLabel.setText((Math.round(mySpeed*100)/100) + "km/h"); // m(s to km/h
                 courseLabel.setText(data.getCourse() + "deg");
-                
+
                 String wayString = data.getWayInfo();
                 if(wayString.length() > 0) {
@@ -86,5 +86,5 @@
                     wayLabel.setText("unknown");
                 }
-                
+
             } else {
 //                fixLabel.setText("no fix");
@@ -101,11 +101,8 @@
                 panel.setBackground(Color.RED);
             } else {
-                panel.setBackground(Color.WHITE);                
+                panel.setBackground(Color.WHITE);
             }
         }
-        
+
     }
-
-
-
 }
Index: applications/editors/josm/plugins/livegps/livegps/LiveGpsLayer.java
===================================================================
--- applications/editors/josm/plugins/livegps/livegps/LiveGpsLayer.java	(revision 12598)
+++ applications/editors/josm/plugins/livegps/livegps/LiveGpsLayer.java	(revision 12778)
@@ -25,113 +25,113 @@
     public static final String LAYER_NAME = tr("LiveGPS layer");
     public static final String KEY_LIVEGPS_COLOR ="color.livegps.position";
-	LatLon lastPos;
-	WayPoint lastPoint;
-	GpxTrack trackBeingWritten;
-	Collection<WayPoint> trackSegment;
-	float speed;
-	float course;
-	String status;
-	//JLabel lbl;
-	boolean autocenter;
-	private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
-	
-	public LiveGpsLayer(GpxData data)
-	{
-		super (data, LAYER_NAME);
-		trackBeingWritten = new GpxTrack();
-		trackBeingWritten.attr.put("desc", "josm live gps");
-		trackSegment = new ArrayList<WayPoint>();
-		trackBeingWritten.trackSegs.add(trackSegment);
-		data.tracks.add(trackBeingWritten);
-	}
-	
-	void setCurrentPosition(double lat, double lon)
-	{
-	    //System.out.println("adding pos " + lat + "," + lon);
-		LatLon thisPos = new LatLon(lat, lon);
-		if ((lastPos != null) && (thisPos.equalsEpsilon(lastPos))) {
-			// no change in position
-			// maybe show a "paused" cursor or some such
-			return;
-		}
-			
-		lastPos = thisPos;
-		lastPoint = new WayPoint(thisPos);
-		lastPoint.attr.put("time", dateFormat.format(new Date()));
-		// synchronize when adding data, as otherwise the autosave action
-		// needs concurrent access and this results in an exception!
-		synchronized (LiveGpsLock.class) {
-		    trackSegment.add(lastPoint);            
+    LatLon lastPos;
+    WayPoint lastPoint;
+    GpxTrack trackBeingWritten;
+    Collection<WayPoint> trackSegment;
+    float speed;
+    float course;
+    String status;
+    //JLabel lbl;
+    boolean autocenter;
+    private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
+
+    public LiveGpsLayer(GpxData data)
+    {
+        super (data, LAYER_NAME);
+        trackBeingWritten = new GpxTrack();
+        trackBeingWritten.attr.put("desc", "josm live gps");
+        trackSegment = new ArrayList<WayPoint>();
+        trackBeingWritten.trackSegs.add(trackSegment);
+        data.tracks.add(trackBeingWritten);
+    }
+
+    void setCurrentPosition(double lat, double lon)
+    {
+        //System.out.println("adding pos " + lat + "," + lon);
+        LatLon thisPos = new LatLon(lat, lon);
+        if ((lastPos != null) && (thisPos.equalsEpsilon(lastPos))) {
+            // no change in position
+            // maybe show a "paused" cursor or some such
+            return;
         }
-		if (autocenter) {
-		    center();
-		}
-		
-		//Main.map.repaint();
-	}
 
-	public void center()
-	{
-		if (lastPoint != null) 
-			Main.map.mapView.zoomTo(lastPoint.eastNorth, Main.map.mapView.getScale());
-	}
-	
-//	void setStatus(String status)
-//	{
-//		this.status = status;
-//		Main.map.repaint();
+        lastPos = thisPos;
+        lastPoint = new WayPoint(thisPos);
+        lastPoint.attr.put("time", dateFormat.format(new Date()));
+        // synchronize when adding data, as otherwise the autosave action
+        // needs concurrent access and this results in an exception!
+        synchronized (LiveGpsLock.class) {
+            trackSegment.add(lastPoint);
+        }
+        if (autocenter) {
+            center();
+        }
+
+        //Main.map.repaint();
+    }
+
+    public void center()
+    {
+        if (lastPoint != null)
+            Main.map.mapView.zoomTo(lastPoint.eastNorth, Main.map.mapView.getScale());
+    }
+
+//  void setStatus(String status)
+//  {
+//      this.status = status;
+//      Main.map.repaint();
 //        System.out.println("LiveGps status: " + status);
-//	}
-	
-	void setSpeed(float metresPerSecond)
-	{
-		speed = metresPerSecond;
-		//Main.map.repaint();
-	}
+//  }
 
-	void setCourse(float degrees)
-	{
-		course = degrees;
-		//Main.map.repaint();
-	}
-	
-	public void setAutoCenter(boolean ac)
-	{
-		autocenter = ac;
-	}
+    void setSpeed(float metresPerSecond)
+    {
+        speed = metresPerSecond;
+        //Main.map.repaint();
+    }
 
-	@Override public void paint(Graphics g, MapView mv)
-	{
-	    //System.out.println("in paint");
-	    synchronized (LiveGpsLock.class) {
-	        //System.out.println("in synced paint");
-	        super.paint(g, mv);
-//	        int statusHeight = 50;
-//	        Rectangle mvs = mv.getBounds();
-//	        mvs.y = mvs.y + mvs.height - statusHeight;
-//	        mvs.height = statusHeight;
-//	        g.setColor(new Color(1.0f, 1.0f, 1.0f, 0.8f)); 
-//	        g.fillRect(mvs.x, mvs.y, mvs.width, mvs.height);
+    void setCourse(float degrees)
+    {
+        course = degrees;
+        //Main.map.repaint();
+    }
 
-	        if (lastPoint != null)
-	        {
-	            Point screen = mv.getPoint(lastPoint.eastNorth);
-	            g.setColor(Main.pref.getColor(KEY_LIVEGPS_COLOR, Color.RED));
-	            g.drawOval(screen.x-10, screen.y-10,20,20);
-	            g.drawOval(screen.x-9, screen.y-9,18,18);
-	        }
+    public void setAutoCenter(boolean ac)
+    {
+        autocenter = ac;
+    }
 
-//	        lbl.setText("gpsd: "+status+" Speed: " + speed + " Course: "+course);
-//	        lbl.setBounds(0, 0, mvs.width-10, mvs.height-10);
-//	        Graphics sub = g.create(mvs.x+5, mvs.y+5, mvs.width-10, mvs.height-10);
-//	        lbl.paint(sub);
+    @Override public void paint(Graphics g, MapView mv)
+    {
+        //System.out.println("in paint");
+        synchronized (LiveGpsLock.class) {
+            //System.out.println("in synced paint");
+            super.paint(g, mv);
+//          int statusHeight = 50;
+//          Rectangle mvs = mv.getBounds();
+//          mvs.y = mvs.y + mvs.height - statusHeight;
+//          mvs.height = statusHeight;
+//          g.setColor(new Color(1.0f, 1.0f, 1.0f, 0.8f));
+//          g.fillRect(mvs.x, mvs.y, mvs.width, mvs.height);
 
-//	        if(status != null) {
-//	        g.setColor(Color.WHITE);
-//	        g.drawString("gpsd: " + status, 5, mv.getBounds().height - 15); // lower left corner
-//	        }
-	    }
-	}
-    
+            if (lastPoint != null)
+            {
+                Point screen = mv.getPoint(lastPoint.eastNorth);
+                g.setColor(Main.pref.getColor(KEY_LIVEGPS_COLOR, Color.RED));
+                g.drawOval(screen.x-10, screen.y-10,20,20);
+                g.drawOval(screen.x-9, screen.y-9,18,18);
+            }
+
+//          lbl.setText("gpsd: "+status+" Speed: " + speed + " Course: "+course);
+//          lbl.setBounds(0, 0, mvs.width-10, mvs.height-10);
+//          Graphics sub = g.create(mvs.x+5, mvs.y+5, mvs.width-10, mvs.height-10);
+//          lbl.paint(sub);
+
+//          if(status != null) {
+//          g.setColor(Color.WHITE);
+//          g.drawString("gpsd: " + status, 5, mv.getBounds().height - 15); // lower left corner
+//          }
+        }
+    }
+
     /* (non-Javadoc)
      * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
@@ -154,5 +154,5 @@
             }
         }
-        
+
     }
 
Index: applications/editors/josm/plugins/livegps/livegps/LiveGpsLock.java
===================================================================
--- applications/editors/josm/plugins/livegps/livegps/LiveGpsLock.java	(revision 12598)
+++ applications/editors/josm/plugins/livegps/livegps/LiveGpsLock.java	(revision 12778)
@@ -1,4 +1,4 @@
 /**
- * 
+ *
  */
 package livegps;
@@ -8,5 +8,5 @@
  * read or write live gps data must synchronize to this class. Especially the save action
  * takes quite long, so concurrency problems occur.
- * 
+ *
  * @author cdaller
  *
Index: applications/editors/josm/plugins/livegps/livegps/LiveGpsPlugin.java
===================================================================
--- applications/editors/josm/plugins/livegps/livegps/LiveGpsPlugin.java	(revision 12598)
+++ applications/editors/josm/plugins/livegps/livegps/LiveGpsPlugin.java	(revision 12778)
@@ -24,6 +24,6 @@
 public class LiveGpsPlugin extends Plugin
 {
-	private LiveGpsAcquirer acquirer = null;
-	private Thread acquirerThread = null;
+    private LiveGpsAcquirer acquirer = null;
+    private Thread acquirerThread = null;
     private JMenu lgpsmenu;
     private JCheckBoxMenuItem lgpscapture;
@@ -32,9 +32,9 @@
     private LiveGpsDialog lgpsdialog;
     List<PropertyChangeListener>listenerQueue;
-        
-	private GpxData data = new GpxData();
+
+    private GpxData data = new GpxData();
     private LiveGpsLayer lgpslayer;
-    
-	
+
+
     public class CaptureAction extends JosmAction {
         public CaptureAction() {
@@ -77,5 +77,5 @@
     }
 
-    public LiveGpsPlugin() 
+    public LiveGpsPlugin()
     {
         MainMenu menu = Main.main.menu;
@@ -111,5 +111,5 @@
         }
     }
-    
+
     /**
      * Returns <code>true</code> if autocenter is selected.
@@ -119,5 +119,5 @@
         return lgpsautocenter.isSelected();
     }
-    
+
     /**
      * Enable or disable gps tracking
@@ -155,6 +155,6 @@
         }
     }
-    
-    
+
+
     /**
      * Add a listener for gps events.
Index: applications/editors/josm/plugins/livegps/livegps/LiveGpsStatus.java
===================================================================
--- applications/editors/josm/plugins/livegps/livegps/LiveGpsStatus.java	(revision 12598)
+++ applications/editors/josm/plugins/livegps/livegps/LiveGpsStatus.java	(revision 12778)
@@ -1,4 +1,4 @@
 /**
- * 
+ *
  */
 package livegps;
