Changeset 6587 in josm for trunk/src


Ignore:
Timestamp:
2014-01-01T13:13:42+01:00 (11 years ago)
Author:
simon04
Message:

see #9438 - upload dialog: make max age configurable which determines if previous changeset comment is pre-selected (defaults to 4h)

The corresponding preference key is upload.comment.max-age.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java

    r6565 r6587  
    3838    public static final String HISTORY_KEY = "upload.comment.history";
    3939    public static final String HISTORY_LAST_USED_KEY = "upload.comment.last-used";
     40    public static final String HISTORY_MAX_AGE_KEY = "upload.comment.max-age";
    4041    public static final String SOURCE_HISTORY_KEY = "upload.source.history";
    4142
     
    144145        int age = (int) (System.currentTimeMillis()/1000 - Main.pref.getInteger(HISTORY_LAST_USED_KEY, 0));
    145146        // only pre-select latest entry if used less than 4 hours ago.
    146         if (age < 4 * 3600 * 1000 && history != null && !history.isEmpty()) {
     147        if (age < Main.pref.getInteger(HISTORY_MAX_AGE_KEY, 4 * 3600 * 1000) && history != null && !history.isEmpty()) {
    147148            hcbUploadComment.setText(history.get(0));
    148149        }
Note: See TracChangeset for help on using the changeset viewer.