Index: /trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 1837)
+++ /trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 1838)
@@ -22,5 +22,5 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.tools.DontShowAgainInfo;
+import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
 import org.openstreetmap.josm.tools.Shortcut;
 
@@ -99,7 +99,13 @@
                     "to undesirable results when doing rectangular alignments.<br>" +
                     "Change your projection to get rid of this warning.<br>" +
-            "Do you want to continue?");
-
-            if (!DontShowAgainInfo.show("align_rectangular_4326", msg, false))
+            "Do you want to continue?</html>");
+            if (!ConditionalOptionPaneUtil.showConfirmationDialog(
+                    "align_rectangular_4326",
+                    Main.parent,
+                    msg,
+                    tr("Warning"),
+                    JOptionPane.YES_NO_OPTION,
+                    JOptionPane.QUESTION_MESSAGE,
+                    JOptionPane.YES_OPTION))
                 return;
         }
Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 1837)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 1838)
@@ -499,4 +499,5 @@
                 extendedWay = true;
                 getCurrentDataSet().setSelected(way);
+                DataSet.fireSelectionChanged(getCurrentDataSet().getSelected());
             }
         }
@@ -515,4 +516,5 @@
             }
             getCurrentDataSet().setSelected(n);
+            DataSet.fireSelectionChanged(getCurrentDataSet().getSelected());
         } else if (!newNode) {
             title = tr("Connect existing way to node");
@@ -557,4 +559,5 @@
                     (posn0 < selectedWay.nodes.size()-1) && targetNode.equals(selectedWay.nodes.get(posn0+1))) {  // next node
                 getCurrentDataSet().setSelected(targetNode);
+                DataSet.fireSelectionChanged(getCurrentDataSet().getSelected());
                 lastUsedNode = targetNode;
                 return true;
Index: /trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/command/DeleteCommand.java	(revision 1837)
+++ /trunk/src/org/openstreetmap/josm/command/DeleteCommand.java	(revision 1838)
@@ -31,7 +31,7 @@
 import org.openstreetmap.josm.data.osm.WaySegment;
 import org.openstreetmap.josm.data.osm.visitor.CollectBackReferencesVisitor;
+import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
 import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.gui.PrimitiveNameFormatter;
-import org.openstreetmap.josm.tools.DontShowAgainInfo;
 import org.openstreetmap.josm.tools.ImageProvider;
 
@@ -391,7 +391,14 @@
                                         "<br>" +
                                 "Do you really want to delete?") + "</html>"));
-                        return DontShowAgainInfo.show("delete_outside_nodes", msg, false, JOptionPane.YES_NO_OPTION, JOptionPane.YES_OPTION);
+                        return ConditionalOptionPaneUtil.showConfirmationDialog(
+                                "delete_outside_nodes",
+                                Main.parent,
+                                msg,
+                                tr("Delete confirmation"),
+                                JOptionPane.YES_NO_OPTION,
+                                JOptionPane.QUESTION_MESSAGE,
+                                JOptionPane.YES_OPTION
+                        );
                     }
-
                 }
             }
