Index: trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 3337)
+++ trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 3338)
@@ -207,7 +207,8 @@
 
         for(int i=0; i < bTexts.length; i++) {
+            final int final_i = i;
             Action action = new AbstractAction(bTexts[i]) {
                 public void actionPerformed(ActionEvent evt) {
-                    buttonAction(evt);
+                    buttonAction(final_i, evt);
                 }
             };
@@ -282,12 +283,7 @@
      * @param evt the button event
      */
-    protected void buttonAction(ActionEvent evt) {
+    protected void buttonAction(int i, ActionEvent evt) {
         String a = evt.getActionCommand();
-        for(int i=0; i < bTexts.length; i++)
-            if(bTexts[i].equals(a)) {
-                result = i+1;
-                break;
-            }
-
+        result = i+1;
         setVisible(false);
     }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 3337)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 3338)
@@ -148,4 +148,8 @@
     }
 
+    // hook for roadsigns plugin to display a small
+    // button in the upper right corner of this dialog
+    public static JPanel pluginHook = new JPanel();
+    
     private final Map<String, Map<String, Integer>> valueCount = new TreeMap<String, Map<String, Integer>>();
 
@@ -322,5 +326,5 @@
         if(!key.equals(newkey)) {
             for(int i=0; i < propertyTable.getRowCount(); i++)
-                if(propertyData.getValueAt(i, 0).toString() == newkey) {
+                if(propertyData.getValueAt(i, 0).toString().equals(newkey)) {
                     row=i;
                     break;
@@ -648,5 +652,7 @@
         bothTables.setLayout(new GridBagLayout());
         if(top) {
-            bothTables.add(presets, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 2, 5, 2));
+            bothTables.add(presets, GBC.std().fill(GBC.HORIZONTAL).insets(5, 2, 5, 2).anchor(GBC.NORTHWEST));
+            double epsilon = Double.MIN_VALUE; // need to set a weight or else anchor value is ignored
+            bothTables.add(pluginHook, GBC.eol().insets(0,1,1,1).anchor(GBC.NORTHEAST).weight(epsilon, epsilon));
         }
         bothTables.add(selectSth, GBC.eol().fill().insets(10, 10, 10, 10));
@@ -918,4 +924,5 @@
         propertyTable.getTableHeader().setVisible(hasTags);
         selectSth.setVisible(!hasSelection);
+        pluginHook.setVisible(hasSelection);
 
         int selectedIndex;
Index: trunk/src/org/openstreetmap/josm/tools/GBC.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/GBC.java	(revision 3337)
+++ trunk/src/org/openstreetmap/josm/tools/GBC.java	(revision 3338)
@@ -102,5 +102,5 @@
      * @return This constraint for chaining.
      */
-    public GBC weight(int weightx, int weighty) {
+    public GBC weight(double weightx, double weighty) {
         this.weightx = weightx;
         this.weighty = weighty;
