Changeset 342 in josm


Ignore:
Timestamp:
07.10.2007 09:43:25 (5 years ago)
Author:
framm
Message:
  • removed preferences override settings
  • changed "getting started" message
  • added code to drop 0.4 from preferences file on first start
Location:
branch/0.5/src/org/openstreetmap/josm
Files:
2 edited

Legend:

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

    r329 r342  
    6060        protected static final SortedMap<String, String> override = new TreeMap<String, String>(); 
    6161        static { 
    62                 override.put("osm-server.version", "0.5"); 
    63                 override.put("osm-server.additional-versions", ""); 
    64                 override.put("osm-server.url", "http://openstreetmap.gryph.de/api"); 
    65                 override.put("osm-server.username", "fred@remote.org"); 
    66                 override.put("osm-server.password", "fredfred"); 
    67                 override.put("plugins", null); 
     62                //override.put("osm-server.version", "0.5"); 
     63                //override.put("osm-server.additional-versions", ""); 
     64                //override.put("osm-server.url", "http://openstreetmap.gryph.de/api"); 
     65                //override.put("plugins", null); 
    6866        } 
    6967 
  • branch/0.5/src/org/openstreetmap/josm/gui/GettingStarted.java

    r329 r342  
    1212import javax.swing.JLabel; 
    1313import javax.swing.JPanel; 
     14import javax.swing.JTextField; 
    1415import javax.swing.event.HyperlinkEvent; 
    1516import javax.swing.event.HyperlinkListener; 
     
    4849                panel = new JPanel(new GridBagLayout()); 
    4950                 
    50                 panel.add(new JLabel("<html><h2>You are running a technology preview with support for <i>API 0.5</i>.</h2>" + 
    51                                 "<h3>API 0.5 supports object relationships, and segments have been removed.</h3>" + 
    52                                 "<h3>This version is hard-coded to use the API 0.5 running on <i>openstreetmap.gryph.de</i> which has data from a recent planet file."+ 
    53                                 "<br>Please be gentle with that machine and request only moderate bounding boxes.<br>" + 
    54                                 "<br>Username and password are also hardcoded, so your real username and password are not transmitted.<br>" + 
     51                panel.add(new JLabel("<html><h2>You are running the new JOSM version compatible with the 0.5 API.</h2>" + 
     52                                "<h3>You cannot load old OSM files with this version, but there are converter scripts to make your 0.4 files 0.5 compatible.</h3>"+ 
     53                "<h3>The JOSM interface hasn't changed a lot: Segments are gone, and Relations have been added.<br>You will find general information about the changes on the OSM wiki,<br>and there's a page on working with relations in the JOSM online help." + 
    5554                "</h3>"), GBC.eol()); 
     55                 
     56                // remove these two keys from preferences if present 
     57                boolean changePrefs = ! ( 
     58                        "0.5".equals(Main.pref.get("osm-server.version", "0.5")) && 
     59                        "0.5".equals(Main.pref.get("osm-server.additionalVersions", "0.5")) 
     60                ); 
     61                 
     62                if (changePrefs) {; 
     63                        Main.pref.put("osm-server.version", null); 
     64                        Main.pref.put("osm-server.additional-versions", null); 
     65                        panel.add(new JLabel("<html><h3>Your preferences have been changed by removing <b>osm-server.version</b> and/or <b>osm-server.additional-versions</b> which were still to referring 0.4.</h3></html>"), GBC.eol()); 
     66                } 
    5667                 
    5768                addLine("wiki", "Read the [Wiki page on API 0.5]"); 
Note: See TracChangeset for help on using the changeset viewer.