Changeset 1233 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2009-01-10T18:27:25+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
r1169 r1233 49 49 50 50 public static void readFromPreferences() { 51 String[] a = null; 52 51 53 /* don't prefix icon path, as it should be generic */ 52 54 String internalicon = "resource://images/styles/standard/;resource://images/styles/"; 53 55 String internalfile = "standard=resource://styles/standard/elemstyles.xml"; 54 56 55 iconDirs = Main.pref.get("mappaint.iconpaths"); 56 iconDirs = iconDirs == null || iconDirs.length() == 0 ? internalicon : iconDirs + ";" + internalicon; 57 iconDirs = Main.pref.get("mappaint.icon.sources"); 58 if(Main.pref.getBoolean("mappaint.icon.enable-defaults", true)) 59 iconDirs = iconDirs == null || iconDirs.length() == 0 ? internalicon : iconDirs + ";" + internalicon; 57 60 58 String file = Main.pref.get("mappaint.sources"); 59 file = file == null || file.length() == 0 ? internalfile : internalfile + ";" + file; 61 String file = Main.pref.get("mappaint.style.sources"); 62 if(Main.pref.getBoolean("mappaint.style.enable-defaults", true)) 63 file = (file == null || file.length() == 0) ? internalfile : internalfile + ";" + file; 60 64 61 65 for(String fileset : file.split(";")) … … 63 67 try 64 68 { 65 String[] a;66 69 if(fileset.indexOf("=") >= 0) 67 70 a = fileset.split("=", 2); … … 76 79 catch (Exception e) 77 80 { 78 System.out.println("Mappaint-Style problems: \"" + fileset + "\""); 81 System.out.println("Mappaint-Style \"" + a[0] + "\" file \"" + a[1] + "\""); 82 System.out.println("Mappaint-Style problems: " + e); 79 83 } 80 84 }
Note:
See TracChangeset
for help on using the changeset viewer.