Changeset 9233 in josm for trunk/src/org


Ignore:
Timestamp:
2016-01-01T13:28:04+01:00 (4 years ago)
Author:
simon04
Message:

fix #4602 - Add "Do not show again" to purge action

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/PurgeAction.java

    r8984 r9233  
    2626import javax.swing.JLabel;
    2727import javax.swing.JList;
     28import javax.swing.JOptionPane;
    2829import javax.swing.JPanel;
    2930import javax.swing.JScrollPane;
     
    3738import org.openstreetmap.josm.data.osm.RelationMember;
    3839import org.openstreetmap.josm.data.osm.Way;
    39 import org.openstreetmap.josm.gui.ExtendedDialog;
     40import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
    4041import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
    4142import org.openstreetmap.josm.gui.help.HelpUtil;
     
    206207
    207208        if (!GraphicsEnvironment.isHeadless()) {
    208             ExtendedDialog confirmDlg = new ExtendedDialog(Main.parent, tr("Confirm Purging"),
    209                     new String[] {tr("Purge"), tr("Cancel")});
    210             confirmDlg.setContent(buildPanel(modified), false);
    211             confirmDlg.setButtonIcons(new String[] {"ok", "cancel"});
    212 
    213             int answer = confirmDlg.showDialog().getValue();
    214             if (answer != 1)
     209            final boolean answer = ConditionalOptionPaneUtil.showConfirmationDialog(
     210                    "purge", Main.parent, buildPanel(modified), tr("Confirm Purging"),
     211                    JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_OPTION);
     212            if (!answer)
    215213                return;
    216214
Note: See TracChangeset for help on using the changeset viewer.