Ignore:
Timestamp:
2017-09-14T02:25:27+02:00 (3 years ago)
Author:
bastiK
Message:

see #15229 - include support for the long type in IPreferences

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

Legend:

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

    r12846 r12853  
    656656        Collection<String> history = Config.getPref().getList(historyKey, def);
    657657        int age = (int) (System.currentTimeMillis() / 1000 - Config.getPref().getInt(BasicUploadSettingsPanel.HISTORY_LAST_USED_KEY, 0));
    658         if (history != null && age < Main.pref.getLong(BasicUploadSettingsPanel.HISTORY_MAX_AGE_KEY, TimeUnit.HOURS.toMillis(4))
     658        if (history != null && age < Config.getPref().getLong(BasicUploadSettingsPanel.HISTORY_MAX_AGE_KEY, TimeUnit.HOURS.toMillis(4))
    659659                && !history.isEmpty()) {
    660660            return history.iterator().next();
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/DateFilterPanel.java

    r12846 r12853  
    1616import javax.swing.event.ChangeListener;
    1717
    18 import org.openstreetmap.josm.Main;
    1918import org.openstreetmap.josm.gui.layer.GpxLayer;
    2019import org.openstreetmap.josm.gui.widgets.DateEditorWithSlider;
     
    104103     */
    105104    public void saveInPrefs() {
    106         Main.pref.putLong(prefDateMin, dateFrom.getDate().getTime());
    107         Main.pref.putLong(prefDateMax, dateTo.getDate().getTime());
     105        Config.getPref().putLong(prefDateMin, dateFrom.getDate().getTime());
     106        Config.getPref().putLong(prefDateMax, dateTo.getDate().getTime());
    108107        Config.getPref().putBoolean(prefDate0, noTimestampCb.isSelected());
    109108    }
     
    114113     */
    115114    public void loadFromPrefs() {
    116         long t1 = Main.pref.getLong(prefDateMin, 0);
     115        long t1 = Config.getPref().getLong(prefDateMin, 0);
    117116        if (t1 != 0) dateFrom.setDate(new Date(t1));
    118         long t2 = Main.pref.getLong(prefDateMax, 0);
     117        long t2 = Config.getPref().getLong(prefDateMax, 0);
    119118        if (t2 != 0) dateTo.setDate(new Date(t2));
    120119        noTimestampCb.setSelected(Config.getPref().getBoolean(prefDate0, false));
Note: See TracChangeset for help on using the changeset viewer.