Index: /applications/editors/josm/plugins/roadsigns/README
===================================================================
--- /applications/editors/josm/plugins/roadsigns/README	(revision 29229)
+++ /applications/editors/josm/plugins/roadsigns/README	(revision 29230)
@@ -4,6 +4,4 @@
 Shows a GUI dialog to tag objects by clicking on road sign symbols.
 It tries to generate the corresponding tags for the object.
-As tagging schemes are under constant development, the definitions
-need to be updated when needed.
 
 Author:
@@ -18,6 +16,79 @@
     [1] http://osmtools.de/traffic_signs/
 
-    Pics have been derived from
+    Pics for the German preset have been derived from
         http://de.wikipedia.org/wiki/Bildtafel_der_Verkehrszeichen_in_Deutschland (german street sign SVGs)
+
+How to install a custom preset
+------------------------------
+
+Add the following entry in the advanced preferences [1]:
+
+  plugin.roadsigns.sources=/path/to/myroadsignpreset.xml
+
+(The value can be either "simple" or "list" type)
+The chosen preset should be loaded automatically after a restart.
+
+Images can be placed in the same folder as the preset .xml file. Alternatively, you can also specify a path for icons:
+
+  plugin.roadsigns.icon.sources=/path/to/image/folder
+
+[1] http://josm.openstreetmap.de/wiki/Help/Preferences/Advanced
+
+Preset Format
+-------------
+
+The first preset was data/roadsignpresetDE.xml, so you might want to look there for examples.
+
+Some values can contain parameters like $foo, that will be replaced by the value of the parameter named foo.
+
+sign:
+    ref                 Short official designation of the sign that can be used for the traffic_sign tag. (accepts parameters)
+    id                  Unique identifier. (If missing, equals ref. Either id or ref must be present.)
+    icon                Icon image name. (If missing, id or ref is used as image name. In this case ':' and '.' characters are converted to underscore '_'.)
+    name                Name of the sign. (required)
+    long_name           Long (e.g. official) name of the sign.
+    traffic_sign_tag    Value that should be used for traffic_sign tag (if different from ref).
+    help                Some notes to guide the user.
+    wiki                Page in the osm wiki
+    deprecated          Set to "yes" if authorities have decided to no longer install signs of this kind.
+                        (But old signs may still be there and need to be recorded.)
+    useful              (optional) The user can choose to show only a selection of the most useful signs.
+                        By default, a sign with <tag> information is treated as useful. This can be overridden
+                        by setting this attribute. Possible values: true, false.
+
+tag:
+    Some tags can be named (ident=*) and modified by other subsequent tags. If this finally results in an
+    empty value (""), then the tag is skipped altogether. Note that the default value of a named tag is
+    only used if there are no appending tags. E.g. access=no becomes access=delivery and not access=no;delivery.
+
+    static tags:
+        key             The key text. (accepts parameters)
+        value           The value text. (accepts parameters)
+
+    named tags:
+        key             The key text.
+        value           The default value text. If the final evaluation of the value results in an empty string, the tag is dropped.
+        ident           Name a tag so it can later be changed by other tags.
+
+    modifying tags:
+        appending:
+            tag_ref         Name of the tag to be changed.
+            append_value    Append a string to the value of the tag. The default value of the identified tag is dropped (unless there is no
+                            modifying tag appending a value).
+        condition:
+            tag_ref         Name of the tag to be changed.
+            condition       The condition to add. (K=V becomes K:cond=V.)
+
+parameter:
+    ident           identifier to get the value of this parameter (required)
+    input           input type (currently "textfield" and "combo" are possible values) (required)
+    prefix          text to put before the input area
+    suffix          text to put after the input area
+    field_width     for text fields: the width of the field (number of characters)
+    default         default value (required)
+
+supplementary: (list of recommended additional signs)
+    id         the id of the supplementary sign
+
 
 JavaCC usage:
