Changeset 16135 in osm for applications/editors/josm/plugins
- Timestamp:
- 2009-06-26T16:21:47+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbPlugin.java
r14817 r16135 28 28 package org.openstreetmap.josm.plugins.osb; 29 29 30 import static org.openstreetmap.josm.tools.I18n.tr; 31 30 32 import java.awt.event.ActionEvent; 31 33 import java.awt.event.ActionListener; … … 87 89 } 88 90 91 // check, which api is used 92 String uriNew = Main.pref.get(ConfigKeys.OSB_API_URI_NEW); 93 boolean oldApi = uriNew != null && uriNew.contains("appspot"); 94 boolean switchApi = true; 95 if(oldApi) { 96 int choice = JOptionPane.showConfirmDialog(Main.parent, 97 tr("<html>The openstreetbus plugin is using the old server at appspot.com.<br>" + 98 "A new server is available at schokokeks.org.<br>" + 99 "Do you want to switch to the new server? (Strongly recommended)</html>"), 100 tr("Switch to new openstreetbugs server?"), 101 JOptionPane.YES_NO_OPTION); 102 switchApi = choice == JOptionPane.YES_OPTION; 103 } 104 89 105 String uri = Main.pref.get(ConfigKeys.OSB_API_URI_EDIT); 90 if(uri == null || uri.length() == 0 ) {91 uri = "http://openstreetbugs. appspot.com/editPOIexec";106 if(uri == null || uri.length() == 0 || switchApi) { 107 uri = "http://openstreetbugs.schokokeks.org/api/0.1/editPOIexec"; 92 108 Main.pref.put(ConfigKeys.OSB_API_URI_EDIT, uri); 93 109 } 94 110 95 111 uri = Main.pref.get(ConfigKeys.OSB_API_URI_CLOSE); 96 if(uri == null || uri.length() == 0 ) {97 uri = "http://openstreetbugs. appspot.com/closePOIexec";112 if(uri == null || uri.length() == 0 || switchApi) { 113 uri = "http://openstreetbugs.schokokeks.org/api/0.1/closePOIexec"; 98 114 Main.pref.put(ConfigKeys.OSB_API_URI_CLOSE, uri); 99 115 } 100 116 101 117 uri = Main.pref.get(ConfigKeys.OSB_API_URI_DOWNLOAD); 102 if(uri == null || uri.length() == 0 ) {103 uri = "http://openstreetbugs. appspot.com/getBugs";118 if(uri == null || uri.length() == 0 || switchApi) { 119 uri = "http://openstreetbugs.schokokeks.org/api/0.1/getBugs"; 104 120 Main.pref.put(ConfigKeys.OSB_API_URI_DOWNLOAD, uri); 105 121 } 106 122 107 123 uri = Main.pref.get(ConfigKeys.OSB_API_URI_NEW); 108 if(uri == null || uri.length() == 0 ) {109 uri = "http://openstreetbugs. appspot.com/addPOIexec";124 if(uri == null || uri.length() == 0 || switchApi) { 125 uri = "http://openstreetbugs.schokokeks.org/api/0.1/addPOIexec"; 110 126 Main.pref.put(ConfigKeys.OSB_API_URI_NEW, uri); 111 127 }
Note:
See TracChangeset
for help on using the changeset viewer.