Index: /trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java	(revision 1838)
+++ /trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java	(revision 1838)
@@ -0,0 +1,156 @@
+// License: GPL. Copyright 2007 by Immanuel Scholz and others
+package org.openstreetmap.josm.gui;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.Component;
+import java.awt.GridBagLayout;
+import java.awt.HeadlessException;
+
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.tools.GBC;
+
+
+/**
+ * ConditionalOptionPaneUtil provides static utility methods for displaying modal message dialogs
+ * which can be enabled/disabled by the user.
+ * 
+ * They wrap the methods provided by {@see JOptionPane}. Within JOSM you should use these
+ * methods rather than the bare methods from {@see JOptionPane} because the methods provided
+ * by ConditionalOptionPaneUtil ensure that a dialog window is always on top and isn't hidden by one of the
+ * JOSM windows for detached dialogs, relation editors, history browser and the like.
+ * 
+ */
+public class ConditionalOptionPaneUtil {
+
+    /**
+     * this is a static utility class only
+     */
+    private ConditionalOptionPaneUtil() {}
+
+    /**
+     * Replies the preference value for the preference key "message." + <code>prefKey</code>.
+     * The default value if the preference key is missing is true.
+     * 
+     * @param  the preference key
+     * @return prefKey the preference value for the preference key "message." + <code>prefKey</code>
+     */
+    public static boolean getDialogShowingEnabled(String prefKey) {
+        return Main.pref.getBoolean("message."+prefKey, true);
+    }
+
+    /**
+     * sets the value for the preference key "message." + <code>prefKey</code>.
+     * 
+     * @param prefKey the key
+     * @param enabled the value
+     */
+    public static void setDialogShowingEnabled(String prefKey, boolean enabled) {
+        Main.pref.put("message."+prefKey, enabled);
+    }
+
+
+    /**
+     * Displays an confirmation dialog with some option buttons given by <code>optionType</code>.
+     * It is always on top even if there are other open windows like detached dialogs,
+     * relation editors, history browsers and the like.
+     * 
+     * Set <code>optionType</code> to {@see JOptionPane#YES_NO_OPTION} for a dialog with a YES and
+     * a NO button.
+
+     * Set <code>optionType</code> to {@see JOptionPane#YES_NO_CANCEL_OPTION} for a dialog with a YES,
+     * a NO and a CANCEL button
+     * 
+     * Replies true, if the selected option is equal to <code>trueOption</code>, otherwise false.
+     * Replies true, if the dialog is not displayed because the respective preference option
+     * <code>preferenceKey</code> is set to false.
+     * 
+     * @param preferenceKey the preference key
+     * @param parent  the parent component
+     * @param message  the message
+     * @param title the title
+     * @param optionType  the option type
+     * @param messageType the message type
+     * @param trueOption  if this option is selected the method replies true
+     * 
+     * 
+     * @return true, if the selected option is equal to <code>trueOption</code>, otherwise false.
+     * 
+     * @see JOptionPane#INFORMATION_MESSAGE
+     * @see JOptionPane#WARNING_MESSAGE
+     * @see JOptionPane#ERROR_MESSAGE
+     */
+    static public boolean showConfirmationDialog(String preferenceKey, Component parent, Object message, String title, int optionType, int messageType, int trueOption) throws HeadlessException {
+        if (!getDialogShowingEnabled(preferenceKey))
+            return true;
+        MessagePanel pnl = new MessagePanel(preferenceKey, message);
+        boolean ret = OptionPaneUtil.showConfirmationDialog(parent, message, title, optionType, messageType, trueOption);
+        pnl.remeberDialogShowingEnabled();
+        return ret;
+    }
+
+    /**
+     * Displays an message in modal dialog with an OK button. Makes sure the dialog
+     * is always on top even if there are other open windows like detached dialogs,
+     * relation editors, history browsers and the like.
+     * 
+     * If there is a preference with key <code>preferenceKey</code> and value <code>false</code>
+     * the dialog is not show.
+     * 
+     * @param preferenceKey the preference key
+     * @param parent  the parent component
+     * @param message  the message
+     * @param title the title
+     * @param messageType the message type
+     * 
+     * @see JOptionPane#INFORMATION_MESSAGE
+     * @see JOptionPane#WARNING_MESSAGE
+     * @see JOptionPane#ERROR_MESSAGE
+     */
+    static public void showMessageDialog(String preferenceKey, Component parent, Object message, String title,int messageType) {
+        if (!getDialogShowingEnabled(preferenceKey))
+            return;
+        MessagePanel pnl = new MessagePanel(preferenceKey, message);
+        OptionPaneUtil.showMessageDialog(parent, pnl, title, messageType);
+        pnl.remeberDialogShowingEnabled();
+    }
+
+    /**
+     * This is a message panel used in dialogs which can be enabled/disabled with a preference
+     * setting.
+     * In addition to the normal message any {@see JOptionPane} would display it includes
+     * a checkbox for enabling/disabling this particular dialog.
+     *
+     */
+    private static class MessagePanel extends JPanel {
+        JCheckBox cbShowDialog;
+        String preferenceKey;
+
+        public MessagePanel(String preferenceKey, Object message) {
+            this.preferenceKey = preferenceKey;
+            cbShowDialog = new JCheckBox(tr("Do not show again"));
+            cbShowDialog.setSelected(!ConditionalOptionPaneUtil.getDialogShowingEnabled(preferenceKey));
+            setLayout(new GridBagLayout());
+
+            if (message instanceof Component) {
+                add((Component)message, GBC.eop());
+            } else {
+                add(new JLabel(message.toString()),GBC.eop());
+            }
+            add(cbShowDialog, GBC.eol());
+        }
+
+        public boolean getDialogShowingEnabled() {
+            return cbShowDialog.isSelected();
+        }
+
+        public void remeberDialogShowingEnabled() {
+            ConditionalOptionPaneUtil.setDialogShowingEnabled(preferenceKey, !getDialogShowingEnabled());
+        }
+    }
+}
Index: /trunk/src/org/openstreetmap/josm/gui/OptionPaneUtil.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/OptionPaneUtil.java	(revision 1838)
+++ /trunk/src/org/openstreetmap/josm/gui/OptionPaneUtil.java	(revision 1838)
@@ -0,0 +1,208 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui;
+
+import java.awt.Component;
+import java.awt.HeadlessException;
+
+import javax.swing.JDialog;
+import javax.swing.JOptionPane;
+
+import org.openstreetmap.josm.Main;
+
+/**
+ * OptionPaneUtil provides static utility methods for displaying modal message dialogs.
+ * 
+ * They wrap the methods provided by {@see JOptionPane}. Within JOSM you should use these
+ * methods rather than the bare methods from {@see JOptionPane} because the methods provided
+ * by OptionPaneUtil ensure that a dialog window is always on top and isn't hidden by one of the
+ * JOSM windows for detached dialogs, relation editors, history browser and the like.
+ *
+ * Typical usage for a message dialog:
+ * <pre>
+ *    OptionPaneUtil.showMessageDialog(Main.parent, tr("My message"), tr("My title"), JOptionPane.WARNING_MESSAGE);
+ * </pre>
+ * 
+ */
+public class OptionPaneUtil {
+
+    /**
+     * this is static utility class, no instances allowed
+     */
+    private OptionPaneUtil () {}
+
+    /**
+     * prepares a dialog as message dialog which is always on the top of the windows
+     * stack
+     * 
+     * @param dialog the dialog
+     */
+    static protected void prepareDialog(JDialog dialog) {
+        dialog.setAlwaysOnTop(true);
+        dialog.setModal(true);
+        dialog.toFront();
+        dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+    }
+
+    /**
+     * Displays an message in modal dialog with an OK button. Makes sure the dialog
+     * is always on top even if there are other open windows like detached dialogs,
+     * relation editors, history browsers and the like.
+     * 
+     * @param parent  the parent component
+     * @param message  the message
+     * @param title the title
+     * @param messageType the message type
+     * 
+     * @see JOptionPane#INFORMATION_MESSAGE
+     * @see JOptionPane#WARNING_MESSAGE
+     * @see JOptionPane#ERROR_MESSAGE
+     */
+    static public void showMessageDialog(Component parent, Object message, String title, int messageType) {
+        JOptionPane op = new JOptionPane(
+                message,
+                messageType
+        );
+        JDialog dialog = op.createDialog(Main.parent, title);
+        prepareDialog(dialog);
+        dialog.setVisible(true);
+    }
+
+
+    /**
+     * Displays an confirmation dialog with two or three buttons. Makes sure the dialog
+     * is always on top even if there are other open windows like detached dialogs,
+     * relation editors, history browsers and the like.
+     * 
+     * Set <code>optionType</code> to {@see JOptionPane#YES_NO_OPTION} for a dialog with a YES and
+     * a NO button.
+
+     * Set <code>optionType</code> to {@see JOptionPane#YES_NO_CANCEL_OPTION} for a dialog with a YES,
+     * a NO and a CANCEL button
+     * 
+     * @param parent  the parent component
+     * @param message  the message
+     * @param title the title
+     * @param optionType  the option type
+     * @param messageType the message type
+     * 
+     * @see JOptionPane#INFORMATION_MESSAGE
+     * @see JOptionPane#WARNING_MESSAGE
+     * @see JOptionPane#ERROR_MESSAGE
+     */
+    static public int showConfirmationDialog(Component parent, Object message, String title, int optionType, int messageType) throws HeadlessException {
+        JOptionPane op = new JOptionPane(
+                message,
+                messageType,
+                optionType
+        );
+        JDialog dialog = op.createDialog(Main.parent, title);
+        prepareDialog(dialog);
+        dialog.setVisible(true);
+        Object value = op.getValue();
+        if (value == null || ! (value instanceof Integer))
+            return JOptionPane.CLOSED_OPTION;
+        return (Integer)value;
+    }
+
+    /**
+     * Displays an confirmation dialog with some option buttons given by <code>optionType</code>.
+     * It is always on top even if there are other open windows like detached dialogs,
+     * relation editors, history browsers and the like.
+     * 
+     * Set <code>optionType</code> to {@see JOptionPane#YES_NO_OPTION} for a dialog with a YES and
+     * a NO button.
+
+     * Set <code>optionType</code> to {@see JOptionPane#YES_NO_CANCEL_OPTION} for a dialog with a YES,
+     * a NO and a CANCEL button
+     * 
+     * Replies true, if the selected option is equal to <code>trueOption</code>, otherwise false.
+     * 
+     * @param parent  the parent component
+     * @param message  the message
+     * @param title the title
+     * @param optionType  the option type
+     * @param messageType the message type
+     * @param trueOption  if this option is selected the method replies true
+     * 
+     * 
+     * @return true, if the selected option is equal to <code>trueOption</code>, otherwise false.
+     * 
+     * @see JOptionPane#INFORMATION_MESSAGE
+     * @see JOptionPane#WARNING_MESSAGE
+     * @see JOptionPane#ERROR_MESSAGE
+     */
+    static public boolean showConfirmationDialog(Component parent, Object message, String title, int optionType, int messageType, int trueOption) throws HeadlessException {
+        int ret = showConfirmationDialog(parent, message, title, optionType, messageType);
+        return ret == trueOption;
+    }
+
+    /**
+     * Displays an confirmation dialog with three buttons: YES, NO and CANCEL. Makes sure the dialog
+     * is always on top even if there are other open windows like detached dialogs,
+     * relation editors, history browsers and the like. The dialog is of type {@see JOptionPane#QUESTION_MESSAGE}
+     * 
+     * @param parent  the parent component
+     * @param message  the message
+     * @param title the title
+     * 
+     */
+    static public int showConfirmationDialog(Component parent, Object message, String title) throws HeadlessException {
+        return showConfirmationDialog(parent, message, title, JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
+    }
+
+    /**
+     * Displays a confirmation dialog with arbitrary confirmation options. Makes sure the dialog
+     * is always on top even if there are other open windows like detached dialogs,
+     * relation editors, history browsers and the like.
+     * 
+     * Provide an array of option labels in <code>options</code>, i.e.
+     * <pre>
+     *    options = new String[] {"Yes, do it!", "No, not yet", "Abort"};
+     * </pre>
+     * 
+     * Replies the index of the selected option or {@see JOptionPane#CLOSED_OPTION} if
+     * the dialog was closed.
+     * 
+     * @param parent the parent component
+     * @param message the message
+     * @param title  the title
+     * @param optionType
+     * @param messageType
+     * @param options
+     * @param initialValue
+     * @return  the index of the selected option or {@see JOptionPane#CLOSED_OPTION}
+     */
+    static public int showOptionDialog(Component parent,
+            Object message,
+            String title,
+            int optionType,
+            int messageType,
+            Object[] options,
+            Object initialValue) {
+
+        JOptionPane op = new JOptionPane(
+                message,
+                messageType,
+                optionType,
+                null /* no icon */,
+                options,
+                initialValue
+        );
+        JDialog dialog = op.createDialog(Main.parent, title);
+        prepareDialog(dialog);
+        dialog.setVisible(true);
+        Object value = op.getValue();
+        if (value == null)
+            return JOptionPane.CLOSED_OPTION;
+        if (options == null) {
+            if (value instanceof Integer)
+                return (Integer)value;
+            return JOptionPane.CLOSED_OPTION;
+        }
+        for(int i = 0; i < options.length; i++) {
+            if(options[i].equals(value))
+                return i;
+        }
+        return JOptionPane.CLOSED_OPTION;
+    }
+}
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 1837)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 1838)
@@ -22,4 +22,5 @@
 import javax.swing.JLabel;
 import javax.swing.JList;
