Changeset 5956 in josm for trunk


Ignore:
Timestamp:
2013-05-11T22:03:13+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #8701 - Do not include OS details in changeset created_by tag

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/Version.java

    r5881 r5956  
    216216     */
    217217    public String getAgentString() {
     218        return getAgentString(true);
     219    }
     220
     221    /**
     222     * Returns the User-Agent string, with or without OS details
     223     * @param includeOsDetails Append Operating System details at the end of the User-Agent
     224     * @return The User-Agent
     225     * @since 5956
     226     */
     227    public String getAgentString(boolean includeOsDetails) {
    218228        int v = getVersion();
    219229        String s = (v == JOSM_UNKNOWN_VERSION) ? "UNKNOWN" : Integer.toString(v);
     
    224234            s += " SVN";
    225235        }
    226         return "JOSM/1.5 ("+ s+" "+LanguageInfo.getJOSMLocaleCode()+") " + Main.platform.getOSDescription();
     236        String result = "JOSM/1.5 ("+ s+" "+LanguageInfo.getJOSMLocaleCode()+")";
     237        if (includeOsDetails) {
     238            result += " " + Main.platform.getOSDescription();
     239        }
     240        return result;
    227241    }
    228242
  • trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java

    r5865 r5956  
    8484            tags.put("comment", currentComment);
    8585        }
    86         String agent = Version.getInstance().getAgentString();
     86        String agent = Version.getInstance().getAgentString(false);
    8787        String created_by = tags.get("created_by");
    8888        if (created_by == null || created_by.isEmpty()) {
Note: See TracChangeset for help on using the changeset viewer.