Ignore:
Timestamp:
2018-08-12T14:52:47+02:00 (6 years ago)
Author:
Don-vip
Message:

see #15229 - code refactoring - make Preferences.getAllPossiblePreferenceDirs() static

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r14105 r14145  
    6161import javax.xml.parsers.ParserConfigurationException;
    6262
    63 import org.openstreetmap.josm.Main;
     63import org.openstreetmap.josm.data.Preferences;
    6464import org.openstreetmap.josm.data.osm.DataSet;
    6565import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    12441244
    12451245        // Try all other resource directories
    1246         if (Main.pref != null) {
    1247             for (String location : Main.pref.getAllPossiblePreferenceDirs()) {
    1248                 u = getImageUrl(location + "images", imageName);
    1249                 if (u != null)
    1250                     return u;
    1251                 u = getImageUrl(location, imageName);
    1252                 if (u != null)
    1253                     return u;
    1254             }
     1246        for (String location : Preferences.getAllPossiblePreferenceDirs()) {
     1247            u = getImageUrl(location + "images", imageName);
     1248            if (u != null)
     1249                return u;
     1250            u = getImageUrl(location, imageName);
     1251            if (u != null)
     1252                return u;
    12551253        }
    12561254
Note: See TracChangeset for help on using the changeset viewer.