+import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
@@ -30,4 +31,5 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
 import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.gui.MapFrame;
@@ -37,5 +39,4 @@
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener;
-import org.openstreetmap.josm.tools.DontShowAgainInfo;
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.ImageProvider.OverlayPosition;
@@ -78,20 +79,30 @@
                 {
                     int result = new ExtendedDialog(Main.parent, tr("Unsaved Changes"),
-                        tr("There are unsaved changes. Delete the layer anwyay?"),
-                        new String[] {tr("Delete Layer"), tr("Cancel")},
-                        new String[] {"dialogs/delete.png", "cancel.png"}).getValue();
+                            tr("There are unsaved changes. Delete the layer anwyay?"),
+                            new String[] {tr("Delete Layer"), tr("Cancel")},
+                            new String[] {"dialogs/delete.png", "cancel.png"}).getValue();
 
                     if(result != 1) return;
                 }
-                else if(!DontShowAgainInfo.show("delete_layer", tr("Do you really want to delete the whole layer?"), false))
+                else if (!ConditionalOptionPaneUtil.showConfirmationDialog(
+                        "delete_layer",
+                        Main.parent,
+                        tr("Do you really want to delete the whole layer?"),
+                        tr("Confirmation"),
+                        JOptionPane.YES_NO_OPTION,
+                        JOptionPane.QUESTION_MESSAGE,
+                        JOptionPane.YES_OPTION))
                     return;
             }
             Main.main.removeLayer(l);
