Index: trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 794)
+++ trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 795)
@@ -89,5 +89,5 @@
 			if (v.min != null && v.max != null) // && v.min.north() == v.max.north() && v.min.east() == v.max.east()) {
 			{
-				EastNorth en = Main.proj.latlon2eastNorth(new LatLon(0.001, 0.001));
+				EastNorth en = new EastNorth(0,0);
 				v.min = new EastNorth(v.min.east()-en.east(), v.min.north()-en.north());
 				v.max = new EastNorth(v.max.east()+en.east(), v.max.north()+en.north());
Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 794)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 795)
@@ -54,4 +54,5 @@
 	 */
 	protected final SortedMap<String, String> properties = new TreeMap<String, String>();
+	protected final SortedMap<String, String> defaults = new TreeMap<String, String>();
 
 	/**
@@ -118,4 +119,8 @@
 	}
 	synchronized public String get(final String key, final String def) {
+		if(!defaults.containsKey(key))
+			defaults.put(key, def);
+		else if(!defaults.get(key).equals(def))
+			System.out.println("Defaults for " + key + " differ: " + def + " != " + defaults.get(key));
 		if (override.containsKey(key)) 
 			return override.get(key);
@@ -139,8 +144,19 @@
 	}
 	
+	synchronized public Map<String, String> getDefaults()
+	{
+		return defaults;
+	}
+	
 	synchronized public boolean getBoolean(final String key) {
-		return getBoolean(key, false);
+		if (override.containsKey(key))
+			return override.get(key) == null ? false : Boolean.parseBoolean(override.get(key));
+		return properties.containsKey(key) ? Boolean.parseBoolean(properties.get(key)) : false;
 	}
 	synchronized public boolean getBoolean(final String key, final boolean def) {
+		if(!defaults.containsKey(key))
+			defaults.put(key, Boolean.toString(def));
+		else if(!defaults.get(key).equals(Boolean.toString(def)))
+			System.out.println("Defaults for " + key + " differ: " + def + " != " + defaults.get(key));
 		if (override.containsKey(key))
 			return override.get(key) == null ? def : Boolean.parseBoolean(override.get(key));
Index: trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 794)
+++ trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 795)
@@ -15,4 +15,5 @@
 import org.openstreetmap.josm.data.osm.visitor.Visitor;
 import org.openstreetmap.josm.tools.DateParser;
+import org.openstreetmap.josm.Main;
 
 
@@ -23,5 +24,5 @@
  * Although OsmPrimitive is designed as a base class, it is not to be meant to subclass
  * it by any other than from the package {@link org.openstreetmap.josm.data.osm}. The available primitives are a fixed set that are given
- * by the server environment and not an extendible data stuff. 
+ * by the server environment and not an extendible data stuff.
  *
  * @author imi
@@ -36,7 +37,7 @@
 	/**
 	 * Unique identifier in OSM. This is used to identify objects on the server.
-	 * An id of 0 means an unknown id. The object has not been uploaded yet to 
+	 * An id of 0 means an unknown id. The object has not been uploaded yet to
 	 * know what id it will get.
-	 * 
+	 *
 	 * Do not write to this attribute except you know exactly what you are doing.
 	 * More specific, it is not good to set this to 0 and think the object is now
@@ -50,5 +51,5 @@
 	 * the server. In this case, on next upload, this object will be updated.
 	 * Deleted objects are deleted from the server. If the objects are added (id=0),
-	 * the modified is ignored and the object is added to the server. 
+	 * the modified is ignored and the object is added to the server.
 	 */
 	public boolean modified = false;
@@ -66,24 +67,24 @@
 	 */
 	public boolean visible = true;
-	
-	/** 
+
+	/**
 	 * User that last modified this primitive, as specified by the server.
 	 * Never changed by JOSM.
 	 */
 	public User user = null;
-	
+
 	/**
 	 * true if this object is considered "tagged". To be "tagged", an object
 	 * must have one or more "non-standard" tags. "created_by" and "source"
-	 * are typically considered "standard" tags and do not make an object 
+	 * are typically considered "standard" tags and do not make an object
 	 * "tagged".
 	 */
 	public boolean tagged = false;
-	
+
 	/**
 	 * true if this object has direction dependent tags (e.g. oneway)
 	 */
 	public boolean hasDirectionKeys = false;
