Changeset 1530 in josm for trunk


Ignore:
Timestamp:
2009-04-17T15:25:57+02:00 (15 years ago)
Author:
framm
Message:

upload more precise version number in changeset. drop some "created_by" special cases.

Location:
trunk/src/org/openstreetmap/josm
Files:
4 edited

Legend:

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

    r1397 r1530  
    175175                newWay.put(e.getKey(), combined);
    176176            } else if (e.getValue().size() > 1) {
    177                 if("created_by".equals(e.getKey()))
    178                 {
    179                     newWay.put("created_by", "JOSM");
    180                 }
    181                 else
    182                 {
    183                     JComboBox c = new JComboBox(e.getValue().toArray());
    184                     c.setEditable(true);
    185                     p.add(new JLabel(e.getKey()), GBC.std());
    186                     p.add(Box.createHorizontalStrut(10), GBC.std());
    187                     p.add(c, GBC.eol());
    188                     components.put(e.getKey(), c);
    189                 }
    190             } else
     177                JComboBox c = new JComboBox(e.getValue().toArray());
     178                c.setEditable(true);
     179                p.add(new JLabel(e.getKey()), GBC.std());
     180                p.add(Box.createHorizontalStrut(10), GBC.std());
     181                p.add(c, GBC.eol());
     182                components.put(e.getKey(), c);
     183            } else {
    191184                newWay.put(e.getKey(), e.getValue().iterator().next());
     185            }
    192186        }
    193187
  • trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java

    r1397 r1530  
    174174                newNode.put(e.getKey(), combined);
    175175            } else if (e.getValue().size() > 1) {
    176                 if("created_by".equals(e.getKey()))
    177                 {
    178                     newNode.put("created_by", "JOSM");
    179                 }
    180                 else
    181                 {
    182                     JComboBox c = new JComboBox(e.getValue().toArray());
    183                     c.setEditable(true);
    184                     p.add(new JLabel(e.getKey()), GBC.std());
    185                     p.add(Box.createHorizontalStrut(10), GBC.std());
    186                     p.add(c, GBC.eol());
    187                     components.put(e.getKey(), c);
    188                 }
    189             } else
     176                JComboBox c = new JComboBox(e.getValue().toArray());
     177                c.setEditable(true);
     178                p.add(new JLabel(e.getKey()), GBC.std());
     179                p.add(Box.createHorizontalStrut(10), GBC.std());
     180                p.add(c, GBC.eol());
     181                components.put(e.getKey(), c);
     182            } else {
    190183                newNode.put(e.getKey(), e.getValue().iterator().next());
     184            }
    191185        }
    192186
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r1523 r1530  
    152152     */
    153153    public static Collection<String> getUninterestingKeys() {
    154         if(uninteresting == null) {
     154        if (uninteresting == null) {
    155155            uninteresting = Main.pref.getCollection("tags.uninteresting",
    156156                    Arrays.asList(new String[]{"source","note","comment","converted_by","created_by"}));
     
    303303    /**
    304304     * true if this object is considered "tagged". To be "tagged", an object
    305      * must have one or more "non-standard" tags. "created_by" and "source"
    306      * are typically considered "standard" tags and do not make an object
     305     * must have one or more "interesting" tags. "created_by" and "source"
     306     * are typically considered "uninteresting" and do not make an object
    307307     * "tagged".
    308308     */
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r1529 r1530  
    2020import java.util.ArrayList;
    2121import java.util.Collection;
     22import java.util.Properties;
    2223import java.util.StringTokenizer;
    2324
     
    264265        changeset = new Changeset();
    265266        Main.pleaseWaitDlg.currentAction.setText(tr("Opening changeset..."));
    266         changeset.put("created_by", "JOSM");
     267        Properties sysProp = System.getProperties();
     268        Object ua = sysProp.get("http.agent");
     269        changeset.put("created_by", (ua == null) ? "JOSM" : ua.toString());
    267270        changeset.put("comment", comment);
    268271        createPrimitive(changeset);
Note: See TracChangeset for help on using the changeset viewer.