Index: /applications/editors/josm/plugins/roadsigns/data/roadsignpresetDE.xml
===================================================================
--- /applications/editors/josm/plugins/roadsigns/data/roadsignpresetDE.xml	(revision 29229)
+++ /applications/editors/josm/plugins/roadsigns/data/roadsignpresetDE.xml	(revision 29230)
@@ -1,71 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-Preset file for road signs plugin.
-
-The plugin is in early state of development (05-2010) and the format is likely to change.
-
-How to customize
-================
-
-Add the following to your JOSM preference file
-(or enter it in the advanced preferences tab in JOSM):
-
-plugin.roadsigns.sources=/path/to/myroadsignpreset.xml
-plugin.roadsigns.icon.sources=/path/to/image/folder
-
-(The second one is only needed if you like to display your own icons.)
-
-
-Preset format
-=============
-		
-Some values can contain parameters like $foo, that will be replaced by the value of the parameter named foo.
-
-sign:
-    ref                 Short official designation of the sign that can be used for the traffic_sign tag. (accepts parameters)
-    id                  Unique identifier. (If missing, equals ref. Either id or ref must be present.)
-    icon                Icon image name. (If missing, id or ref is used as image name. In this case ':' and '.' characters are converted to underscore '_'.)
-    name                Name of the sign. (required)
-    long_name           Long (e.g. official) name of the sign.
-    traffic_sign_tag    Value that should be used for traffic_sign tag (if different from ref).
-    help                Some notes to guide the user.
-    wiki                Page in the osm wiki
-    deprecated          Set to "yes" if authorities have decided to no longer install signs of this kind.
-                        (But old signs may still be there and need to be recorded.)
-
-tag:
-    Some tags can be named (ident=*) and modified by other subsequent tags. If this finally results in an
-    empty value (""), then the tag is skipped altogether. Note that the default value of a named tag is
-    only used if there are no appending tags. E.g. access=no becomes access=delivery and not access=no;delivery.
-
-    static tags:
-        key             The key text. (accepts parameters)
-        value           The value text. (accepts parameters)
-
-    named tags:
-        key             The key text.
-        value           The default value text. If the final evaluation of the value results in an empty string, the tag is dropped.
-        ident           Name a tag so it can later be changed by other tags.
-
-    modifying tags:
-        appending:
-            tag_ref         Name of the tag to be changed.
-            append_value    Append a string to the value of the tag. The default value of the identified tag is dropped (unless there is no
-                            modifying tag appending a value).
-        condition:
-            tag_ref         Name of the tag to be changed.
-            condition       The condition to add. (K=V becomes K:cond=V.)
-
-parameter:
-    ident           identifier to get the value of this parameter (required)
-    input           input type (currently "textfield" and "combo" are possible values) (required)
-    prefix          text to put before the input area
-    suffix          text to put after the input area
-    field_width     for text fields: the width of the field (number of characters)
-    default         default value (required)
-
-supplementary: (list of recommended additional signs)
-    id         the id of the supplementary sign
-
+roadsigns plugin preset file for Germany
 -->
 <roadsignpreset country="DE">
Index: /applications/editors/josm/plugins/roadsigns/data/roadsignpresetPL.xml
===================================================================
--- /applications/editors/josm/plugins/roadsigns/data/roadsignpresetPL.xml	(revision 29229)
+++ /applications/editors/josm/plugins/roadsigns/data/roadsignpresetPL.xml	(revision 29230)
@@ -1349,5 +1349,5 @@
 	wiki="Tag:highway%3Dpedestrian"
 	>
-	<tag key="highway" value="pedestrian"/>
+	<tag key="highway" value="living_street"/>
 </sign>
 
Index: /applications/editors/josm/plugins/roadsigns/data/roadsignpresetSK.xml
===================================================================
--- /applications/editors/josm/plugins/roadsigns/data/roadsignpresetSK.xml	(revision 29229)
+++ /applications/editors/josm/plugins/roadsigns/data/roadsignpresetSK.xml	(revision 29230)
@@ -225,6 +225,6 @@
 </sign>
 <sign icon="B20.png" id="B20"  ref="SK:B20" name="zákaz vjazdu vozidiel alebo súprav vozidiel, ktorých dĺžka presahuje vyznačenú hranicu" sk.name="zákaz vjazdu vozidiel alebo súprav vozidiel, ktorých dĺžka presahuje vyznačenú hranicu">
-       <tag key="car:distance" value="$val"/>
-				       <parameter ident="val" input="textfield" suffix="m" default="70" field_width="2"/>
+       <tag key="maxlength" value="$val"/>
+				       <parameter ident="val" input="textfield" suffix="m" default="10" field_width="2"/>
 </sign>
 <sign icon="B21.png" id="B21"  ref="SK:B21" name="zákaz vjazdu vozidiel prepravujúcich nebezpečné veci" sk.name="zákaz vjazdu vozidiel prepravujúcich nebezpečné veci">
Index: /applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignInputDialog.java
===================================================================
--- /applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignInputDialog.java	(revision 29229)
+++ /applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignInputDialog.java	(revision 29230)
@@ -29,4 +29,5 @@
 import javax.swing.BorderFactory;
 import javax.swing.Box;
+import javax.swing.ButtonGroup;
 import javax.swing.JButton;
 import javax.swing.JCheckBox;
@@ -36,4 +37,5 @@
 import javax.swing.JLabel;
 import javax.swing.JPanel;
+import javax.swing.JRadioButton;
 import javax.swing.JScrollPane;
 import javax.swing.JTabbedPane;
@@ -694,6 +696,4 @@
             fireTableDataChanged();
         }
-
-
     }
 
@@ -814,4 +814,5 @@
         private List<PresetMetaData> presetsData;
         private JComboBox selectionBox;
