Changeset 31449 in osm for applications/editors/josm/plugins/mapillary/src
- Timestamp:
- 2015-08-05T11:45:17+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java
r31445 r31449 11 11 import org.openstreetmap.josm.plugins.mapillary.mode.JoinMode; 12 12 import org.openstreetmap.josm.plugins.mapillary.mode.SelectMode; 13 import org.openstreetmap.josm.plugins.mapillary.utils.PluginState; 13 14 import org.openstreetmap.josm.Main; 14 15 import org.openstreetmap.josm.gui.layer.Layer; … … 604 605 public void updateHelpText() { 605 606 String ret = ""; 606 if (this.data.size() > 0) 607 if (PluginState.isDownloading()) 608 ret += tr("Downloading"); 609 else if (this.data.size() > 0) 607 610 ret += tr("Total images: {0}", this.data.size()); 608 611 else … … 610 613 if (this.mode != null) 611 614 ret += " -- " + tr(this.mode.toString()); 615 if (PluginState.isUploading()) 616 ret += " -- " + PluginState.getUploadString(); 612 617 Main.map.statusLine.setHelpText(ret); 613 618 } -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryUploadAction.java
r31446 r31449 6 6 import java.awt.event.ActionEvent; 7 7 import java.awt.event.KeyEvent; 8 import java.io.UnsupportedEncodingException;9 import java.security.InvalidKeyException;10 import java.security.NoSuchAlgorithmException;11 8 12 9 import javax.swing.JDialog; -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySquareDownloadManagerThread.java
r31445 r31449 1 1 package org.openstreetmap.josm.plugins.mapillary.downloads; 2 3 import static org.openstreetmap.josm.tools.I18n.tr;4 2 5 3 import java.util.concurrent.ThreadPoolExecutor; … … 16 14 import org.openstreetmap.josm.plugins.mapillary.gui.MapillaryFilterDialog; 17 15 import org.openstreetmap.josm.plugins.mapillary.gui.MapillaryMainDialog; 16 import org.openstreetmap.josm.plugins.mapillary.utils.PluginState; 18 17 19 18 /** … … 73 72 @Override 74 73 public void run() { 75 Main.map.statusLine.setHelpText(tr("Downloading images from Mapillary"));76 74 try { 75 PluginState.startDownload(); 76 MapillaryLayer.getInstance().updateHelpText(); 77 77 downloadSequences(); 78 Main.map.statusLine.setHelpText(tr("Downloading image's information"));79 78 completeImages(); 80 79 MapillaryMainDialog.getInstance().updateTitle(); 81 Main.map.statusLine.setHelpText(tr("Downloading traffic signs"));82 80 downloadSigns(); 83 81 } catch (InterruptedException e) { 84 82 Main.error("Mapillary download interrupted (probably because of closing the layer)."); 83 } finally { 84 PluginState.finishDownload(); 85 MapillaryLayer.getInstance().updateHelpText(); 85 86 } 86 87 this.layer.updateHelpText(); -
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/OAuthUtils.java
r31447 r31449 49 49 import org.openstreetmap.josm.plugins.mapillary.MapillaryAbstractImage; 50 50 import org.openstreetmap.josm.plugins.mapillary.MapillaryImportedImage; 51 import org.openstreetmap.josm.plugins.mapillary.MapillaryLayer; 51 52 import org.openstreetmap.josm.plugins.mapillary.MapillarySequence; 53 import org.openstreetmap.josm.plugins.mapillary.utils.PluginState; 52 54 53 55 /** … … 164 166 165 167 HttpResponse response = httpClient.execute(httpPost); 166 if (response.getStatusLine().toString().contains("204")) 168 if (response.getStatusLine().toString().contains("204")) { 167 169 System.out.println("Succesfully uploaded image"); 170 PluginState.imageUploaded(); 171 } 168 172 file.delete(); 173 MapillaryLayer.getInstance().updateHelpText(); 169 174 } 170 175 … … 194 199 @Override 195 200 public void run() { 201 PluginState.startUpload(); 202 PluginState.imagesToUpload(this.images.size()); 203 MapillaryLayer.getInstance().updateHelpText(); 196 204 for (MapillaryAbstractImage img : this.images) { 197 205 if (!(img instanceof MapillaryImportedImage)) … … 201 209 this.uuid)); 202 210 } 211 this.ex.shutdown(); 212 PluginState.finishUpload(); 203 213 } 204 214 }
Note:
See TracChangeset
for help on using the changeset viewer.