Index: trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 2717)
+++ trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 2718)
@@ -31,5 +31,4 @@
 public class ExtendedDialog extends JDialog {
     private int result = 0;
-    public static final int DialogNotShown = -99;
     public static final int DialogClosedOtherwise = 0;
     private boolean toggleable = false;
@@ -37,4 +36,5 @@
     private WindowGeometry defaultWindowGeometry = null;
     private String togglePref = "";
+    private int toggleValue = -1;
     private String toggleCheckboxText = tr("Do not show again");
     private JCheckBox toggleCheckbox = null;
@@ -169,5 +169,5 @@
         // Check if the user has set the dialog to not be shown again
         if(toggleCheckState(togglePref)) {
-            result = ExtendedDialog.DialogNotShown;
+            result = toggleValue;
             return this;
         }
@@ -185,6 +185,4 @@
      * @return int * The selected button. The count starts with 1.
      *             * A return value of ExtendedDialog.DialogClosedOtherwise means the dialog has been closed otherwise.
-     *             * A return value of ExtendedDialog.DialogNotShown means the
-     *               dialog has been toggled off in the past
      */
     public int getValue() {
@@ -373,6 +371,5 @@
      * Calling this will offer the user a "Do not show again" checkbox for the
      * dialog. Default is to not offer the choice; the dialog will be shown
-     * every time. If the dialog is not shown due to the previous choice of the
-     * user, the result <code>ExtendedDialog.DialogNotShown</code> is returned
+     * every time.
      * @param togglePref  The preference to save the checkbox state to
      */
@@ -428,6 +425,7 @@
         toggleable = togglePref != null && !togglePref.equals("");
 
+        toggleValue = Main.pref.getInteger("message."+togglePref+".value", -1);
         // No identifier given, so return false (= show the dialog)
-        if(!toggleable)
+        if(!toggleable || toggleValue == -1)
             return false;
         this.togglePref = togglePref;
@@ -444,4 +442,5 @@
             return;
         Main.pref.put("message."+ togglePref, !toggleCheckbox.isSelected());
+        Main.pref.putInteger("message."+togglePref+".value", result);
     }
 
