Index: applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java
===================================================================
--- applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java	(revision 4086)
+++ applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java	(revision 4087)
@@ -65,5 +65,6 @@
 	public OSMValidatorPlugin()
 	{
-        initializeTests( getTests(true) );
+		PreferenceEditor.importOldPreferences();
+        initializeTests( getTests(true, true) );
 	}
 	
@@ -124,15 +125,16 @@
 	 * Gets a collection with the available tests
 	 * 
-	 * @param onlyActive if true, gets only active tests
+	 * @param enabled if false, don't get enabled tests
+	 * @param enabledBeforeUpload if false, don't get tests enabled before upload
 	 * @return A collection with the available tests
 	 */
-	public static Collection<Test> getTests(boolean onlyActive)
+	public static Collection<Test> getTests(boolean enabled, boolean enabledBeforeUpload)
 	{
 		Map<String, Test> enabledTests = new LinkedHashMap<String, Test>();
 		for(Class<Test> testClass : getAllAvailableTests() )
 		{
-			Test test;
 			try {
-				test = testClass.newInstance();
+				Test test = testClass.newInstance();
+				enabledTests.put(testClass.getSimpleName(), test);
 			}
 			catch( Exception e)
@@ -141,13 +143,8 @@
 				continue;
 			}
-			test.enabled = true;
-            
-            String simpleName = testClass.getSimpleName();
-            test.testBeforeUpload = Main.pref.getBoolean( "tests." + simpleName + ".checkBeforeUpload", true);            
-			enabledTests.put(simpleName, test);
 		}
 
 		Pattern regexp = Pattern.compile("(\\w+)=(true|false),?");
-		Matcher m = regexp.matcher(Main.pref.get("tests"));
+		Matcher m = regexp.matcher(Main.pref.get(PreferenceEditor.PREF_TESTS));
 		int pos = 0;
 		while( m.find(pos) )
@@ -157,10 +154,24 @@
 			if( test != null )
 			{
-				test.enabled = Boolean.valueOf(m.group(2)).booleanValue();
-				if( onlyActive && !test.enabled)
+				test.enabled = Boolean.valueOf(m.group(2));
+			}
+			pos = m.end();
+		}
+
+		m = regexp.matcher(Main.pref.get( PreferenceEditor.PREF_TESTS_BEFORE_UPLOAD ));
+		pos = 0;
+		while( m.find(pos) )
+		{
+			String testName = m.group(1);
+			Test test = enabledTests.get(testName);
+			if( test != null )
+			{
+				test.testBeforeUpload = Boolean.valueOf(m.group(2));
+				if( !enabled && test.enabled || !enabledBeforeUpload && test.testBeforeUpload)
 					enabledTests.remove(test.getClass().getSimpleName() );
 			}
 			pos = m.end();
 		}
+		
 		return enabledTests.values();
 	}
Index: applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/PreferenceEditor.java
===================================================================
--- applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/PreferenceEditor.java	(revision 4086)
+++ applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/PreferenceEditor.java	(revision 4087)
@@ -4,7 +4,7 @@
 
 import java.awt.GridBagLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
 import java.util.Collection;
+import java.util.Map;
+import java.util.regex.Pattern;
 
 import javax.swing.*;
