Ignore:
Timestamp:
2011-01-21T12:42:29+01:00 (13 years ago)
Author:
bastiK
Message:

Changed the mappaint and tagging preset preference format from a list of URLs to array preference to store more parameters for each source entry. (The flag "active" will be used for a dialog to quickly switch mappaint styles on and off.)
Removed the "mappaint.style.enable-defaults" and "taggingpreset.enable-defaults" property - the default (internal) source is now included in the normal list of sources. (The old preference entries are not removed yet, this should probably be changed, when the migration has been tested a little.)
Rearranged gui elements in mappaint and preset pref dialog to use the available space better and make the structure more clear. Strings that have been the same in mappaint and preset pref dialog are now different for each dialog.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java

    r3794 r3796  
    6464import org.openstreetmap.josm.gui.layer.Layer;
    6565import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     66import org.openstreetmap.josm.gui.preferences.SourceEntry;
     67import org.openstreetmap.josm.gui.preferences.TaggingPresetPreference.PresetPrefMigration;
    6668import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingTextField;
    6769import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionItemPritority;
     
    12281230        LinkedList<String> sources = new LinkedList<String>();
    12291231
    1230         if(Main.pref.getBoolean("taggingpreset.enable-defaults", true)) {
    1231             sources.add("resource://data/defaultpresets.xml");
    1232         }
    1233         sources.addAll(Main.pref.getCollection("taggingpreset.sources", new LinkedList<String>()));
     1232        for (SourceEntry e : (new PresetPrefMigration()).get()) {
     1233            sources.add(e.url);
     1234        }
     1235
    12341236        return sources;
    12351237    }
Note: See TracChangeset for help on using the changeset viewer.