+        JRadioButton rbAll, rbUseful;
 
         public SettingsPanel(boolean standalone, final Action update) {
@@ -831,4 +832,27 @@
             this.add(selectionBox, GBC.eol().insets(0, 5, 5, 5));
             if (!standalone) {
+                String snd = "Hide signs that do not have an OSM tag assigned";
+
+                rbAll = new JRadioButton(tr("Show all signs"));
+                rbUseful = new JRadioButton(tr("Show a selection of the most useful signs"));
+
+                ButtonGroup grp = new ButtonGroup();
+                grp.add(rbAll);
+                grp.add(rbUseful);
+
+                String filterPref = Main.pref.get("plugin.roadsigns.preset.filter");
+                if (filterPref.equals("useful")) {
+                    rbUseful.setSelected(true);
+                } else {
+                    rbAll.setSelected(true);
+                }
+
+                JPanel pnFilter = new JPanel(new GridBagLayout());
+                pnFilter.setBorder(BorderFactory.createTitledBorder(tr("Filter")));
+                pnFilter.add(rbAll, GBC.eop());
+                pnFilter.add(rbUseful, GBC.eop());
+
+                this.add(pnFilter, GBC.eol().insets(5, 0, 5, 5));
+
                 JButton apply = new JButton(new AbstractAction(tr("Apply")) {
                     @Override
@@ -848,4 +872,15 @@
 
         public void apply() throws IOException {
+            String filter = null;
+            if (rbAll != null) {
+                if (rbAll.isSelected()) {
+                    filter = "all";
+                } else if (rbUseful.isSelected()) {
+                    filter = "useful";
+                }
+            }
+            if (filter != null) {
+                Main.pref.put("plugin.roadsigns.preset.filter", filter);
+            }
             RoadSignsPlugin.setSelectedPreset(presetsData.get(selectionBox.getSelectedIndex()));
         }
Index: /applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsPlugin.java
===================================================================
--- /applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsPlugin.java	(revision 29229)
+++ /applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsPlugin.java	(revision 29230)
@@ -183,5 +183,4 @@
         List<PresetMetaData> presetsData =  getAvailablePresetsMetaData();
         String code = Main.pref.get("plugin.roadsigns.preset.selection", null);
-        if (selectedPreset != null && selectedPreset.code.equals(code)) return;
 
         for (PresetMetaData data : presetsData) {
Index: /applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsReader.java
===================================================================
--- /applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsReader.java	(revision 29229)
+++ /applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/RoadSignsReader.java	(revision 29230)
@@ -22,11 +22,11 @@
 import org.xml.sax.helpers.DefaultHandler;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.io.OsmDataParsingException;
 import org.openstreetmap.josm.plugins.roadsigns.Sign.SignParameter;
 import org.openstreetmap.josm.plugins.roadsigns.Sign.Tag;
-import org.openstreetmap.josm.tools.LanguageInfo;
-
 import org.openstreetmap.josm.plugins.roadsigns.javacc.ParseException;
 import org.openstreetmap.josm.plugins.roadsigns.javacc.TokenMgrError;
+import org.openstreetmap.josm.tools.LanguageInfo;
 
 /**
@@ -113,4 +113,9 @@
 
                 curSign.help = getLocalized(atts, "help");
+
+                String useful = atts.getValue("useful");
+                if (useful != null) {
+                    curSign.useful = Boolean.parseBoolean(useful);
+                }
 
             } else if (curSign != null && qname.equals("tag")) {
@@ -312,5 +317,16 @@
             factory.newSAXParser().parse(inputSource, parser);
             parser.wireSupplements();
-            return parser.allSigns;
+            String filterPref = Main.pref.get("plugin.roadsigns.preset.filter");
+            if (filterPref.equals("useful")) {
+                List<Sign> filtered = new ArrayList<Sign>();
+                for (Sign s : parser.allSigns) {
+                    if (s.isUseful()) {
+                        filtered.add(s);
+                    }
+                }
+                return filtered;
+            } else {
+                return parser.allSigns;
+            }
         } catch (ParserConfigurationException e) {
             e.printStackTrace(); // broken SAXException chaining
Index: /applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/Sign.java
===================================================================
--- /applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/Sign.java	(revision 29229)
+++ /applications/editors/josm/plugins/roadsigns/src/org/openstreetmap/josm/plugins/roadsigns/Sign.java	(revision 29230)
@@ -34,4 +34,5 @@
     public String wiki;
     public String help;
+    public Boolean useful;
 
     public JLabel label; // FIXME: don't put gui stuff here
@@ -120,4 +121,9 @@
     }
 
+    public boolean isUseful() {
+        if (useful != null) return useful;
+        return !tags.isEmpty();
+    }
+
     @Override
     public String toString() {