@@ -24,4 +24,13 @@
 public class PreferenceEditor implements PreferenceSetting
 {
+	/** The preferences prefix */
+	public static final String PREFIX = "validator";
+	
+	/** The preferences key for enabled tests */
+	public static final String PREF_TESTS = PREFIX + ".tests";
+
+	/** The preferences key for enabled tests before upload*/
+	public static final String PREF_TESTS_BEFORE_UPLOAD = PREFIX + ".testsBeforeUpload";
+
 	/** The list of all tests */
 	private Collection<Test> allTests;
@@ -35,21 +44,9 @@
         testPanel.add( new JLabel("On upload"), GBC.eop() );
         
-		allTests = OSMValidatorPlugin.getTests(false);
-		for(final Test test: allTests) 
+		allTests = OSMValidatorPlugin.getTests(true, true);
+		for(Test test: allTests) 
 		{
-			final JCheckBox testCheck = new JCheckBox(test.name, test.enabled);
-			testCheck.setToolTipText(test.description);
-			testPanel.add(testCheck, GBC.std().insets(20,0,0,0));
-
-            testCheck.addActionListener(new ActionListener(){
-                public void actionPerformed(ActionEvent e) {
-                    boolean selected = testCheck.isSelected();
-                    test.enabled = selected;
-                    test.setGuiEnabled(selected );
-                }
-            });
-            
             test.addGui(testPanel);
-            test.setGuiEnabled(test.enabled);
+            test.setGuiEnabled(test.enabled || test.testBeforeUpload);
 		}
 		
@@ -68,24 +65,54 @@
 	public void ok() 
 	{
-		String tests = "";
+		StringBuilder tests = new StringBuilder();
+		StringBuilder testsBeforeUpload = new StringBuilder();
 		
 		for (Test test : allTests)
 		{
-			boolean enabled = test.enabled;
+			test.ok();
 			String name = test.getClass().getSimpleName();
-			tests += name + "=" + enabled + ",";
-			
-			if (enabled)
-			{
-				test.ok();
-			}
+			tests.append( ',' ).append( name ).append( '=' ).append( test.enabled );
+			testsBeforeUpload.append( ',' ).append( name ).append( '=' ).append( test.testBeforeUpload );
 		}
 		
-		if (tests.endsWith(","))
-			tests = tests.substring(0, tests.length() - 1);
+		if (tests.length() > 0 ) tests = tests.deleteCharAt(0);
+		if (testsBeforeUpload.length() > 0 ) testsBeforeUpload = testsBeforeUpload.deleteCharAt(0);
 		
 		OSMValidatorPlugin.getPlugin().initializeTests( allTests );
 		
-		Main.pref.put("tests", tests);
+		Main.pref.put( PREF_TESTS, tests.toString());
+		Main.pref.put( PREF_TESTS_BEFORE_UPLOAD, testsBeforeUpload.toString());
+	}
+	
+	/**
+	 * Import old stored preferences
+	 */
+	public static void importOldPreferences()
+	{
+		if( !Main.pref.hasKey("tests") || !Pattern.matches("(\\w+=(true|false),?)*", Main.pref.get("tests")) )
+			return;
+		
+		String enabledTests = Main.pref.get("tests");
+		Main.pref.put(PREF_TESTS, enabledTests);
+		Main.pref.put("tests", null );
+		
+		StringBuilder testsBeforeUpload = new StringBuilder();
+		Map<String, String> oldPrefs = Main.pref.getAllPrefix("tests");
+		for( Map.Entry<String, String> pref : oldPrefs.entrySet() )
+		{
+			String key = pref.getKey();
+			String value = pref.getValue();
+			if( key.endsWith(".checkBeforeUpload") )
+			{
+				String testName = key.substring(6, key.length() - 18);
+				testsBeforeUpload.append( ',' ).append( testName ).append( '=' ).append( value );
+			}
+			else
+				Main.pref.put( PREFIX + key.substring(5), value );
+			Main.pref.put(key, null );
+		}
+		
+		if (testsBeforeUpload.length() > 0 ) testsBeforeUpload = testsBeforeUpload.deleteCharAt(0);
+		Main.pref.put( PREF_TESTS_BEFORE_UPLOAD, testsBeforeUpload.toString());
 	}
 
Index: applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/Test.java
===================================================================
--- applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/Test.java	(revision 4086)
+++ applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/Test.java	(revision 4087)
@@ -1,10 +1,13 @@
 package org.openstreetmap.josm.plugins.validator;
 
-import java.util.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
 
 import javax.swing.JCheckBox;
 import javax.swing.JPanel;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.command.Command;
 import org.openstreetmap.josm.data.osm.*;
@@ -29,12 +32,15 @@
 	protected String description;
 	
-    /** Whether this test is enabled. Used by peferences */
-    protected boolean enabled;
+    /** Whether this test is enabled. Enabled by default */
+    protected boolean enabled = true;
+
+    /** The preferences check for validation */
+    protected JCheckBox checkEnabled;
 
     /** The preferences check for validation on upload */
     protected JCheckBox checkBeforeUpload;
     
-    /** Whether this test must check before upload. Used by peferences */
-    protected boolean testBeforeUpload;
+    /** Whether this test must check before upload. Enabled by default */
+    protected boolean testBeforeUpload = true;
 
     /** Whether this test is performing just before an upload */
@@ -134,6 +140,20 @@
 	public void addGui(@SuppressWarnings("unused") JPanel testPanel) 
 	{
+		checkEnabled = new JCheckBox(name, enabled);
+		checkEnabled.setToolTipText(description);
+        checkEnabled.addActionListener(new ActionListener(){
+            public void actionPerformed(ActionEvent e) {
+                setGuiEnabled(checkEnabled.isSelected() || checkBeforeUpload.isSelected() );
+            }
+        });
+		testPanel.add(checkEnabled, GBC.std().insets(20,0,0,0));
+		
         checkBeforeUpload = new JCheckBox();
         checkBeforeUpload.setSelected(testBeforeUpload);
+        checkBeforeUpload.addActionListener(new ActionListener(){
+            public void actionPerformed(ActionEvent e) {
+                setGuiEnabled(checkEnabled.isSelected() || checkBeforeUpload.isSelected() );
+            }
+        });
         testPanel.add(checkBeforeUpload, GBC.eop().insets(20,0,0,0));
 	}
@@ -145,5 +165,4 @@
     public void setGuiEnabled(boolean enabled)
     {
-        checkBeforeUpload.setEnabled(enabled);
     }   
 
@@ -153,6 +172,6 @@
 	public void ok() 
 	{
-        String simpleName = getClass().getSimpleName();
-        Main.pref.put("tests." + simpleName + ".checkBeforeUpload", checkBeforeUpload.isSelected() );
+		enabled = checkEnabled.isSelected();
+		testBeforeUpload = checkBeforeUpload.isSelected();
 	}
 	
Index: applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidateAction.java
===================================================================
--- applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidateAction.java	(revision 4086)
+++ applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidateAction.java	(revision 4087)
@@ -58,5 +58,5 @@
             return;
         
-		Collection<Test> tests = OSMValidatorPlugin.getTests(true);
+		Collection<Test> tests = OSMValidatorPlugin.getTests(true, false);
 		if( tests.isEmpty() )
 			return;
Index: applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidateUploadHook.java
===================================================================
--- applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidateUploadHook.java	(revision 4086)
+++ applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidateUploadHook.java	(revision 4087)
@@ -32,5 +32,5 @@
     public boolean checkUpload(Collection<OsmPrimitive> add, Collection<OsmPrimitive> update, Collection<OsmPrimitive> delete)
     {
-        Collection<Test> tests = OSMValidatorPlugin.getTests(true);
+        Collection<Test> tests = OSMValidatorPlugin.getTests(false, true);
         if( tests.isEmpty() )
             return true;
Index: applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/SpellCheck.java
===================================================================
--- applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/SpellCheck.java	(revision 4086)
+++ applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/SpellCheck.java	(revision 4087)
@@ -41,21 +41,22 @@
 	/** The spell check preset values */
 	protected static Bag<String, String> spellCheckValueData;
-	
+
+	/** The preferences prefix */
+	protected static final String PREFIX = PreferenceEditor.PREFIX + "." + SpellCheck.class.getSimpleName();
+    
     /** Preference name for checking values */
-    public static final String PREF_CHECK_VALUES = "tests." + SpellCheck.class.getSimpleName() + ".checkValues";
+    public static final String PREF_CHECK_VALUES 				= PREFIX + ".checkValues";
     /** Preference name for checking values */
-    public static final String PREF_CHECK_KEYS = "tests." + SpellCheck.class.getSimpleName() + ".checkKeys";
+    public static final String PREF_CHECK_KEYS 					= PREFIX + ".checkKeys";
     /** Preference name for checking FIXMES */
-    public static final String PREF_CHECK_FIXMES = "tests." + SpellCheck.class.getSimpleName() + ".checkFixmes";
+    public static final String PREF_CHECK_FIXMES 				= PREFIX + ".checkFixmes";
     /** Preference name for sources */
-    public static final String PREF_SOURCES = "tests." + SpellCheck.class.getSimpleName() + ".sources";
-    /** Preference name for global upload check */
-    public static final String PREF_CHECK_BEFORE_UPLOAD = "tests." + SpellCheck.class.getSimpleName() + ".checkBeforeUpload";
+    public static final String PREF_SOURCES 					= PREFIX + ".sources";
     /** Preference name for keys upload check */
-    public static final String PREF_CHECK_KEYS_BEFORE_UPLOAD = "tests." + SpellCheck.class.getSimpleName() + ".checkKeysBeforeUpload";
+    public static final String PREF_CHECK_KEYS_BEFORE_UPLOAD 	= PREFIX + ".checkKeysBeforeUpload";
     /** Preference name for values upload check */
-    public static final String PREF_CHECK_VALUES_BEFORE_UPLOAD = "tests." + SpellCheck.class.getSimpleName() + ".checkValuesBeforeUpload";
+    public static final String PREF_CHECK_VALUES_BEFORE_UPLOAD 	= PREFIX + ".checkValuesBeforeUpload";
     /** Preference name for fixmes upload check */
-    public static final String PREF_CHECK_FIXMES_BEFORE_UPLOAD = "tests." + SpellCheck.class.getSimpleName() + ".checkFixmesBeforeUpload";
+    public static final String PREF_CHECK_FIXMES_BEFORE_UPLOAD 	= PREFIX + ".checkFixmesBeforeUpload";
 	
     /** Whether to check keys */
@@ -364,5 +365,5 @@
 	public void addGui(JPanel testPanel)
 	{
-        testPanel.add( new JLabel(), GBC.eol());
+		testPanel.add( new JLabel(name), GBC.eol().insets(35,0,0,0) );
         
         boolean checkKeys = Main.pref.getBoolean(PREF_CHECK_KEYS, true);
@@ -433,13 +434,15 @@
         buttonPanel.add(deleteSrcButton, GBC.std().insets(0,5,0,0));
         
-        prefCheckKeys.addActionListener(new ActionListener(){
-            public void actionPerformed(ActionEvent e) {
-                boolean selected = prefCheckKeys.isSelected();
-                spellcheckSources.setEnabled( selected );
-                addSrcButton.setEnabled(selected);
-                editSrcButton.setEnabled(selected);
-                deleteSrcButton.setEnabled(selected);
-            }
-        });
+        ActionListener disableCheckKeysActionListener = new ActionListener(){
+		            public void actionPerformed(ActionEvent e) {
+		                boolean selected = prefCheckKeys.isSelected() || prefCheckKeysBeforeUpload.isSelected();
+		                spellcheckSources.setEnabled( selected );
+		                addSrcButton.setEnabled(selected);
+		                editSrcButton.setEnabled(selected);
+		                deleteSrcButton.setEnabled(selected);
+		            }
+		        };
+		prefCheckKeys.addActionListener(disableCheckKeysActionListener);
+		prefCheckKeysBeforeUpload.addActionListener(disableCheckKeysActionListener);
         
         spellcheckSources.setEnabled( checkKeys );
@@ -465,21 +468,10 @@
 	}
 
-    public void setGuiEnabled(boolean enabled)
-    {
-        prefCheckKeys.setEnabled(enabled);
-        prefCheckKeysBeforeUpload.setEnabled(enabled);
-        spellcheckSources.setEnabled( enabled );
-        addSrcButton.setEnabled(enabled);
-        editSrcButton.setEnabled(enabled);
-        deleteSrcButton.setEnabled(enabled);
-        prefCheckValues.setEnabled(enabled);
-        prefCheckValuesBeforeUpload.setEnabled(enabled);
-        prefCheckFixmes.setEnabled(enabled);
-        prefCheckFixmesBeforeUpload.setEnabled(enabled);
-    } 
-    
 	@Override
 	public void ok() 
 	{
+		enabled = prefCheckKeys.isSelected() || prefCheckValues.isSelected() || prefCheckFixmes.isSelected();
+        testBeforeUpload = prefCheckKeysBeforeUpload.isSelected() || prefCheckValuesBeforeUpload.isSelected() || prefCheckFixmesBeforeUpload.isSelected();
+		
         Main.pref.put(PREF_CHECK_VALUES, prefCheckValues.isSelected());
         Main.pref.put(PREF_CHECK_KEYS, prefCheckKeys.isSelected());
@@ -488,5 +480,4 @@
         Main.pref.put(PREF_CHECK_KEYS_BEFORE_UPLOAD, prefCheckKeysBeforeUpload.isSelected());
         Main.pref.put(PREF_CHECK_FIXMES_BEFORE_UPLOAD, prefCheckFixmesBeforeUpload.isSelected());            
-        Main.pref.put(PREF_CHECK_BEFORE_UPLOAD, prefCheckKeysBeforeUpload.isSelected() || prefCheckValuesBeforeUpload.isSelected() || prefCheckFixmesBeforeUpload.isSelected());
         String sources = "";
         if( spellcheckSources.getModel().getSize() > 0 )
