Ticket #3377: 1_less_warning_utils.patch

File 1_less_warning_utils.patch, 2.8 KB (added by xeen, 16 years ago)
  • src/UtilsPlugin/JumpToAction.java

     
    1919import org.openstreetmap.josm.Main;
    2020import org.openstreetmap.josm.actions.JosmAction;
    2121import org.openstreetmap.josm.data.Bounds;
    22 import org.openstreetmap.josm.data.ProjectionBounds;
    2322import org.openstreetmap.josm.data.coor.LatLon;
    2423import org.openstreetmap.josm.gui.MapView;
    2524import org.openstreetmap.josm.tools.GBC;
  • src/UtilsPlugin/JoinAreasAction.java

     
    106106     * Checks whether the selected objects are suitable to join and joins them if so
    107107     */
    108108    public void actionPerformed(ActionEvent e) {
    109         int result = new ExtendedDialog(Main.parent,
    110             tr("Enter values for all conflicts."),
    111             new JLabel(tr("THIS IS EXPERIMENTAL. Save your work and verify before uploading.")),
    112             new String[] {tr("Continue anyway"), tr("Cancel")},
    113             new String[] {"joinareas.png", "cancel.png"}).getValue();
    114         if(result != 1) return;
    115 
    116109        Collection<OsmPrimitive> selection = Main.main.getCurrentDataSet().getSelectedWays();
    117110
    118111        int ways = 0;
     
    298291        if (components.isEmpty())
    299292            return false; // No conflicts found
    300293
    301         int result = new ExtendedDialog(Main.parent,
    302             tr("Enter values for all conflicts."),
    303             p,
    304             new String[] {tr("Solve Conflicts"), tr("Cancel")},
    305             new String[] {"dialogs/conflict.png", "cancel.png"}).getValue();
     294        ExtendedDialog ed = new ExtendedDialog(Main.parent,
     295                        tr("Enter values for all conflicts."),
     296                        new String[] {tr("Solve Conflicts"), tr("Cancel")});
     297        ed.setButtonIcons(new String[] {"dialogs/conflict.png", "cancel.png"});
     298        ed.setContent(p);
     299        ed.showDialog();
    306300
    307         if (result != 1) return true; // user cancel, unresolvable conflicts
     301        if (ed.getValue() != 1) return true; // user cancel, unresolvable conflicts
    308302
    309303        for (Entry<String, JComboBox> e : components.entrySet()) {
    310304            String val = e.getValue().getEditor().getItem().toString();
     
    448442    private ArrayList<RelationRole> removeFromRelations(OsmPrimitive osm) {
    449443        ArrayList<RelationRole> result = new ArrayList<RelationRole>();
    450444        for (Relation r : Main.main.getCurrentDataSet().relations) {
    451             if (r.deleted || r.incomplete) continue;
     445            if (r.isDeleted() || r.incomplete) continue;
    452446            for (RelationMember rm : r.members) {
    453447                if (rm.member != osm) continue;
    454448