Changeset 33852 in osm for applications/editors/josm


Ignore:
Timestamp:
2017-11-21T01:46:18+01:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 12840

Location:
applications/editors/josm/plugins/DirectUpload
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/DirectUpload

    • Property svn:ignore
      •  

        old new  
        55checkstyle-josm-DirectUpload.xml
        66findbugs-josm-DirectUpload.xml
         7spotbugs-josm-DirectUpload.xml
  • applications/editors/josm/plugins/DirectUpload/build.xml

    r32680 r33852  
    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="10580"/>
     7    <property name="plugin.main.version" value="12840"/>
    88
    99    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java

    r31949 r33852  
    3232import org.openstreetmap.josm.data.gpx.GpxTrack;
    3333import org.openstreetmap.josm.gui.ExtendedDialog;
     34import org.openstreetmap.josm.gui.MainApplication;
    3435import org.openstreetmap.josm.gui.PleaseWaitRunnable;
    3536import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     
    140141        descriptionField.setToolTipText(tr("Please enter Description about your trace."));
    141142
    142         List<String> descHistory = new LinkedList<>(Main.pref.getCollection("directupload.description.history", new LinkedList<String>()));
     143        List<String> descHistory = new LinkedList<>(Main.pref.getList("directupload.description.history", new LinkedList<String>()));
    143144        // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement()
    144145        // XXX this should be handled in HistoryComboBox
     
    151152        tagsField.setToolTipText(tr("Please enter tags about your trace."));
    152153
    153         List<String> tagsHistory = new LinkedList<>(Main.pref.getCollection("directupload.tags.history", new LinkedList<String>()));
     154        List<String> tagsHistory = new LinkedList<>(Main.pref.getList("directupload.tags.history", new LinkedList<String>()));
    154155        // we have to reverse the history, because ComboBoxHistory will reverse it againin addElement()
    155156        // XXX this should be handled in HistoryComboBox
     
    422423
    423424        descriptionField.addCurrentItemToHistory();
    424         Main.pref.putCollection("directupload.description.history", descriptionField.getHistory());
     425        Main.pref.putList("directupload.description.history", descriptionField.getHistory());
    425426
    426427        tagsField.addCurrentItemToHistory();
    427         Main.pref.putCollection("directupload.tags.history", tagsField.getHistory());
     428        Main.pref.putList("directupload.tags.history", tagsField.getHistory());
    428429
    429430        PleaseWaitRunnable uploadTask = new PleaseWaitRunnable(tr("Uploading GPX Track")){
     
    442443        };
    443444
    444         Main.worker.execute(uploadTask);
     445        MainApplication.worker.execute(uploadTask);
    445446    }
    446447
  • applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGuiPlugin.java

    r29866 r33852  
    1212import java.awt.event.KeyEvent;
    1313
    14 import org.openstreetmap.josm.Main;
    1514import org.openstreetmap.josm.actions.JosmAction;
     15import org.openstreetmap.josm.gui.MainApplication;
    1616import org.openstreetmap.josm.gui.MainMenu;
    1717import org.openstreetmap.josm.plugins.Plugin;
     
    3030        super(info);
    3131        openaction = new UploadAction();
    32         MainMenu.add(Main.main.menu.gpsMenu, openaction);
     32        MainMenu.add(MainApplication.getMenu().gpsMenu, openaction);
    3333    }
    3434
    35     class UploadAction extends JosmAction {
     35    static class UploadAction extends JosmAction {
    3636       
    3737        public UploadAction(){
     
    4141        }
    4242       
     43        @Override
    4344        public void actionPerformed(ActionEvent e) {
    4445            UploadDataGui go = new UploadDataGui();
  • applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadOsmConnection.java

    r32329 r33852  
    77import org.openstreetmap.josm.Main;
    88import org.openstreetmap.josm.data.gpx.GpxData;
    9 import org.openstreetmap.josm.gui.MapView;
     9import org.openstreetmap.josm.gui.MainApplication;
    1010import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
    1111import org.openstreetmap.josm.gui.layer.GpxLayer;
     
    4949     */
    5050    GpxData autoSelectTrace() {
    51         if (Main.map != null && Main.map.mapView != null) {
    52             MainLayerManager lm = Main.getLayerManager();
     51        if (MainApplication.getMap() != null && MainApplication.getMap().mapView != null) {
     52            MainLayerManager lm = MainApplication.getLayerManager();
    5353//            List<Layer> allLayers = new ArrayList<Layer>(mv.getAllLayersAsList());  // modifiable
    5454            List<Layer> selectedLayers = LayerListDialog.getInstance().getModel().getSelectedLayers();
Note: See TracChangeset for help on using the changeset viewer.