Changeset 1628 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2009-05-30T13:58:30+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java
r1608 r1628 15 15 import org.openstreetmap.josm.data.osm.visitor.NameVisitor; 16 16 import org.openstreetmap.josm.gui.historycombobox.JHistoryComboBox; 17 import org.openstreetmap.josm.gui.historycombobox.StringUtils;18 17 19 18 /** … … 34 33 */ 35 34 public Collection<OsmPrimitive> processed; 36 37 35 38 36 private OsmApi api = new OsmApi(); 39 37 40 38 private static final int MSECS_PER_SECOND = 1000; 41 39 private static final int SECONDS_PER_MINUTE = 60; … … 62 60 63 61 /** 64 * Send the dataset to the server. 62 * Send the dataset to the server. 65 63 * @param the_version version of the data set 66 64 * @param list list of objects to send … … 68 66 public void uploadOsm(String the_version, Collection<OsmPrimitive> list) { 69 67 processed = new LinkedList<OsmPrimitive>(); 70 68 71 69 // initialize API. Abort upload in case of configuration or network 72 70 // errors … … 87 85 return; 88 86 } 89 90 87 91 88 Main.pleaseWaitDlg.progress.setMaximum(list.size()); … … 93 90 94 91 boolean useChangesets = api.hasChangesetSupport(); 95 92 96 93 // controls whether or not we try and upload the whole bunch in one go 97 94 boolean useDiffUploads = Main.pref.getBoolean("osm-server.atomic-upload", … … 103 100 // add the last entered comment to the changeset 104 101 String cmt = ""; 105 List<String> history = StringUtils.stringToList(Main.pref.get(UploadAction.HISTORY_KEY), JHistoryComboBox.DELIM);102 List<String> history = new LinkedList<String>(Main.pref.getCollection(UploadAction.HISTORY_KEY, null)); 106 103 if(history.size() > 0) { 107 104 cmt = history.get(0); … … 161 158 // has successfully cancelled the data upload 162 159 // 163 return; 160 return; 164 161 } 165 166 JOptionPane.showMessageDialog(Main.parent, 162 163 JOptionPane.showMessageDialog(Main.parent, 167 164 /* tr("Error during upload: ") + */ e.getMessage()); 168 165 }
Note:
See TracChangeset
for help on using the changeset viewer.
