Changeset 35858 in osm


Ignore:
Timestamp:
2021-11-06T10:59:06+01:00 (2 years ago)
Author:
GerdP
Message:

see #21515: NoSuchMethodError: 'void org.openstreetmap.josm.gui.widgets.HistoryComboBox.setPossibleItems(java.util.Collection)'

  • update DirectUpload code to recent changes in core, bump version
Location:
applications/editors/josm/plugins/DirectUpload
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/DirectUpload/build.xml

    r35550 r35858  
    55    <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])"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="15502"/>
     7    <property name="plugin.main.version" value="18173"/>
    88
    99    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java

    r35548 r35858  
    1313import java.text.DecimalFormat;
    1414import java.text.SimpleDateFormat;
    15 import java.util.Collections;
    1615import java.util.Date;
    17 import java.util.LinkedList;
    18 import java.util.List;
    1916
    2017import javax.swing.JComboBox;
     
    2421import org.openstreetmap.josm.data.gpx.GpxConstants;
    2522import org.openstreetmap.josm.data.gpx.GpxData;
    26 import org.openstreetmap.josm.data.gpx.GpxTrack;
    2723import org.openstreetmap.josm.data.gpx.IGpxTrack;
    2824import org.openstreetmap.josm.gui.ExtendedDialog;
     
    140136        descriptionField.setToolTipText(tr("Please enter Description about your trace."));
    141137
    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");
    147139
    148140        // tags
     
    151143        tagsField.setToolTipText(tr("Please enter tags about your trace."));
    152144
    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");
    158146
    159147        JPanel p = new JPanel(new GridBagLayout());
     
    240228
    241229            if (canceled) {
    242                 response.disconnect();
     230                response.disconnect();
    243231                GuiHelper.runInEDT(new Runnable() {
    244232                    @Override public void run() {
     
    429417
    430418        descriptionField.addCurrentItemToHistory();
    431         Config.getPref().putList("directupload.description.history", descriptionField.getHistory());
     419        descriptionField.getModel().prefs().save("directupload.description.history");
    432420
    433421        tagsField.addCurrentItemToHistory();
    434         Config.getPref().putList("directupload.tags.history", tagsField.getHistory());
     422        tagsField.getModel().prefs().save("directupload.tags.history");
    435423
    436424        PleaseWaitRunnable uploadTask = new PleaseWaitRunnable(tr("Uploading GPX Track")){
Note: See TracChangeset for help on using the changeset viewer.