Changeset 4554 in josm


Ignore:
Timestamp:
2011-11-02T08:07:21+01:00 (10 years ago)
Author:
stoecker
Message:

temporary disable XML saving till next tested is released - fix #7027

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r4553 r4554  
    7575    protected final SortedMap<String, String> colornames = new TreeMap<String, String>();
    7676
     77    /* NOTE: FIXME: Remove when saving XML enabled */
     78    private boolean loadedXML = false;
     79
    7780    public interface PreferenceChangeEvent{
    7881        String getKey();
     
    385388        final PrintWriter out = new PrintWriter(new OutputStreamWriter(
    386389                new FileOutputStream(prefFile + "_tmp"), "utf-8"), false);
    387         out.print(toXML(false));
     390        /* FIXME: NOTE: loadedXML - removed 01.12.2011 */
     391        if(loadedXML) {
     392            out.print(toXML(false));
     393        } else {
     394            for (final Entry<String, String> e : properties.entrySet()) {
     395                String s = defaults.get(e.getKey());
     396                /* don't save default values */
     397                if(s == null || !s.equals(e.getValue())) {
     398                    out.println(e.getKey() + "=" + e.getValue());
     399                }
     400              }
     401        }
    388402        out.close();
    389403
     
    443457            if(v == '<') {
    444458                fromXML(in);
     459                loadedXML = true;
    445460            } else {
    446461                int lineNumber = 0;
Note: See TracChangeset for help on using the changeset viewer.