-            if (sel >= instance.getModel().getSize())
+            if (sel >= instance.getModel().getSize()) {
                 sel = instance.getModel().getSize()-1;
-            if (instance.getSelectedValue() == null)
+            }
+            if (instance.getSelectedValue() == null) {
                 instance.setSelectedIndex(sel);
-            if (Main.map != null)
+            }
+            if (Main.map != null) {
                 Main.map.mapView.setActiveLayer((Layer)instance.getSelectedValue());
+            }
         }
     }
@@ -163,5 +174,5 @@
     public LayerListDialog(MapFrame mapFrame) {
         super(tr("Layers"), "layerlist", tr("Open a list of all loaded layers."),
-        Shortcut.registerShortcut("subwindow:layers", tr("Toggle: {0}", tr("Layers")), KeyEvent.VK_L, Shortcut.GROUP_LAYER), 100);
+                Shortcut.registerShortcut("subwindow:layers", tr("Toggle: {0}", tr("Layers")), KeyEvent.VK_L, Shortcut.GROUP_LAYER), 100);
         instance = new JList(model);
         listScrollPane = new JScrollPane(instance);
@@ -174,6 +185,7 @@
                         layer.name, index, isSelected, cellHasFocus);
                 Icon icon = layer.getIcon();
-                if (!layer.visible)
+                if (!layer.visible) {
                     icon = ImageProvider.overlay(icon, "overlay/invisible", OverlayPosition.SOUTHEAST);
+                }
                 label.setIcon(icon);
                 label.setToolTipText(layer.getToolTipText());
