Index: /CONTRIBUTION
===================================================================
--- /CONTRIBUTION	(revision 108)
+++ /CONTRIBUTION	(revision 109)
@@ -11,7 +11,13 @@
 2.0. The world image is from onearth.pl.
 
-The gettext-commons-0.9.jar is from Felix Berger and Steffen Pingel (http://xnap-commons.sourceforge.net/gettext-commons/). The jar-file is licensed under LGPL.
+The gettext-commons-0.9.jar is from Felix Berger and Steffen 
+Pingel (http://xnap-commons.sourceforge.net/gettext-commons/).
+The jar-file is licensed under LGPL.
 
-A internationalization-patch was submited 2006 by Sven Anders <sven@anders-hamburg.de>.
+An internationalization-patch was submited 2006 by Sven 
+Anders <sven@anders-hamburg.de>.
+
+Several smaller patches are contributed by community members
+of OSM.
 
 All the rest are belong to me.
Index: /build.xml
===================================================================
--- /build.xml	(revision 109)
+++ /build.xml	(revision 109)
@@ -0,0 +1,48 @@
+<project name="openstreetmap" default="dist" basedir=".">
+
+  <property name="src" location="src"/>
+  <property name="build" location="build"/>
+  <property name="dist" location="dist"/>
+  <property name="lib" location="lib"/>
+
+  <target name="init">
+    <tstamp/>
+    <mkdir dir="${build}"/>
+    <mkdir dir="${dist}"/>
+  </target>
+
+
+  <target name="compile" depends="init">
+    <javac srcdir="${src}"
+      classpath="${lib}/MinML2.jar:${lib}/gettext-commons-0.9.jar:${lib}/metadata-extractor-2.3.1.jar"
+      debug="true"
+      optimize="off"
+      destdir="${build}"
+      />
+  </target>
+
+  <target name="dist" depends="compile">
+
+    <!-- jars -->
+    <unjar src="${lib}/MinML2.jar" dest="${build}"/>
+    <unjar src="${lib}/gettext-commons-0.9.jar" dest="${build}"/>
+    <unjar src="${lib}/metadata-extractor-2.3.1.jar" dest="${build}"/>
+
+    <!-- images -->
+    <copy todir="${build}/images">
+      <fileset dir="images"/>
+    </copy>
+
+    <jar destfile="${dist}/josm-custom.jar" basedir="${build}">
+      <manifest>
+        <attribute name="Main-class" value="org.openstreetmap.josm.gui.MainApplication" />
+      </manifest> 
+    </jar>
+  </target>
+
+  <target name="clean">
+    <delete dir="${build}"/>
+    <delete dir="${dist}"/>
+  </target>
+
+</project>
Index: /src/org/openstreetmap/josm/io/ProgressReader.java
===================================================================
--- /src/org/openstreetmap/josm/io/ProgressReader.java	(revision 108)
+++ /src/org/openstreetmap/josm/io/ProgressReader.java	(revision 109)
@@ -3,6 +3,4 @@
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
 import java.net.URLConnection;
 
@@ -16,11 +14,14 @@
 public class ProgressReader extends InputStream {
 
-	private final Reader in;
+	private final InputStream in;
 	private final BoundedRangeModel progress;
 	private final JLabel currentAction;
 	private int readSoFar = 0;
+	private int lastDialogUpdate = 0;
+	private final URLConnection connection;
 
 	public ProgressReader(URLConnection con, BoundedRangeModel progress, JLabel currentAction) throws IOException {
-		this.in = new InputStreamReader(con.getInputStream());
+		this.connection = con;
+		this.in = con.getInputStream();
 		this.progress = progress;
 		this.currentAction = currentAction;
@@ -31,5 +32,5 @@
 			progress.setMaximum(0);
 		progress.setValue(0);
-    }
+	}
 
 	@Override public void close() throws IOException {
@@ -37,23 +38,42 @@
 	}
 
+	@Override public int read(byte[] b, int off, int len) throws IOException {
+		int read = in.read(b, off, len);
+		if (read != -1)
+			advanceTicker(read);
+		return read;
+	}
+
 	@Override public int read() throws IOException {
 		int read = in.read();
-		readSoFar++;
+		if (read != -1)
+			advanceTicker(1);
+		return read;
+	}
 
-		String progStr = " ("+readSoFar+"/";
-		if (progress.getMaximum() == 0)
-			progStr += "???)";
-		else
-			progStr += progress.getMaximum()+")";
-		
-		String cur = currentAction.getText();
-		int i = cur.indexOf(' ');
-		if (i != -1)
-			cur = cur.substring(0, i) + progStr;
-		else
-			cur += progStr;
-		currentAction.setText(cur);
-		progress.setValue(readSoFar);
-		return read;
-    }
+	/**
+	 * Increase ticker (progress counter and displayed text) by the given amount.
+	 * @param amount
+	 */
+	private void advanceTicker(int amount) {
+		if (progress.getMaximum() == 0 && connection.getContentLength() != -1)
+			progress.setMaximum(connection.getContentLength());
+
+		readSoFar += amount;
+
+		if (readSoFar / 1024 != lastDialogUpdate) {
+			lastDialogUpdate++;
+			String progStr = " "+readSoFar/1024+"/";
+			progStr += (progress.getMaximum()==0) ? "??? KB" : (progress.getMaximum()/1024)+" KB";
+			progress.setValue(readSoFar);
+
+			String cur = currentAction.getText();
+			int i = cur.indexOf(' ');
+			if (i != -1)
+				cur = cur.substring(0, i) + progStr;
+			else
+				cur += progStr;
+			currentAction.setText(cur);
+		}
+	}
 }
