Changeset 14145 in josm for trunk/src/org/openstreetmap/josm
- Timestamp:
- 2018-08-12T14:52:47+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r14144 r14145 275 275 * @return A set of all existing directories where resources could be stored. 276 276 */ 277 public Collection<String> getAllPossiblePreferenceDirs() {277 public static Collection<String> getAllPossiblePreferenceDirs() { 278 278 Set<String> locations = new HashSet<>(); 279 addPossibleResourceDir(locations, dirs.getPreferencesDirectory(false).getPath());280 addPossibleResourceDir(locations, dirs.getUserDataDirectory(false).getPath());279 addPossibleResourceDir(locations, Config.getDirs().getPreferencesDirectory(false).getPath()); 280 addPossibleResourceDir(locations, Config.getDirs().getUserDataDirectory(false).getPath()); 281 281 addPossibleResourceDir(locations, getSystemEnv("JOSM_RESOURCES")); 282 282 addPossibleResourceDir(locations, getSystemProperty("josm.resources")); -
trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
r13993 r14145 26 26 import javax.swing.ImageIcon; 27 27 28 import org.openstreetmap.josm. Main;28 import org.openstreetmap.josm.data.Preferences; 29 29 import org.openstreetmap.josm.data.Version; 30 30 import org.openstreetmap.josm.tools.ImageProvider; … … 416 416 */ 417 417 public static Collection<String> getPluginLocations() { 418 Collection<String> locations = Main.pref.getAllPossiblePreferenceDirs();418 Collection<String> locations = Preferences.getAllPossiblePreferenceDirs(); 419 419 Collection<String> all = new ArrayList<>(locations.size()); 420 420 for (String s : locations) { -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r14105 r14145 61 61 import javax.xml.parsers.ParserConfigurationException; 62 62 63 import org.openstreetmap.josm. Main;63 import org.openstreetmap.josm.data.Preferences; 64 64 import org.openstreetmap.josm.data.osm.DataSet; 65 65 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 1244 1244 1245 1245 // 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; 1255 1253 } 1256 1254
Note:
See TracChangeset
for help on using the changeset viewer.