Ignore:
Timestamp:
2017-09-23T23:20:03+02:00 (2 years ago)
Author:
bastiK
Message:

see #15229 - move non-essential helper methods from Preferences to PreferencesUtils

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

Legend:

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

    r12846 r12891  
    3232
    3333import org.openstreetmap.josm.Main;
     34import org.openstreetmap.josm.data.PreferencesUtils;
    3435import org.openstreetmap.josm.gui.HelpAwareOptionPane;
    3536import org.openstreetmap.josm.gui.MainApplication;
     
    336337                fileHistory.removeAll(failedAll);
    337338                int maxsize = Math.max(0, Config.getPref().getInt("file-open.history.max-size", 15));
    338                 Main.pref.putCollectionBounded("file-open.history", maxsize, fileHistory);
     339                PreferencesUtils.putCollectionBounded(Config.getPref(), "file-open.history", maxsize, fileHistory);
    339340            }
    340341        }
  • trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java

    r12846 r12891  
    1616
    1717import org.openstreetmap.josm.Main;
     18import org.openstreetmap.josm.data.PreferencesUtils;
    1819import org.openstreetmap.josm.gui.ExtendedDialog;
    1920import org.openstreetmap.josm.gui.io.importexport.FileExporter;
     
    235236        history.remove(filepath);
    236237        history.add(0, filepath);
    237         Main.pref.putCollectionBounded("file-open.history", maxsize, history);
     238        PreferencesUtils.putCollectionBounded(Config.getPref(), "file-open.history", maxsize, history);
    238239    }
    239240}
Note: See TracChangeset for help on using the changeset viewer.