-	
+
 	/**
 	 * If set to true, this object is currently selected.
@@ -97,37 +98,37 @@
 	 */
 	public String timestamp = null;
-	
-	/**
-	 * The timestamp is only parsed when this is really necessary, and this 
+
+	/**
+	 * The timestamp is only parsed when this is really necessary, and this
 	 * is the cache for the result.
 	 */
 	public Date parsedTimestamp = null;
-	
+
 	/**
 	 * If set to true, this object is incomplete, which means only the id
 	 * and type is known (type is the objects instance class)
 	 */
-	public boolean incomplete = false; 
-
-	/** 
+	public boolean incomplete = false;
+
+	/**
 	 * Contains the version number as returned by the API. Needed to
 	 * ensure update consistency
 	 */
 	public int version = -1;
-	 
+
 	/**
 	 * Contains a list of "uninteresting" keys that do not make an object
 	 * "tagged".
-	 */
-	public static Collection<String> uninteresting = 
-		new HashSet<String>(Arrays.asList(new String[] {"source", "note", "converted_by", "created_by"}));
-	
+	 * Initialized by checkTagged()
+	 */
+	private static Collection<String> uninteresting = null;
+
 	/**
 	 * Contains a list of direction-dependent keys that make an object
 	 * direction dependent.
-	 */
-	public static Collection<String> directionKeys = 
-		new HashSet<String>(Arrays.asList(new String[] {"oneway", "incline", "incline_steep", "aerialway"}));
-	
+	 * Initialized by checkDirectionTagged()
+	 */
+	private static Collection<String> directionKeys = null;
+
 	/**
 	 * Implementation of the visitor scheme. Subclasses have to call the correct
@@ -142,5 +143,5 @@
 		modified = true;
 	}
-	
+
 	/**
 	 * Returns the timestamp for this object, or the current time if none is set.
@@ -157,22 +158,22 @@
 		}
 		return parsedTimestamp;
- 	}
-
-	/**
-	 * Equal, if the id (and class) is equal. 
-	 * 
+	}
+
+	/**
+	 * Equal, if the id (and class) is equal.
+	 *
 	 * An primitive is equal to its incomplete counter part.
 	 */
-    @Override public boolean equals(Object obj) {
-        if (id == 0) return obj == this;
-        if (obj instanceof OsmPrimitive) { // not null too
-            return ((OsmPrimitive)obj).id == id && obj.getClass() == getClass();
-        }
-        return false;
-    }
+	@Override public boolean equals(Object obj) {
+		if (id == 0) return obj == this;
+		if (obj instanceof OsmPrimitive) { // not null too
+			return ((OsmPrimitive)obj).id == id && obj.getClass() == getClass();
+		}
+		return false;
+	}
 
 	/**
 	 * Return the id plus the class type encoded as hashcode or super's hashcode if id is 0.
-	 * 
+	 *
 	 * An primitive has the same hashcode as its incomplete counterpart.
 	 */
@@ -204,5 +205,5 @@
 		}
 		checkTagged();
