Index: trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 5219)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 5220)
@@ -31,6 +31,8 @@
 import java.util.Comparator;
 import java.util.EventObject;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.regex.Matcher;
@@ -668,12 +670,10 @@
         @Override
         public int compareTo(ExtendedSourceEntry o) {
-            if (url.startsWith("resource") && !o.url.startsWith("resource")) {
+            if (url.startsWith("resource") && !o.url.startsWith("resource"))
                 return -1;
-            }
-            if (o.url.startsWith("resource")) {
+            if (o.url.startsWith("resource"))
                 return 1;
-            } else {
+            else
                 return getDisplayName().compareToIgnoreCase(o.getDisplayName());
-            }
         }
     }
@@ -1440,37 +1440,57 @@
     abstract public static class SourcePrefHelper {
 
+        private final String prefOld;
         private final String pref;
 
-        public SourcePrefHelper(String pref) {
+        public SourcePrefHelper(String pref, String prefOld) {
             this.pref = pref;
+            this.prefOld = prefOld;
         }
 
         abstract public Collection<ExtendedSourceEntry> getDefault();
 
-        abstract public Collection<String> serialize(SourceEntry entry);
-
-        abstract public SourceEntry deserialize(List<String> entryStr);
+        abstract public Map<String, String> serialize(SourceEntry entry);
+
+        abstract public SourceEntry deserialize(Map<String, String> entryStr);
+
+        // migration can be removed end 2012
+        abstract public Map<String, String> migrate(Collection<String> old);
 
         public List<SourceEntry> get() {
-            Collection<Collection<String>> mappaintSrc = Main.pref.getArray(pref, null);
-            if (mappaintSrc == null)
+
+            boolean migration = false;
+            Collection<Map<String, String>> src = Main.pref.getListOfStructs(pref, (Collection<Map<String, String>>) null);
+            if (src == null) {
+                Collection<Collection<String>> srcOldPrefFormat = Main.pref.getArray(prefOld, null);
+                if (srcOldPrefFormat != null) {
+                    migration = true;
+                    src = new ArrayList<Map<String, String>>();
+                    for (Collection<String> p : srcOldPrefFormat) {
+                        src.add(migrate(p));
+                    }
+                }
+            }
+            if (src == null)
                 return new ArrayList<SourceEntry>(getDefault());
 
             List<SourceEntry> entries = new ArrayList<SourceEntry>();
-            for (Collection<String> sourcePref : mappaintSrc) {
-                SourceEntry e = deserialize(new ArrayList<String>(sourcePref));
+            for (Map<String, String> sourcePref : src) {
+                SourceEntry e = deserialize(new HashMap<String, String>(sourcePref));
                 if (e != null) {
                     entries.add(e);
                 }
             }
+            if (migration) {
+                put(entries);
+            }
             return entries;
         }
 
         public boolean put(Collection<? extends SourceEntry> entries) {
-            Collection<Collection<String>> setting = new ArrayList<Collection<String>>();
+            Collection<Map<String, String>> setting = new ArrayList<Map<String, String>>();
             for (SourceEntry e : entries) {
                 setting.add(serialize(e));
             }
-            return Main.pref.putArray(pref, setting);
+            return Main.pref.putListOfStructs(pref, setting);
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/SourceEntry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/SourceEntry.java	(revision 5219)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/SourceEntry.java	(revision 5220)
@@ -42,8 +42,8 @@
     public boolean active;
 
-    public SourceEntry(String url, String name, String shortdescription, Boolean active) {
+    public SourceEntry(String url, String name, String title, Boolean active) {
         this.url = url;
         this.name = equal(name, "") ? null : name;
-        this.title = equal(shortdescription, "") ? null : shortdescription;
+        this.title = equal(title, "") ? null : title;
         this.active = active;
     }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java	(revision 5219)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java	(revision 5220)
@@ -9,5 +9,7 @@
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.TreeSet;
 
@@ -24,9 +26,9 @@
 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
 import org.openstreetmap.josm.gui.preferences.SourceEditor;
-import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting;
 import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry;
 import org.openstreetmap.josm.gui.preferences.SourceEntry;
 import org.openstreetmap.josm.gui.preferences.SourceProvider;
 import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting;
+import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.Predicate;
@@ -183,5 +185,5 @@
 
         public MapPaintPrefHelper() {
-            super("mappaint.style.sources-list");
+            super("mappaint.style.entries", "mappaint.style.sources-list");
         }
 
@@ -251,22 +253,31 @@
 
         @Override
-        public Collection<String> serialize(SourceEntry entry) {
-            return Arrays.asList(new String[] {
-                    entry.url,
-                    entry.name == null ? "" : entry.name,
-                            entry.title == null ? "" : entry.title,
-                                    Boolean.toString(entry.active)
-            });
-        }
-
-        @Override
-        public SourceEntry deserialize(List<String> entryStr) {
+        public Map<String, String> serialize(SourceEntry entry) {
+            Map<String, String> res = new HashMap<String, String>();
+            res.put("url", entry.url);
+            res.put("title", entry.title == null ? "" : entry.title);
+            res.put("active", Boolean.toString(entry.active));
+            if (entry.name != null) {
+                res.put("ptoken", entry.name);
+            }
+            return res;
+        }
+
+        @Override
+        public SourceEntry deserialize(Map<String, String> s) {
+            return new SourceEntry(s.get("url"), s.get("ptoken"), s.get("title"), Boolean.parseBoolean(s.get("active")));
+        }
+
+        @Override
+        public Map<String, String> migrate(Collection<String> old) {
+            List<String> entryStr = new ArrayList<String>(old);
             if (entryStr.size() < 4)
                 return null;
-            String url = entryStr.get(0);
-            String name = entryStr.get(1);
-            String shortdescription = entryStr.get(2);
-            boolean active = Boolean.parseBoolean(entryStr.get(3));
-            return new SourceEntry(url, name, shortdescription, active);
+            Map<String, String> res = new HashMap<String, String>();
+            res.put("url", entryStr.get(0));
+            res.put("ptoken", entryStr.get(1));
+            res.put("title", entryStr.get(2));
+            res.put("active", entryStr.get(3));
+            return res;
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 5219)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 5220)
@@ -8,9 +8,9 @@
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import javax.swing.BorderFactory;
@@ -30,5 +30,4 @@
 import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory;
 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
-import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting;
 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane.ValidationListener;
 import org.openstreetmap.josm.gui.preferences.SourceEditor;
@@ -37,4 +36,5 @@
 import org.openstreetmap.josm.gui.preferences.SourceProvider;
 import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting;
+import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting;
 import org.openstreetmap.josm.gui.tagging.TaggingPreset;
 import org.openstreetmap.josm.gui.tagging.TaggingPresetMenu;
@@ -52,5 +52,5 @@
         }
     }
-    
+
     private TaggingPresetPreference() {
         super();
@@ -313,5 +313,5 @@
 
         public PresetPrefHelper() {
-            super("taggingpreset.sources-list");
+            super("taggingpreset.entries", "taggingpreset.sources-list");
         }
 
@@ -325,16 +325,27 @@
 
         @Override
-        public Collection<String> serialize(SourceEntry entry) {
-            return Arrays.asList(new String[] {entry.url, entry.title == null ? "" : entry.title});
-        }
-
-        @Override
-        public SourceEntry deserialize(List<String> entryStr) {
+        public Map<String, String> serialize(SourceEntry entry) {
+            Map<String, String> res = new HashMap<String, String>();
+            res.put("url", entry.url);
+            res.put("title", entry.title == null ? "" : entry.title);
+            return res;
+        }
+
+        @Override
+        public SourceEntry deserialize(Map<String, String> s) {
+            return new SourceEntry(s.get("url"), null, s.get("title"), true);
+        }
+
+        @Override
+        public Map<String, String> migrate(Collection<String> old) {
+            List<String> entryStr = new ArrayList<String>(old);
             if (entryStr.size() < 2)
                 return null;
-            String url = entryStr.get(0);
-            String shortdescription = entryStr.get(1);
-            return new SourceEntry(url, null, shortdescription, true);
-        }
+            Map<String, String> res = new HashMap<String, String>();
+            res.put("url", entryStr.get(0));
+            res.put("title", entryStr.get(1));
+            return res;
+        }
+
     }
 
