Ignore:
Timestamp:
2009-02-14T12:25:54+01:00 (15 years ago)
Author:
stoecker
Message:

apply patches from xeen for #1977.

File:
1 edited

Legend:

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

    r1169 r1397  
    3838import org.openstreetmap.josm.data.osm.TigerUtils;
    3939import org.openstreetmap.josm.data.osm.Way;
     40import org.openstreetmap.josm.gui.ExtendedDialog;
    4041import org.openstreetmap.josm.tools.GBC;
    4142import org.openstreetmap.josm.tools.Pair;
     
    108109        for (HashSet<Way> waylinks : backlinks.values()) {
    109110            if (!waylinks.containsAll(selectedWays)) {
    110                 int option = JOptionPane.showConfirmDialog(Main.parent,
    111                     tr("The selected ways have differing relation memberships.  "
    112                         + "Do you still want to combine them?"),
    113                     tr("Combine ways with different memberships?"),
    114                     JOptionPane.YES_NO_OPTION);
    115                 if (option == JOptionPane.YES_OPTION)
    116                     break;
     111                int option = new ExtendedDialog(Main.parent,
     112                        tr("Combine ways with different memberships?"),
     113                        tr("The selected ways have differing relation memberships.  "
     114                            + "Do you still want to combine them?"),
     115                        new String[] {tr("Combine Anyway"), tr("Cancel")},
     116                        new String[] {"combineway.png", "cancel.png"}).getValue(); 
     117                if (option == 1) break;
     118               
    117119                return;
    118120            }
     
    136138            Object secondTry = actuallyCombineWays(selectedWays, true);
    137139            if (secondTry instanceof List) {
    138                 int option = JOptionPane.showConfirmDialog(Main.parent,
     140                int option = new ExtendedDialog(Main.parent,
     141                    tr("Change directions?"),
    139142                    tr("The ways can not be combined in their current directions.  "
    140                     + "Do you want to reverse some of them?"), tr("Change directions?"),
    141                     JOptionPane.YES_NO_OPTION);
    142                 if (option != JOptionPane.YES_OPTION) {
    143                     return;
    144                 }
     143                        + "Do you want to reverse some of them?"),
     144                    new String[] {tr("Reverse and Combine"), tr("Cancel")},
     145                    new String[] {"wayflip.png", "cancel.png"}).getValue();
     146                if (option != 1) return;
    145147                nodeList = (List<Node>) secondTry;
    146148            } else {
     
    191193
    192194        if (!components.isEmpty()) {
    193             int answer = JOptionPane.showConfirmDialog(Main.parent, p, tr("Enter values for all conflicts."), JOptionPane.OK_CANCEL_OPTION);
    194             if (answer != JOptionPane.OK_OPTION)
    195                 return;
     195            int answer = new ExtendedDialog(Main.parent,
     196                tr("Enter values for all conflicts."),
     197                p,
     198                new String[] {tr("Solve Conflicts"), tr("Cancel")},
     199                new String[] {"dialogs/conflict.png", "cancel.png"}).getValue(); 
     200            if (answer != 1) return;
     201           
    196202            for (Entry<String, JComboBox> e : components.entrySet())
    197203                newWay.put(e.getKey(), e.getValue().getEditor().getItem().toString());
Note: See TracChangeset for help on using the changeset viewer.