-                checkDirectionTagged();
+		checkDirectionTagged();
 	}
 	/**
@@ -216,5 +217,5 @@
 		}
 		checkTagged();
-                checkDirectionTagged();
+		checkDirectionTagged();
 	}
 
@@ -256,5 +257,5 @@
 
 	/**
-	 * Perform an equality compare for all non-volatile fields not only for the id 
+	 * Perform an equality compare for all non-volatile fields not only for the id
 	 * but for the whole object (for conflict resolving)
 	 * @param semanticOnly if <code>true</code>, modified flag and timestamp are not compared
@@ -264,5 +265,5 @@
 			id == osm.id &&
 			incomplete == osm.incomplete &&
-			(semanticOnly || (modified == osm.modified)) && 
+			(semanticOnly || (modified == osm.modified)) &&
 			deleted == osm.deleted &&
 			(semanticOnly || (timestamp == null ? osm.timestamp==null : timestamp.equals(osm.timestamp))) &&
@@ -272,9 +273,9 @@
 			(keys == null ? osm.keys==null : keys.equals(osm.keys));
 	}
-	
+
 	public String getTimeStr() {
 		return timestamp == null ? null : new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(timestamp);
 	}
-	
+
 	/**
 	 * Updates the "tagged" flag. "keys" property should probably be made private
@@ -283,4 +284,7 @@
 	public void checkTagged() {
 		tagged = false;
+		if(uninteresting == null)
+			uninteresting = new HashSet<String>(Arrays.asList(Main.pref.get("tags.uninteresting",
+			"source;note;converted_by;created_by").split(";")));
 		if (keys != null) {
 			for (Entry<String,String> e : keys.entrySet()) {
@@ -292,20 +296,21 @@
 		}
 	}
-    /**
-     * Updates the "hasDirectionKeys" flag. "keys" property should probably be made private
-     * to make sure this gets called when keys are set.
-     */
-    public void checkDirectionTagged() {
-        hasDirectionKeys = false;
-        if (keys != null) {
-            for (Entry<String,String> e : keys.entrySet()) {
-                if (directionKeys.contains(e.getKey())) {
-                    hasDirectionKeys = true;
-                    break;
-                }
-            }
-        }
-
-    }
-	
+	/**
+	 * Updates the "hasDirectionKeys" flag. "keys" property should probably be made private
+	 * to make sure this gets called when keys are set.
+	 */
+	public void checkDirectionTagged() {
+		hasDirectionKeys = false;
+		if(directionKeys == null)
+			directionKeys = new HashSet<String>(Arrays.asList(Main.pref.get("tags.direction",
+			"oneway;incline;incline_step;aerialway").split(";")));
+		if (keys != null) {
+			for (Entry<String,String> e : keys.entrySet()) {
+				if (directionKeys.contains(e.getKey())) {
+					hasDirectionKeys = true;
+					break;
+				}
+			}
+		}
+	}
 }
Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 794)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 795)
@@ -110,20 +110,4 @@
 			} else {
 				Main.pref.load();
-				
-				// this is temporary code to ease the transition to built-in mappaint
-				List<String> plugins = new LinkedList<String>();
-				if (Main.pref.hasKey("plugins"))
-					plugins.addAll(Arrays.asList(Main.pref.get("plugins").split(",")));
-								
-				if (plugins.contains("mappaint")) {
-					plugins.remove("mappaint");
-					// XXX is there really no "public static String.join" or something?
-					StringBuilder tmp = new StringBuilder();
-					for (String p : plugins) { if (tmp.length()>0) tmp.append(","); tmp.append(p); }
-					Main.pref.put("plugins", tmp.toString());
-					Main.pref.put("draw.wireframe", false);
-				} else if (!Main.pref.hasKey("draw.wireframe")) {
-					Main.pref.put("draw.wireframe", true);
-				}
 			}
 		} catch (final IOException e1) {
Index: trunk/src/org/openstreetmap/josm/gui/MainMenu.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 794)
+++ trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 795)
@@ -195,5 +195,5 @@
 		// TODO move code to an "action" like the others?
         final JCheckBoxMenuItem wireframe = new JCheckBoxMenuItem(tr("Wireframe view"));
