Index: applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java
===================================================================
--- applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java	(revision 22017)
+++ applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java	(revision 23190)
@@ -82,5 +82,5 @@
 
         @Override
-		public String toString() {
+        public String toString() {
             return this.name().toLowerCase();
         }
@@ -134,8 +134,8 @@
      */
     private JPanel initComponents() {
-    	JLabel visibilityLabel = new JLabel(tr("Visibility"));
+        JLabel visibilityLabel = new JLabel(tr("Visibility"));
         visibilityLabel.setToolTipText(tr("Defines the visibility of your trace for other OSM users."));
         for(visibility v : visibility.values()) {
-        	visibilityCombo.addItem(v.description);
+            visibilityCombo.addItem(v.description);
         }
         UrlLabel visiUrl = new UrlLabel(tr("http://wiki.openstreetmap.org/wiki/Visibility_of_GPS_traces"), tr("(What does that mean?)"));
@@ -205,53 +205,53 @@
      */
     private void upload(String description, String tags, String visi, GpxData gpxData, ProgressMonitor progressMonitor) throws IOException {
-    	progressMonitor.beginTask(null);
-    	try {
-    		if(checkForErrors(username, password, description, gpxData))
-    			return;
-
-    		// Clean description/tags from disallowed chars
-    		description = description.replaceAll("[&?/\\\\]"," ");
-    		tags = tags.replaceAll("[&?/\\\\.;]"," ");
-
-    		// Set progress dialog to indeterminate while connecting
-    		progressMonitor.indeterminateSubTask(tr("Connecting..."));
-
-    		try {
-    			// Generate data for upload
-    			ByteArrayOutputStream baos  = new ByteArrayOutputStream();
-    			writeGpxFile(baos, "file", gpxData);
-    			writeField(baos, "description", description);
-    			writeField(baos, "tags", (tags != null && tags.length() > 0) ? tags : "");
-    			writeField(baos, "visibility", visi);
-    			writeString(baos, "--" + BOUNDARY + "--" + LINE_END);
-
-    			ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
-    			HttpURLConnection conn = setupConnection(baos.size());
-
-    			progressMonitor.setTicksCount(baos.size());
-    			progressMonitor.subTask(null);
-
-    			try {
-    				flushToServer(bais, conn.getOutputStream(), progressMonitor);
-    			} catch(Exception e) {}
-
-    			if(cancelled) {
-    				conn.disconnect();
-    				OutputDisplay.setText(tr("Upload cancelled"));
-    				buttons.get(0).setEnabled(true);
-    				cancelled = false;
-    			} else {
-    				boolean success = finishUpConnection(conn);
-    				buttons.get(0).setEnabled(!success);
-    				if(success)
-    					buttons.get(1).setText(tr("Close"));
-    			}
-    		} catch(Exception e) {
-    			OutputDisplay.setText(tr("Error while uploading"));
-    			e.printStackTrace();
-    		}
-    	} finally {
-    		progressMonitor.finishTask();
-    	}
+        progressMonitor.beginTask(null);
+        try {
+            if(checkForErrors(username, password, description, gpxData))
+                return;
+
+            // Clean description/tags from disallowed chars
+            description = description.replaceAll("[&?/\\\\]"," ");
+            tags = tags.replaceAll("[&?/\\\\.;]"," ");
+
+            // Set progress dialog to indeterminate while connecting
+            progressMonitor.indeterminateSubTask(tr("Connecting..."));
+
+            try {
+                // Generate data for upload
+                ByteArrayOutputStream baos  = new ByteArrayOutputStream();
+                writeGpxFile(baos, "file", gpxData);
+                writeField(baos, "description", description);
+                writeField(baos, "tags", (tags != null && tags.length() > 0) ? tags : "");
+                writeField(baos, "visibility", visi);
+                writeString(baos, "--" + BOUNDARY + "--" + LINE_END);
+
+                ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+                HttpURLConnection conn = setupConnection(baos.size());
+
+                progressMonitor.setTicksCount(baos.size());
+                progressMonitor.subTask(null);
+
+                try {
+                    flushToServer(bais, conn.getOutputStream(), progressMonitor);
+                } catch(Exception e) {}
+
+                if(cancelled) {
+                    conn.disconnect();
+                    OutputDisplay.setText(tr("Upload cancelled"));
+                    buttons.get(0).setEnabled(true);
+                    cancelled = false;
+                } else {
+                    boolean success = finishUpConnection(conn);
+                    buttons.get(0).setEnabled(!success);
+                    if(success)
+                        buttons.get(1).setText(tr("Close"));
+                }
+            } catch(Exception e) {
+                OutputDisplay.setText(tr("Error while uploading"));
+                e.printStackTrace();
+            }
+        } finally {
+            progressMonitor.finishTask();
+        }
     }
 
Index: applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGuiPlugin.java
===================================================================
--- applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGuiPlugin.java	(revision 22017)
+++ applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGuiPlugin.java	(revision 23190)
@@ -27,5 +27,5 @@
 
     public UploadDataGuiPlugin(PluginInformation info) {
-    	super(info);
+        super(info);
         openaction = new UploadAction();
         Main.main.menu.toolsMenu.add(openaction);
@@ -44,13 +44,13 @@
 
         @Override
-		protected void updateEnabledState() {
-           	// enable button if there is "one active GpxLayer" or "exactly one GpxLayer in the list of all layers available"
-           	if(Main.map == null
+        protected void updateEnabledState() {
+            // enable button if there is "one active GpxLayer" or "exactly one GpxLayer in the list of all layers available"
+            if(Main.map == null
                     || Main.map.mapView == null
                     || Main.map.mapView.getActiveLayer() == null
-                    || !(Main.map.mapView.getActiveLayer() instanceof GpxLayer)) {                
+                    || !(Main.map.mapView.getActiveLayer() instanceof GpxLayer)) {
                 setEnabled(false);
             } else {
-            	setEnabled(true);
+                setEnabled(true);
             }
 
@@ -61,5 +61,5 @@
             }
 
-        }		
+        }
     }
 }