@@ -185,6 +197,7 @@
 
         Collection<Layer> data = mapView.getAllLayers();
-        for (Layer l : data)
+        for (Layer l : data) {
             model.addElement(l);
+        }
 
         instance.setSelectedValue(mapView.getActiveLayer(), true);
@@ -194,6 +207,7 @@
                 if (instance.getModel().getSize() == 0)
                     return;
-                if (instance.getSelectedIndex() == -1)
+                if (instance.getSelectedIndex() == -1) {
                     instance.setSelectedIndex(e.getFirstIndex());
+                }
                 mapView.setActiveLayer((Layer)instance.getSelectedValue());
             }
@@ -210,10 +224,12 @@
             }
             @Override public void mousePressed(MouseEvent e) {
-                if (e.isPopupTrigger())
+                if (e.isPopupTrigger()) {
                     openPopup(e);
+                }
             }
             @Override public void mouseReleased(MouseEvent e) {
-                if (e.isPopupTrigger())
+                if (e.isPopupTrigger()) {
                     openPopup(e);
+                }
             }
             @Override public void mouseClicked(MouseEvent e) {
@@ -258,5 +274,5 @@
 
         mergeButton = new SideButton("mergedown", "LayerList", tr("Merge the layer directly below into the selected layer."),
-        new ActionListener(){
+                new ActionListener(){
             public void actionPerformed(ActionEvent e) {
                 Layer lTo = (Layer)instance.getSelectedValue();
@@ -311,6 +327,7 @@
             return;
         }
-        if (instance.getSelectedIndex() == -1)
+        if (instance.getSelectedIndex() == -1) {
             instance.setSelectedIndex(0);
+        }
         updateButtonEnabled();
     }
@@ -320,6 +337,7 @@
      */
     public void activeLayerChange(Layer oldLayer, Layer newLayer) {
-        if (newLayer != instance.getSelectedValue())
+        if (newLayer != instance.getSelectedValue()) {
             instance.setSelectedValue(newLayer, true);
+        }
         updateButtonEnabled();
     }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 1837)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 1838)
@@ -16,4 +16,5 @@
 import javax.swing.DefaultListModel;
 import javax.swing.JList;
+import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
@@ -27,4 +28,6 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Relation;
+import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
+import org.openstreetmap.josm.gui.OptionPaneUtil;
 import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
 import org.openstreetmap.josm.gui.SideButton;
Index: /trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java	(revision 1837)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java	(revision 1838)
@@ -57,4 +57,5 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
+import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
 import org.openstreetmap.josm.gui.MapView;
 import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
@@ -65,5 +66,4 @@
 import org.openstreetmap.josm.tools.AudioUtil;
 import org.openstreetmap.josm.tools.DateUtils;
-import org.openstreetmap.josm.tools.DontShowAgainInfo;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.ImageProvider;
@@ -687,5 +687,12 @@
             msg.add(new JLabel(tr("<html>Upload of unprocessed GPS data as map data is considered harmful.<br>If you want to upload traces, look here:")), GBC.eol());
             msg.add(new UrlLabel(tr("http://www.openstreetmap.org/traces")), GBC.eop());
-            if (!DontShowAgainInfo.show("convert_to_data", msg))
+            if (!ConditionalOptionPaneUtil.showConfirmationDialog(
+                    "convert_to_data",
+                    Main.parent,
+                    msg,
+                    tr("Warning"),
+                    JOptionPane.OK_CANCEL_OPTION,
+                    JOptionPane.WARNING_MESSAGE,
+                    JOptionPane.OK_OPTION))
                 return;
             DataSet ds = new DataSet();
Index: /trunk/src/org/openstreetmap/josm/gui/layer/RawGpsLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/RawGpsLayer.java	(revision 1837)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/RawGpsLayer.java	(revision 1838)
@@ -45,9 +45,9 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
+import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
 import org.openstreetmap.josm.gui.MapView;
 import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
 import org.openstreetmap.josm.gui.dialogs.LayerListPopup;
 import org.openstreetmap.josm.io.MultiPartFormOutputStream;
-import org.openstreetmap.josm.tools.DontShowAgainInfo;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.ImageProvider;
@@ -70,5 +70,12 @@
             msg.add(new JLabel(tr("<html>Upload of unprocessed GPS data as map data is considered harmful.<br>If you want to upload traces, look here:")), GBC.eol());
             msg.add(new UrlLabel(tr("http://www.openstreetmap.org/traces")), GBC.eop());
-            if (!DontShowAgainInfo.show("convert_to_data", msg))
+            if (!ConditionalOptionPaneUtil.showConfirmationDialog(
+                    "convert_to_data",
+                    Main.parent,
+                    msg,
+                    tr("Warning"),
+                    JOptionPane.OK_CANCEL_OPTION,
+                    JOptionPane.WARNING_MESSAGE,
+                    JOptionPane.OK_OPTION))
                 return;
             DataSet ds = new DataSet();
Index: unk/src/org/openstreetmap/josm/tools/DontShowAgainInfo.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/DontShowAgainInfo.java	(revision 1837)
+++ 	(revision )
@@ -1,44 +1,0 @@
-// License: GPL. Copyright 2007 by Immanuel Scholz and others
-package org.openstreetmap.josm.tools;
-
-import static org.openstreetmap.josm.tools.I18n.tr;
-
-import java.awt.Container;
-import java.awt.GridBagLayout;
-
-import javax.swing.JCheckBox;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-
-import org.openstreetmap.josm.Main;
-
-public class DontShowAgainInfo {
-
-    public static boolean show(String prefKey, String msg) {
-        return show(prefKey, new JLabel(msg), false, JOptionPane.OK_CANCEL_OPTION, JOptionPane.OK_OPTION);
-    }
-
-    public static boolean show(String prefKey, String msg, Boolean state) {
-        return show(prefKey, new JLabel(msg), state, JOptionPane.OK_CANCEL_OPTION, JOptionPane.OK_OPTION);
-    }
-
-    public static boolean show(String prefKey, Container msg) {
-        return show(prefKey, msg, false, JOptionPane.OK_CANCEL_OPTION, JOptionPane.OK_OPTION);
-    }
-
-    public static boolean show(String prefKey, Container msg, Boolean state, int options, int true_option) {
-        if (!Main.pref.getBoolean("message."+prefKey, state)) {
-            JCheckBox dontshowagain = new JCheckBox(tr("Do not show again"));
-            dontshowagain.setSelected(Main.pref.getBoolean("message."+prefKey, state));
-            JPanel all = new JPanel(new GridBagLayout());
-            all.add(msg, GBC.eop());
-            all.add(dontshowagain, GBC.eol());
-            int answer = JOptionPane.showConfirmDialog(Main.parent, all, tr("Information"), options);
-            if (answer != true_option)
-                return false;
-            Main.pref.put("message."+prefKey, dontshowagain.isSelected());
-        }
-        return true;
-    }
-}