-        wireframe.setSelected(Main.pref.getBoolean("draw.wireframe", true));     
+		wireframe.setSelected(Main.pref.getBoolean("draw.wireframe", false));
         wireframe.setAccelerator(KeyStroke.getKeyStroke("ctrl W"));
         wireframe.addActionListener(new ActionListener() {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java	(revision 794)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java	(revision 795)
@@ -422,5 +422,5 @@
 		// menu.
 		if (TaggingPresetPreference.taggingPresets.size() > 0 && 
-				Main.pref.getBoolean("taggingpresets.in-properties-dialog", false)) {
+				Main.pref.getBoolean("taggingpreset.in-properties-dialog", false)) {
 			Vector<ActionListener> allPresets = new Vector<ActionListener>();
 			for (final TaggingPreset p : TaggingPresetPreference.taggingPresets)
Index: trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 794)
+++ trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 795)
@@ -148,5 +148,5 @@
 	@Override public void paint(final Graphics g, final MapView mv) {
 		boolean inactive = Main.map.mapView.getActiveLayer() != this && Main.pref.getBoolean("draw.data.inactive_color", true);
-		if (Main.pref.getBoolean("draw.data.downloaded_area", false)) {
+		if (Main.pref.getBoolean("draw.data.downloaded_area", true)) {
 			// FIXME this is inefficient; instead a proper polygon has to be built, and instead
 			// of drawing the outline, the outlying areas should perhaps be shaded.
Index: trunk/src/org/openstreetmap/josm/gui/preferences/AdvancedPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/AdvancedPreference.java	(revision 794)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/AdvancedPreference.java	(revision 795)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.awt.Component;
 import java.awt.Dimension;
 import java.awt.GridBagLayout;
@@ -22,4 +23,5 @@
 import javax.swing.JTable;
 import javax.swing.JTextField;
+import javax.swing.table.DefaultTableCellRenderer;
 import javax.swing.table.DefaultTableModel;
 
@@ -30,4 +32,5 @@
 
 	private Map<String,String> orig;
+	private Map<String,String> defaults;
 	private DefaultTableModel model;
 
@@ -35,10 +38,30 @@
 		JPanel p = gui.createPreferenceTab("advanced", tr("Advanced Preferences"), tr("Setting Preference entries directly. Use with caution!"));
 
-		model = new DefaultTableModel(new String[]{"Key", "Value"},0) {
+		model = new DefaultTableModel(new String[]{tr("Key"), tr("Value")},0) {
 			@Override public boolean isCellEditable(int row, int column) {
 				return column != 0;
 			}
 		};
+		DefaultTableCellRenderer renderer = new DefaultTableCellRenderer(){
+			public Component getTableCellRendererComponent(JTable table, Object value,
+				boolean isSelected, boolean hasFocus, int row, int column)
+			{
+				JLabel label=new JLabel();
+				String s = defaults.get((String)value);
+				if(s != null)
+				{
+					if(s.equals(model.getValueAt(row, 1)))
+						label.setToolTipText(tr("Current value is default."));
+					else
+						label.setToolTipText(tr("Default value is ''{0}''.", s));
+				}
+				else
+					label.setToolTipText(tr("Default value currently unknown (setting has not been used yet)."));
+				label.setText((String)value);
+				return label;
+			};
+		};
 		final JTable list = new JTable(model);
+		list.getColumn(tr("Key")).setCellRenderer(renderer);
 		JScrollPane scroll = new JScrollPane(list);
 		p.add(scroll, GBC.eol().fill(GBC.BOTH));
@@ -46,8 +69,19 @@
 
 		orig = Main.pref.getAllPrefix("");
+		defaults = Main.pref.getDefaults();
 		orig.remove("osm-server.password");
+		TreeSet<String> ts = new TreeSet<String>(orig.keySet());
+		for (String s : defaults.keySet())
+		{
+			if(!ts.contains(s))
+				ts.add(s);
+		}
 
-		for (String s : new TreeSet<String>(orig.keySet()))
-			model.addRow(new String[]{s, Main.pref.get(s)});
+		for (String s : ts)
+		{
+			String val = Main.pref.get(s);
+			if(val == null) val = "";
+			model.addRow(new String[]{s, val});
+		}
 
 		JButton add = new JButton(tr("Add"));
@@ -85,6 +119,6 @@
 					return;
 				}
-				while (list.getSelectedRow() != -1)
-					model.removeRow(list.getSelectedRow());
+				for(int row: list.getSelectedRows())
+					model.setValueAt("", row, 1);
 			}
 		});
@@ -100,10 +134,13 @@
 	public void ok() {
 		for (int i = 0; i < model.getRowCount(); ++i) {
-			String key = model.getValueAt(i,0).toString();
 			String value = model.getValueAt(i,1).toString();
-			String origValue = orig.get(key);
-			if (origValue == null || !origValue.equals(value))
-				Main.pref.put(key, value);
-			orig.remove(key); // processed.
+			if(value.length() != 0)
+			{
+				String key = model.getValueAt(i,0).toString();
+				String origValue = orig.get(key);
+				if (origValue == null || !origValue.equals(value))
+					Main.pref.put(key, value);
+				orig.remove(key); // processed.
+			}
 		}
 		for (Entry<String, String> e : orig.entrySet())
Index: trunk/src/org/openstreetmap/josm/gui/preferences/AudioPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/AudioPreference.java	(revision 794)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/AudioPreference.java	(revision 795)
@@ -135,5 +135,5 @@
 		gui.audio.add(audioMarkersFromStart, GBC.eol().insets(10,0,0,0));
 		
-		audioForwardBackAmount.setText(Main.pref.get("audio.forwardbackamount", "10"));
+		audioForwardBackAmount.setText(Main.pref.get("audio.forwardbackamount", "10.0"));
 		audioForwardBackAmount.setToolTipText(tr("The number of seconds to jump forward or back when the relevant button is pressed"));
 		gui.audio.add(new JLabel(tr("Forward/back time (seconds)")), GBC.std());
