Changeset 35858 in osm for applications/editors/josm/plugins/DirectUpload
- Timestamp:
- 2021-11-06T10:59:06+01:00 (3 years ago)
- Location:
- applications/editors/josm/plugins/DirectUpload
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/DirectUpload/build.xml
r35550 r35858 5 5 <property name="commit.message" value="applied JOSM Ticket 4498 (patch by ax) - oauth support for gpx upload (I accidentally committed parts of the path in [24236])"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value="1 5502"/>7 <property name="plugin.main.version" value="18173"/> 8 8 9 9 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java
r35548 r35858 13 13 import java.text.DecimalFormat; 14 14 import java.text.SimpleDateFormat; 15 import java.util.Collections;16 15 import java.util.Date; 17 import java.util.LinkedList;18 import java.util.List;19 16 20 17 import javax.swing.JComboBox; … … 24 21 import org.openstreetmap.josm.data.gpx.GpxConstants; 25 22 import org.openstreetmap.josm.data.gpx.GpxData; 26 import org.openstreetmap.josm.data.gpx.GpxTrack;27 23 import org.openstreetmap.josm.data.gpx.IGpxTrack; 28 24 import org.openstreetmap.josm.gui.ExtendedDialog; … … 140 136 descriptionField.setToolTipText(tr("Please enter Description about your trace.")); 141 137 142 List<String> descHistory = new LinkedList<>(Config.getPref().getList("directupload.description.history", new LinkedList<String>())); 143 // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement() 144 // XXX this should be handled in HistoryComboBox 145 Collections.reverse(descHistory); 146 descriptionField.setPossibleItems(descHistory); 138 descriptionField.getModel().prefs().load("directupload.description.history"); 147 139 148 140 // tags … … 151 143 tagsField.setToolTipText(tr("Please enter tags about your trace.")); 152 144 153 List<String> tagsHistory = new LinkedList<>(Config.getPref().getList("directupload.tags.history", new LinkedList<String>())); 154 // we have to reverse the history, because ComboBoxHistory will reverse it againin addElement() 155 // XXX this should be handled in HistoryComboBox 156 Collections.reverse(tagsHistory); 157 tagsField.setPossibleItems(tagsHistory); 145 tagsField.getModel().prefs().load("directupload.tags.history"); 158 146 159 147 JPanel p = new JPanel(new GridBagLayout()); … … 240 228 241 229 if (canceled) { 242 230 response.disconnect(); 243 231 GuiHelper.runInEDT(new Runnable() { 244 232 @Override public void run() { … … 429 417 430 418 descriptionField.addCurrentItemToHistory(); 431 Config.getPref().putList("directupload.description.history", descriptionField.getHistory());419 descriptionField.getModel().prefs().save("directupload.description.history"); 432 420 433 421 tagsField.addCurrentItemToHistory(); 434 Config.getPref().putList("directupload.tags.history", tagsField.getHistory());422 tagsField.getModel().prefs().save("directupload.tags.history"); 435 423 436 424 PleaseWaitRunnable uploadTask = new PleaseWaitRunnable(tr("Uploading GPX Track")){
Note:
See TracChangeset
for help on using the changeset viewer.